You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Often I have several lessons that coverthe same files. I want these files to appear in the lesson for context to the user - so the result is that I have mutiple files with the same name and same content duplicated among multiple lessons.
Currently I copy them between each lesson - but then I change one of them and forget to update the rest and it becomes hard to maintain.
Describe the solution you'd like.
In the content.md in the front matter - allow to referene files from other lessons, and they'll be included here as well - something like:
10:42:42 [watch] src/content/tutorial/4-concepts/6-sql-expression/1-introduction/content.md
10:42:43 [ERROR] [InvalidContentEntryFrontmatterError] tutorial → 4-concepts/6-sql-expression/1-introduction/content.md frontmatter does not match collection schema.
Did not match union:
Hint:
See https://docs.astro.build/en/guides/content-collections/ for more information on content schemas.
Error reference:
https://docs.astro.build/en/reference/errors/invalid-content-entry-frontmatter-error/
Stack trace:
at getEntryDataAndImages (file:///C:/repos/radweb/docs/interactive/node_modules/astro/dist/content/utils.js:137:26)
[...] See full stack trace in the browser, or rerun with --verbose.
Activity
AriPerkkio commentedon Oct 25, 2024
This sounds exactly as
template.visibleFiles
option #165Here's example usage of it
template.visibleFiles
to reduce repetition AriPerkkio/tutorial-vite-plugin#15template.visibleFiles
option #165noam-honig commentedon Oct 25, 2024
Hi @AriPerkkio thanks for pointing that out.
I wanted to try it ( and document it) but couldn't get it to wrok.
Is it already released?
When I do:
I get an error
Here are the versions I'm using:
AriPerkkio commentedon Oct 25, 2024
It's not yet finished or released. We'll need to discuss this with the team a bit more before we know what kind of API we want for it.
This discussion is not yet resolved: #165 (comment)