-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[i18nIgnore] Migrate to Content Collections #2546
Conversation
✅ Deploy Preview for astro-docs-2 ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
Confirming that I have tested/looked for (large screen size): |
I had checked this PR before the optimizations and everything was working properly, and again I'm here to confirm everything looks great! What I tested:
|
is updating our contributor/translator guide a pre-req to merging this? Should we have that available first, @delucis @Yan-Thomas ? |
I believe @delucis made all the necessary changes to these, couldn't find anywhere else in our |
DOES THIS MEAN I APPROVE???? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have not found any reason not to approve this...
Great work @delucis & @bholmesdev !
Let's ... NOT do this again soon?? 😅
What kind of changes does this PR include?
Description
docs
collection under/src/content/docs/
. This preserves the existing i18n folder structure, unchanged.type
frontmatter param. Thistype
replaces thelayout
param, and can be omitted when using theMainLayout
. These types can be found browsing the schemas undersrc/content/config.ts
. I'm curious if the docs team has ideas for CONTRIBUTING updates or further refactors here!glob
to usegetCollection
.[lang]/[...slug].astro
to render content collection entries. This also allowed for fallbacks and page routes to be generated in the same place. This also maps thetype
frontmatter param to the correct layout.splitSlugFromLang
util. This helps with parsing the language out of the generated content collectionslug
.[...enRedirectSlug]
and[enBaseLevelRedirectSlug]
. This was purely for readability debugging our new slug generation routes. I'll differ to @delucis for changing this naming back.Chores
markdown
config to use newgfm
andsmartypants
flags