Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I'm sorry but, it doesn't work for me #13

Closed
hotspotcepeda opened this issue Mar 22, 2021 · 7 comments · Fixed by #14
Closed

I'm sorry but, it doesn't work for me #13

hotspotcepeda opened this issue Mar 22, 2021 · 7 comments · Fixed by #14
Assignees
Labels
bug Something isn't working

Comments

@hotspotcepeda
Copy link

First of all, thanks for your attention.
I am following the steps of his instructions but the pdf that is a single page does not load, only the window appears with "Previous Next Page: /" I have tried with firefox chrome and google chrome movile ..
I have also tried to load other pdf files with more than one page but I have the same result.
I don't know if I'm doing something wrong (I'm just starting with hugo), I'm trying to make it work at https://hotspotcepeda.github.io/es/posts/hotspot/#pdf
I have the pdf file uploaded locally at https://github.com/hotspotcepeda/hotspotcepeda.github.io/blob/main/static/pdfs/hotspot_conectar.pdf
I would like to know what is happening, I do not have an error message, the pdf file is simply not displayed.

I would appreciate your help in making it work.

@anvithks
Copy link
Owner

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.

@anvithks anvithks self-assigned this Mar 22, 2021
@anvithks anvithks added the bug Something isn't working label Mar 22, 2021
@mmroden
Copy link

mmroden commented Mar 24, 2021

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".

@mmroden
Copy link

mmroden commented Mar 24, 2021

<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.

@anvithks
Copy link
Owner

anvithks commented Mar 25, 2021

<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 .

@mmroden
Copy link

mmroden commented Mar 25, 2021

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.

@anvithks
Copy link
Owner

anvithks commented Mar 25, 2021

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.

@anvithks
Copy link
Owner

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

@anvithks anvithks reopened this Mar 25, 2021
@anvithks anvithks linked a pull request Mar 25, 2021 that will close this issue
anvithks added a commit that referenced this issue Jun 2, 2021
Adding a relative path to the source line to address #13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants