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
Support relative PDF links #32
Conversation
feat: preprocessor to support fix ^
Great, but I don't quite understand, isn't it precisely in combined output that you would want a link like |
I've confirmed this works for To get my pictures to work I had to add for img in soup.find_all('img'):
try:
img['src'] = get_abs_asset_href(base_url, img['src'])
except KeyError:
pass to It would be great if combined mode worked as well, as it's our main use case. Could something like this work?
There's still a risk of conflict, but I think the risk would be rather low? |
Yes, my goal is to have that fixed for 0.5.1.
There are more tags that I missed, rather than querying through tag name, we should query through attributes. Something like
I was thinking something along the same line, something like:
Would have to "ban"/throw error for the |
v0.5.1b2 is up - combined output should be supported now. |
Great will have a go when at work. The commit message sounds delicious :) |
@zhaoterryy Hm, I installed 0.5.1b2:
But an internal link still leads to the HTML: In this case, I tried clicking the "Working with Projects" link, which is |
Please try v0.5.1b3 👍 |
@zhaoterryy Bingo. Works great. Much appreciated! |
Tested: |
Currently, links such as
[Topic](topic.md)
become absolute links to their appropriate HTML files such asfile:///a/b/site/topic.html
.This implements a preprocessor to overwrite all the hrefs accordingly.
No support for combined PDF yet - this would require perhaps a generated id to replace all the anchor and href IDs of the single PDF document due to collision between naming of anchor IDs in multiple
.md
files.Fixes #28.