Fork me on GitHub
#cryogen
<
2022-01-17
>
jumar04:01:31

I have some trouble with AsciiDoc syntax in Cryogen and relative links. How can I render them properly? I'm trying something like:

link:/posts/my-summary-post[Summary]
Which gets rendered simply as
So it skips the hostname.

jumar05:01:59

Hmm, weird - it doesn't seem to work with relative urls starting with / (the root) If I use .. it works:

link:../posts/my-summary-post[Summary]
For the context, I'm using this link on in one of the "pages" so it's not in the 'posts' folder.

jumar08:01:19

I have the same problem with images - have to use ..

// I need to use this
image::../img/my.png[]

// instead of preferred:
image::/img/my.png[]

Jakub Holý (HolyJak)18:01:59

see https://blog.jakubholy.net/2020/best-team-ever/ and there the link labeled "troubleshooting-friendly responses" with source here: https://github.com/holyjak/blog.jakubholy.net/blob/master/content/asc/posts/2020/best-team-ever.asc#L80 The code there is:

link:/2020/troubleshooting-friendly-responses/[troubleshooting-friendly responses]
and it works just fine

jumar18:01:21

Interesing but this simply doesn't work for me. I tried it several times and it produces invalid links. Perhaps this can be a matter of proper configuration in config.edn?

jumar18:01:55

I found the problem! It was :blog-prefix "/" -> it should just be an empty string. Thanks @U0522TWDA for making me check the config.