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

Make images in markdown work when posts have nice permalinks #8

Closed
arrowtype opened this issue Jan 20, 2021 · 3 comments
Closed

Make images in markdown work when posts have nice permalinks #8

arrowtype opened this issue Jan 20, 2021 · 3 comments

Comments

@arrowtype
Copy link
Owner

Problem:

If I have markdown templates that include both nice permalinks and images, the images don’t get passed through into the site.

Unfortunately, there isn’t a prebuilt way to make this happen. TBC

@arrowtype
Copy link
Owner Author

arrowtype commented Jan 26, 2021

This post describes how to add images to templated pages, but doesn’t specifically deal with images from markdown:

https://mahmoudashraf.dev/blog/how-to-optimize-and-lazyloading-images-on-eleventy/

It shows a way of using eleventy-img and sharp to create responsive, blur-up images, so it will probably be a useful reference.

@arrowtype
Copy link
Owner Author

arrowtype commented Jan 27, 2021

More background:

Related issues:

Worst case, I think: not using the permalink attribute for posts, and either:

  1. Just name folders within posts as intended permalinks. The downside, obviously, is that it will be somewhat harder to easily see my posts in chronological order while writing in VS Code (a pretty big drawback). It would also sacrifice sensible ordering on GitHub.
  2. Just allow URLs to include dates, like blog.arrowtype.com/2020-08-25--making-better-zips. Not that bad, but seems like a bigger problem over time. I would like to preserve these posts for the long term, but also I don’t want the long URLs, and this conflict would risk their permanence.

@arrowtype
Copy link
Owner Author

Fixed with 07f5378 and 4b00ca7

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

1 participant