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

Rel image path #11

Merged
merged 2 commits into from
May 16, 2023
Merged

Rel image path #11

merged 2 commits into from
May 16, 2023

Conversation

wingkinl
Copy link
Contributor

@wingkinl wingkinl commented May 12, 2023

Support using relative path for images in posts and tiles.

As mentioned in this issue:
#10

With this patch, we can simply place images under the same folder as .md files.

For example, if we have this file structure:

content/
├── posts
│   ├── my-post
│   │   ├── preview.jpg
│   │   ├── image1.png
│   │   └── index.md

Then in the front matter of index.md, preview.jpg will work:

---
cover: "preview.jpg"
---

and image in the markdown also works:

![my image](image1.png "test")

@floyd-li
Copy link
Owner

thanks for your contribution!
can you please check if it break any original function? since there's no test case for this project.
and i'm just little busy these days due to some personal stuff so i may not response in time.

@wingkinl
Copy link
Contributor Author

can you please check if it break any original function?

I have already tested it while making the changes locally, and things work out great. Images in /static/ and from external links works the same way it used to be.

@floyd-li
Copy link
Owner

floyd-li commented May 14, 2023 via email

@floyd-li floyd-li merged commit c69d7c1 into floyd-li:master May 16, 2023
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.

2 participants