-
-
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
fix: add undocumented options in integrations-reference.mdx
#10822
base: main
Are you sure you want to change the base?
fix: add undocumented options in integrations-reference.mdx
#10822
Conversation
The `string` type was definitely removed in withastro/astro#11987. Other pages was up-to-date but not the integrations reference.
In overview of the functions available, `injectRoute` and `InjectedType` was the only ones expanded. It might be better to be consistent with the others and since `InjectedRoute` and `InjectedType` can be imported, it could be nice to show the types there.
It was added in withastro/astro#11824 so it seems to be since v5.
It seems it was added in withastro/astro#7821 so in v4.7.0.
The other options of this hooks are not documented so I just added the option in the Quick API Reference and fixed the type in the `astro:build:ssr` type overview.
✅ Deploy Preview for astro-docs-2 ready!Built without sensitive environment variables
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
|
Amazing, thank you so much for this initiative Armand! As you say, in draft so no rush. But would be great for at least @florian-lefebvre and @Fryuni to have a look over when it's ready before I do! You could also post this in the |
Oh definitely! There still some work to do here (mainly document what is not documented) so I'll try to do that with my knowledge but yeah, once done a review from our integrations expert would be much appreciated! 😄 |
Feel free to ping me once you're ready! |
Added in withastro/astro#4775 so v1.3.0
`entryPoints` added in withastro/astro#7220 so v2.7.0 `middlewareEntryPoint` added in withastro/astro#7532 so 2.8.0
I moved some hooks in the page to match the hooks order. I also fixed some `Next hook`/`Previous hook` which seemed wrong or at least outdated. Tested with a custom integration and logs.
We usually use `addMiddleware()` instead of `addMiddleware` in headings when the type is a function.
I was looking at the Integrations reference page and noticed some formatting issues... Since Florian is about to give a talk on integrations, I figured it was a good time to do a more thorough check instead! Also, I was worried that you would be bored after
5.2
. 😄 (no rush, still in draft... it takes more time than expected)Description (required)
Sorry the description isn't really succinct but I'm trying to keep track of the why and when for each point.
In
upgrade-to/v5.mx
:addDevToolbarApp
code snippets (the path is not the same as the one used in the code block's title)In
integrations-reference.mdx
:Consistent formatting:
Type:
/Since
block to be consistent with the formatting of API referenceaddMiddleware
>addMiddleware()
)+
with ExpressiveCode notation to highlight added lines inAllow installation with astro add
injectRoute
andinjectTypes
consistent with the other options. These were the only objects expanded in the API quick reference, so:InjectedRoute
andInjectedType
can be imported, it could be nice to show the types thereExisting content:
refreshContent
,middlewareEntryPoint
andpages
options inQuick API Reference
logger
option in the type preview of some hooksconsole.log
)Previous hook
/Next hook
links (some was wrong/outdated or the anchor did not match the link)addDevToolbarApp
have been updated in the other pages, but not in this one...string
was removed in feat(next): TODOs astro#11987)injectRoute
,pattern
was displayed twice with a different type (one of them should beprerender
)addWatchFile
is a functionNew content:
buildOutput
option inastro:config:done
(added in Merge output: hybrid and output: static astro#11824, so v5)toolbar
option inastro:server:setup
(added in Fix astro/app import astro#7821, so v4.7.0)astro:build:setup
optionsastro:build:generated
optionsastro:build:ssr
optionsRemaining questions:
astro:config:setup
hook, should we precise thatcommand
also usessync
as value when runningastro check
(sincesync
is called under the hood)?route option
we haveroute.prerender
but we are not showing the readonlyroute.component
property, is it on purpose? (both were available at the time of writing the documentation, see Document newastro:route:setup
hook #9064)Integrations API
page becomes longer than the Render context page (formerly API reference) we split. Could a section in the sidebar likeRuntime API
make sense here? Not necessarily now, but the page might get a bit too big for Algolia.IN PROGRESS:
IntegrationRouteData
) to a separateUtility Types of Options
section,IntegrationResolvedRoute
issue reported by Fryuni on Discord (horizontal scroll, break up the type)IntegrationResolvedRoute
type, I figured we could break up theIntegrationRouteData
.TODO:
logger
option is used in every hook and this is documented inAstroIntegrationLogger
. Perhaps we should find a way to link every hook to this section or another idea, thanks to Florian, would be to move the logger documentation before the hooks. Still hesitant. A link in theHooks
introduction could be enough (ie.a `logger` option is available in all hooks...
).Related issues & labels (optional)
add new content
,consistency/formatting
andimprove or update documentation