Comments (7)
<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.
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.
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.
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.
<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.
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.
@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)
- Add a progress loader before displaying the pdf file
- Scroll through pages HOT 9
- PDF.js library loading broken HOT 6
- Please make PDF resizable
- Allow multiple PDF embeddings in one page HOT 10
- It doesn't work HOT 14
- Provide option to allow users to download the PDF file HOT 12
- It is working FINE locally but NOT on hosted site. HOT 3
- Undefined is not an object HOT 2
- Install as a Theme Component HOT 3
- PDF always loading, never displaying. HOT 7
- [Feature Request] Add GitHub action to implement a CI for the shortcode
- Users can view PDFs but preventing them the download HOT 2
- [Feature Request] Add translation option to add language for Next and prev buttons. HOT 4
- PDF not loading on Netlify but is OK on localhost HOT 8
- If there are pictures in the pdf, they cannot be displayed. HOT 2
- hidePaginator option does not work
- how to set a pdf file so that it can display? HOT 14
- Deploy pdf is not working HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hugo-embed-pdf-shortcode.