content
Right now, all of the content files must be placed in the content directory like /src/content/*.md
in order for injectContent
to work.
There may be cases where content needs to be separated. For example, maybe you have blog posts, but also project markdown files for a portfolio page. Something like this would be ideal (in order to make the blog list or project list components easier to write):
src/
└── content/
└── posts/
| └── 2023-01-01-my-post.md
| └── 2023-01-12-my-other-post.md
└──projects/
└── some-awesome-app.md
Could we add another parameter to the injectContent()
to accept a prefix? Then update the switchMap
to something like this:
switchMap((slug) => {
const filename = `/src/content/${prefix}${slug}.md`;
Happy to open a PR for this
No response
Owner Name | analogjs |
Repo Name | analog |
Full Name | analogjs/analog |
Language | TypeScript |
Created Date | 2022-07-06 |
Updated Date | 2023-03-28 |
Star Count | 885 |
Watcher Count | 18 |
Fork Count | 67 |
Issue Count | 33 |
Issue Title | Created Date | Updated Date |
---|