Code Monkey home page Code Monkey logo

Comments (7)

mmroden avatar mmroden commented on May 30, 2024 3

<script type="text/javascript" src= "{{"/" | relURL}}/js/pdf-js/build/pdf.js"></script> seems to be working for me. Merge request via fork? I'm not sure what kind of tests you have going here.

from hugo-embed-pdf-shortcode.

mmroden avatar mmroden commented on May 30, 2024 1

I can get it to work by changing this line at the top of embed-pdf.html from this:

<script type="text/javascript" src="/js/pdf-js/build/pdf.js"></script>

to this:

<script type="text/javascript" src="/my-project-name/js/pdf-js/build/pdf.js"></script>

Problem is, that's not really a "fix" so much as a "hack to make it work on my project".

from hugo-embed-pdf-shortcode.

mmroden avatar mmroden commented on May 30, 2024 1

Not sure why the issue was closed, let me get a PR going. I can walk you through how we're deploying hugo-- you can see it in this project here: https://github.com/tetrabiodistributed/papra We're basically deploying hugo through a docker image and through build actions to get everything compiled, with this project as a submodule. I don't know how well this fix will work for other people, so I'd love some confirmation that it doesn't break what they're up to.

from hugo-embed-pdf-shortcode.

anvithks avatar anvithks commented on May 30, 2024

Thanks for raising the issue.
I am a little busy with my full time job this week.
i will try to spend time when I can and check this.

from hugo-embed-pdf-shortcode.

anvithks avatar anvithks commented on May 30, 2024

<script type="text/javascript" src= "{{"/" | relURL}}/js/pdf-js/build/pdf.js"></script> seems to be working for me.

Awesome!

Merge request via fork?

Yes, Please!

I'm not sure what kind of tests you have going here.

ermm. none .
I wrote the shortcode for a work related (open-source) documentation website and realised no shortcode exists.
So thought of making it into one.
I don't think I know how to setup tests on this kind of a project.
If you know how this could be done, would appreciate it if you could help .

from hugo-embed-pdf-shortcode.

anvithks avatar anvithks commented on May 30, 2024

Thank you @mmroden I have a demo site up with the shortcode and I am deploying it using Netlify.
The demo site is here and the source code is here
May be I could set up the shortcode as a submodule in the demo site and deploy every PR. (pretty much what you wrote above. I wrote this without reading the above comment in its entirety)

But getting that integration on this repository will be difficult, I am assuming.

from hugo-embed-pdf-shortcode.

anvithks avatar anvithks commented on May 30, 2024

@mmroden I think the OP closed the issue since you provided a fix.
Thanks for opening it again.

from hugo-embed-pdf-shortcode.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.