Replies: 2 comments 4 replies
-
|
I agree & this would be good for integrations as well to be able to separate the content away from source code. Eg. In my case I'm planning to integrate Stackbit later to the project that mentions
It would be great to understand what limits Astro to do this currently & how this relates to their Image optimization etc. I'm interested to optimize the images in md files as well, which currently is out of the box possible only in .mdx files |
Beta Was this translation helpful? Give feedback.
-
|
It's now possible https://docs.astro.build/en/guides/images/#images-in-markdown-files |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Problem:
When using Astro for a content site(blog) Markdown is often used. Currently, Astro cannot resolve files outside the
publicorassetsdirectories.I don't want to keep my content inside the
srcfolder, app and content are two separate things.Here is how you can usually organize content clean and separate from the app source code.
Solution
When you find a relative resource file referenced in
.mdor.mdx, Astro should automatically detect this and serve the resource to the client without additional steps. This is the most convenient way to handle it. (maybe introduce a new config param to disable this behaviour).On production build, Astro should treat these resources, as usual
Note: Hugo, Gridsome, Gatsby supports this out of the box
Beta Was this translation helpful? Give feedback.
All reactions