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

Relative URL to downloaded PDF #4

Open
raphaelmenges opened this issue Oct 9, 2018 · 2 comments
Open

Relative URL to downloaded PDF #4

raphaelmenges opened this issue Oct 9, 2018 · 2 comments

Comments

@raphaelmenges
Copy link

Hello @rjoberon,

we are facing a minor issue when generating the references for the members of our team. It seems that the generated HTML code of the references links the to the downloaded PDF like href="pdf/paper.pdf", which causes the browser to prepend the link with the current folder in the URL, e.g., "/team/raphaelmenges/pdf/paper.pdf". However, the PDFs are located in the "pdf" folder at the root of the site directory. This might be fixed through prepending the generated, relative link with a slash, e.g., href="/pdf/paper.pdf".

Regards,
@raphaelmenges

@rjoberon
Copy link
Owner

rjoberon commented Oct 9, 2018

That's an interesting problem. The plugin currently only works for pages that are in the same directory as the document folder, i.e., it can not create a document folder in a subdirectory. Just appending / does not solve the problem, as then the plugin would not work for sites that do not reside at the root (/) of the web server's hierarchy (e.g., /~username/). Fixing this is nontrivial, as it requires careful distinction between the local path on disk during rendering and the path on the server. The changes required in the bibsonomy-ruby module would be incompatible with the module's purpose, as it is intended to work locally. Sorry, unfortunately I currently don't see how this could be fixed.

@raphaelmenges
Copy link
Author

First of all, thank you for the fast replies :)

You may add an option in the _config.yml or the call parameters of {% bibsonomy ... %} to prepend a string to the links in the generated HTML code. This string could be forwarded to bibsonomy-ruby and simply put in front of the links.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants