Conversation
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
|
✅ Deploy Preview for astro-docs-2 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
All the writing looks great here Matthew! I'm going to call @ArmandPhilippot in here to help organize! We have separate individual pages for every module (e.g. |
|
Yes, I agree:
I can help with the reorganization if you want, but I'll probably need your help to check/complete/make accurate the descriptions for the added sections! |
|
@ArmandPhilippot Happy if you'd like to take the lead sketching things out, and Matthew and I can help filling out the content as needed! |
|
@ArmandPhilippot Sounds good, the only thing I would maybe push back on is |
|
@matthewp Yep, that makes sense! I'll try to find a better way to express that without the link, because I'm not sure this is the most readable way at the moment. Thanks for the feedback! Not sure if I'll be able to do that tonight (CET), but at worst I'll do that tomorrow! |
Signed-off-by: Armand Philippot <git@armand.philippot.eu>
Signed-off-by: Armand Philippot <git@armand.philippot.eu>
| **Type:** <code>(request: Request, options: \{ routeData: <a href="#routedata">RouteData</a> \}) => Promise\<Response\></code> | ||
| </p> | ||
|
|
||
| Defines an optional method describing how to render a page. This will be called by Astro for each path returned by [`getStaticPaths()`](/en/reference/routing-reference/#getstaticpaths). |
There was a problem hiding this comment.
I think the reorganization is done. Feel free to check the accuracy of the new sections! For example, here looking at the JSDoc, I wasn't sure if this was referring to the getStaticPaths() I linked or the one available in AstroPrerenderer.
There was a problem hiding this comment.
Yep, great explanation!
|
@ArmandPhilippot This organization and these entries all look overall great to me! There are a couple of tiny spots I might fix, but first I'll let @matthewp read and make any suggestions so that I just polish over top of that. Thank you so much! This is amazing work 🙌 |
|
Noting here that I'll wait for @matthewp to approve Armand's additions first, but I did notice that I don't think we link to the new virtual module page anywhere from the Adapter API nor Integrations API pages? So, there probably is some good opportunity for linkage here! |
|
|
||
| <p><Since v="6.0.0" /></p> | ||
|
|
||
| This module provides utilities to help adapters collect static paths from within their target runtime (e.g. `workerd`). This only provides a real implementation in the `prerender` Vite environment. In other environments, it returns a no-op implementation. |
There was a problem hiding this comment.
wow, this is all fantastic
| <p> | ||
|
|
||
| **Type:** `(prerenderer: AstroPrerenderer | ((defaultPrerenderer: AstroPrerenderer) => AstroPrerenderer)) => void`<br /> | ||
| **Type:** <code>(prerenderer: <a href="#astroprerenderer">AstroPrerenderer</a> | ((defaultPrerenderer: AstroPrerenderer) => AstroPrerenderer)) => void</code><br /> |
|
I think everything looks great, thanks for tackling this @ArmandPhilippot ! |
|
I think all these docs look great! I'm left wondering where (if anywhere?) it makes sense to link to the new page/ Of all the docs here, we don't have a usage example on a different page showing importing and using Does this mean we should maybe update some text on the Adapter API page ( Non-blocking, but having a reference page that nothing links to means that we're not helping people find this as a solution to a thing they might be trying to do! They don't often go to an API reference unless they already know what they're looking up! |
|
Based on the discussion with Florian in #13229, the best place for a link could be either "Building an adapter" or the new "Custom prerenderer" section. It seems "Building a server entrypoint" and I don't know what is the best use case... that's probably why I forgot that link. 😅 We might need Matthew's opinion on this! |
|
I think in general it's just, "What will someone want to do when they need to know this?" And if it's "build an adapter" then yes, something that helps guide people to building an adapter that needs this would be helpful? It's also not strictly speaking a blocker here! Just something to bring up as a bit of a smell, and something that could be addressed in a later PR, if necessary. |
Description (required)
Custom prerenderers handle prerendering (aka static generation) during the build. The API primarily exists so that non-Node runtimes can run the prerender build in their own runtimes to generate page and therefore have access to that runtime specific APIs (such as the
Denoglobal in Deno).This adds documentation to the integration and adapter reference pages.
For Astro version:
6.x. See astro PR #15077.