Skip to content
This repository was archived by the owner on Nov 30, 2024. It is now read-only.
This repository was archived by the owner on Nov 30, 2024. It is now read-only.

How to use BASE_PATH in a post #65

@bilke

Description

@bilke

I am writing a post in markdown and include an image which is located in images/pic1.png:

![This is an image][img-ref]

[img-ref]: /images/pic1.png

This works fine when running locally but when published to GitHubs project pages the image url does not work as expected.

When I change the ref to [img-ref]: {{ BASE_PATH }}/images/pic1.png it also works locally but not on GitHub.

When I change the ref to [img-ref]: {{ site.JB.BASE_PATH }}/images/pic1.png it works both locally and on Github but always (also when developing locally) inserts the link to the image hosted on GitHub.

So what is the correct usage of BASE_PATH in posts (and also pages)?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions