-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
split API reference into modules #9687
Conversation
✅ Deploy Preview for astro-docs-2 ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Lunaria Status Overview🌕 This pull request will trigger status changes. Learn moreBy default, every PR changing files present in the Lunaria configuration's You can change this by adding one of the keywords present in the Tracked Files
Warnings reference
|
src/content/docs/en/reference/errors/actions-returned-invalid-data-error.mdx
Outdated
Show resolved
Hide resolved
Co-authored-by: Armand Philippot <git@armand.philippot.eu>
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 think this looks great! Definitely helpful to split these out into the new pages. 🙌
No comment on the Lunaria side of things, but left a couple of notes on things that stood out to me.
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.
And while we’re on the subject of title: if we do indeed come up with a better title (and sidebar label?), we may as well also rename the URL to match and add a redirect.
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.
Love the new intros @sarah11918! Left some more notes. Sorry if some of the headings comments slightly contradict what we discussed previously. Going through things in more details made me realise that clearly labelling with module names may be more important than I initially realised (especially for certain pages).
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.
Don’t want to keep throwing spanners at this very helpful PR, but this page (and how lonely getImage()
is on it) is making me wonder about where <Image>
and <Picture>
are documented.
Right now we have “Built-in Components”, which actually mixes components from a range of sources:
astro/components
(also available asastro:components
) exports<Code>
,<Prism>
, and<Debug>
.astro:assets
exports<Image>
and<Picture>
.astro:transitions
exports<ViewTransitions>
(being renamed in v5).<Fragment>
is not imported at all, it’s more of a language/syntax feature.<Content>
can come from all kinds of places (imported Markdown, rendered content collection entries, etc.)
So this is more a note rather than a suggestion in one way or other. Now we document modules explicitly, maybe the components for that module are helpful in that module’s reference? Flipside of course is that the current component page collects all of the above so someone thinking “What are the available components?” can find them, vs someone looking to answer “What’s in astro:assets
?”
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.
Yes, this is a lonely page indeed! I think now that we're doing this restructuring, it's probably more helpful to have the components in their own module page?
So, maybe we add an astro:components
page for those imported components and move the other components to their respective pages? I think <Content />
and <Fragment>
are already documented on the Markdown and Components pages respectively as far as syntax and Markdown imports are concerned.
I agree, but for context, this version of the sidebar is almost certainly a very short-lived iteration. We’re heading in the direction of something more like: https://docs-sidebar-topics.netlify.app/reference/configuration-reference/ |
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
See #9687 Co-authored-by: Yan <61414485+yanthomasdev@users.noreply.github.com> Co-authored-by: thomasbnt <14293805+thomasbnt@users.noreply.github.com>
See #9687 Co-authored-by: Yan <61414485+yanthomasdev@users.noreply.github.com> Co-authored-by: thomasbnt <14293805+thomasbnt@users.noreply.github.com>
See #9687 Co-authored-by: Yan <61414485+yanthomasdev@users.noreply.github.com> Co-authored-by: thomasbnt <14293805+thomasbnt@users.noreply.github.com>
See #9687 Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com>
See #9687 Co-authored-by: Yan <61414485+yanthomasdev@users.noreply.github.com> Co-authored-by: thomasbnt <14293805+thomasbnt@users.noreply.github.com>
See #9687 Co-authored-by: Yan <61414485+yanthomasdev@users.noreply.github.com> Co-authored-by: thomasbnt <14293805+thomasbnt@users.noreply.github.com>
See #9687 Co-authored-by: Yan <61414485+yanthomasdev@users.noreply.github.com> Co-authored-by: thomasbnt <14293805+thomasbnt@users.noreply.github.com>
See #9687 Co-authored-by: Yan <61414485+yanthomasdev@users.noreply.github.com> Co-authored-by: thomasbnt <14293805+thomasbnt@users.noreply.github.com>
* i18n(fr): create `reference/modules/astro-middleware.mdx` See #9687 * translate comment Co-authored-by: Thomas Bonnet <thomasbnt@protonmail.com> * translate missing sentence Co-authored-by: Thomas Bonnet <thomasbnt@protonmail.com> --------- Co-authored-by: Thomas Bonnet <thomasbnt@protonmail.com> Co-authored-by: Yan <61414485+yanthomasdev@users.noreply.github.com>
* i18n(fr): update `guides/markdown-content.mdx` See #9687 * update anchor as well --------- Co-authored-by: Yan <61414485+yanthomasdev@users.noreply.github.com> Co-authored-by: thomasbnt <14293805+thomasbnt@users.noreply.github.com>
* i18n(fr): create `reference/modules/astro-i18n.mdx` See #9687 * translate Response Co-authored-by: Thomas Bonnet <thomasbnt@protonmail.com> --------- Co-authored-by: Thomas Bonnet <thomasbnt@protonmail.com> Co-authored-by: Yan <61414485+yanthomasdev@users.noreply.github.com>
See #9687 Co-authored-by: Yan <61414485+yanthomasdev@users.noreply.github.com>
Description (required)
In an attempt to make the API reference easier to navigate adds a new reference section specifically for the Astro API and each module individually.
Basic infra only! No content changes or improvements attempted! We should use this PR to figure out file name/folder conventions to use! Consistent page titles etc.! No decisions are final!TRANSLATORS:
I'm sorry that there will still be more work to do after this that will again update the content on some of these pages. And, there is more content changed here than I expected, but most of it is moving content around in sections! You can see the list below for things that I expect to continue to change here, but I did want to get the new pages created first, then we can tackle specific content independently!
Summary of notes left open below for follow up work:
<ViewTransitions>
,<Image>
, and<Picture>
components. Instead, content will go to relevant place in docs, perhaps with a newastro:components
pageassets
page needs full documentation of<Image>
properties -- copy from guide to start, then actually make proper reference matching the rest of the entries<Fragment>
that are not importedmiddleware
documents a required export (vs things you import from the module). Other pages could also document exports, but currently don't. For the sake of this PR, we are not adding new entries but will revisit for consistency and can consider adding the "Exports" section to other pages likeastro:actions
,astro:content
etc.api-reference
still the right name for the "leftover page"? Work is ongoing as we speak to clean up and focus the Runtime API page, so naming not changed here (plus, means we don't need any redirects here because the old page still exists). This particular page will be updated separately.astro:transitions
reference. This should make us check that page to make sure it's not doing too much and trying to be reference itself instead of just linking out to reference. (Note, so many things were previously undocumented about the API that it could simply mean that content just wasn't covered in the guide either, so not necessarily a problem, but for sure a smell.)