Describe the bug
I use https://docs.astro.build/en/guides/assets/ and place my cover/preview images next to the articles in content dir.
Only images specified without leading ./ work in frontmatter cms but unfortunately break in astro.
Another useful thing that's broken due to relative paths not working would be the ability to place frontmatter.json in a subdir of astro like src/content/_frontmatter/frontmatter.json and reference ../articles (src/content/articles) in the json config.
Why would I want to do that? Well I broke out my astro content dir (src/content) into a submodule, alongside assets (src/content/articles/_assets), but having src/content/frontmatter.json breaks astro. The only way around it would be to either make front matter cms recognize _frontmatter.json which I'm not sure how to feel about, or and be able to place frontmatter.json and .frontmatter in a dir with leading underscore, like src/content/_frontmatter, meaning content dir can truly live away from the source code and still work 100% with front matter cms, yet nothing will be broken. Currently creating a new article in parent dir works, but nothing turns up in the dashboard.
To Reproduce
Steps to reproduce the behavior:
Place frontmatter.json in a subdir and prepend content dir with ../
Create article. It'll work.
View dashboard. It'll be empty.
Expected behavior
Relative paths in frontmatter.json should be resolved for listing too, so the config can be placed levels deep and still be able to reference content dirs by traversing levels up parent dir, and relative preview image paths should equally be resolved: ./abc.jpg should behave exactly as abc.jpg.
Could be I missed something in the docs. If that's the case, please enlighten me.
**Describe the bug**
I use [https://docs.astro.build/en/guides/assets/](https://docs.astro.build/en/guides/assets/) and place my cover/preview images next to the articles in `content` dir.
Only images specified without leading `./` work in frontmatter cms but unfortunately break in astro.
Another useful thing that's broken due to relative paths not working would be the ability to place `frontmatter.json` in a subdir of astro like `src/content/_frontmatter/frontmatter.json` and reference `../articles` (`src/content/articles`) in the json config.
Why would I want to do that? Well I broke out my astro content dir (`src/content`) into a submodule, alongside assets (`src/content/articles/_assets`), but having `src/content/frontmatter.json` breaks astro. The only way around it would be to either make front matter cms recognize `_frontmatter.json` which I'm not sure how to feel about, or and be able to place `frontmatter.json` and `.frontmatter` in a dir with leading underscore, like `src/content/_frontmatter`, meaning content dir can truly live away from the source code and still work 100% with front matter cms, yet nothing will be broken. Currently creating a new article in parent dir works, but nothing turns up in the dashboard.
**To Reproduce**
Steps to reproduce the behavior:
1. Place frontmatter.json in a subdir and prepend content dir with `../`
2. Create article. It'll work.
3. View dashboard. It'll be empty.
**Expected behavior**
Relative paths in `frontmatter.json` should be resolved for listing too, so the config can be placed levels deep and still be able to reference content dirs by traversing levels up parent dir, and relative preview image paths should equally be resolved: `./abc.jpg` should behave exactly as `abc.jpg`.
Could be I missed something in the docs. If that's the case, please enlighten me.
<!-- github-sync-id:1855466066 -->
Switched to beta and relative images started loading. Closing since I can make a different repo and just add the content submodule there.
Switched to beta and relative images started loading. Closing since I can make a different repo and just add the content submodule there.
<!-- github-comment-id:1682856142 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Describe the bug
I use https://docs.astro.build/en/guides/assets/ and place my cover/preview images next to the articles in
contentdir.Only images specified without leading
./work in frontmatter cms but unfortunately break in astro.Another useful thing that's broken due to relative paths not working would be the ability to place
frontmatter.jsonin a subdir of astro likesrc/content/_frontmatter/frontmatter.jsonand reference../articles(src/content/articles) in the json config.Why would I want to do that? Well I broke out my astro content dir (
src/content) into a submodule, alongside assets (src/content/articles/_assets), but havingsrc/content/frontmatter.jsonbreaks astro. The only way around it would be to either make front matter cms recognize_frontmatter.jsonwhich I'm not sure how to feel about, or and be able to placefrontmatter.jsonand.frontmatterin a dir with leading underscore, likesrc/content/_frontmatter, meaning content dir can truly live away from the source code and still work 100% with front matter cms, yet nothing will be broken. Currently creating a new article in parent dir works, but nothing turns up in the dashboard.To Reproduce
Steps to reproduce the behavior:
../Expected behavior
Relative paths in
frontmatter.jsonshould be resolved for listing too, so the config can be placed levels deep and still be able to reference content dirs by traversing levels up parent dir, and relative preview image paths should equally be resolved:./abc.jpgshould behave exactly asabc.jpg.Could be I missed something in the docs. If that's the case, please enlighten me.
Switched to beta and relative images started loading. Closing since I can make a different repo and just add the content submodule there.