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

Add relative path support for shortcodes #66

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

opeik
Copy link

@opeik opeik commented Jul 20, 2024

Hi there,

This PR does what it says on the tin. It lets you link to relative files easily:

{{ figure(src="xkcd-234.png", caption="[Escape artist](https://www.xkcd.com/234)") }}

@pawroman
Copy link
Owner

Hey, I don't have the time to review this properly right now, but it looks like a great contribution.

@heitorPB could you take a look please?

@heitorPB
Copy link
Contributor

Why is this needed? I have the following snippet working without this patch:

{{ figure(src="nomad-client.png",
          alt="Screenshot of the Nomad Web UI showing the supported task drivers.",
          position="center",
          style="width: 80%",
          caption="Screenshot of the Nomad Web UI showing the supported task
                   drivers. Nomad detected Docker and Podman :)",
          caption_position="center") }}

And the file nomad-client.png on the same dir as the markdown (content/posts/nomad/).

You don't get the image correctly without this patch?

@opeik
Copy link
Author

opeik commented Aug 23, 2024

@heitorPB Without this patch I have to specify paths relative to the project root.

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

Successfully merging this pull request may close these issues.

3 participants