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

output true relative links ? #204

Open
maxandersen opened this issue Dec 30, 2018 · 2 comments
Open

output true relative links ? #204

maxandersen opened this issue Dec 30, 2018 · 2 comments

Comments

@maxandersen
Copy link
Contributor

Is there a way to have jekyll-asciidoc output true relative links ?

i.e. if I in a post at my.site/blog/apost.html have:

link:/blog/bpost.html

I currently get a a href with the value /blog/bpost.html but what I'm looking for is that it puts

link:./bpost.html when rendered as as part of /blog but when aggreated on the front page the link should be blog/bpost.html.

I have a function in jekyll that does transformation based on the location of the page the rendering is happening on thus I was wondering if there was a way to tell asciidoc to apply this function when rendering or maybe even better that the jekyll asciidoc plugin understands the location it is being rendered to/from ?

@maxandersen
Copy link
Contributor Author

to be clear - my goal here is that my output of jekyll build is 100% moveable independent on wether hosted from a file system, github pages, my top level domain, a sub path on my site or IPFS.

At the moment I have that for all content - except hrefs and image links in adoc based posts.

@djencks
Copy link
Contributor

djencks commented Feb 11, 2021

Using link: means you want the url as written in the output href. If you want some adoc-awareness in generated links xref: or <<>> syntax would be more appropriate. I haven't investigated what happens with those yet, nor with image links. I'd guess that if image links don't work properly, neither will xrefs.

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