Mention how route data works on custom pages #3466
                  
                    
                      trueberryless
                    
                  
                
                  started this conversation in
                Docs suggestions
              
            Replies: 1 comment
-
        
 Correct,  starlight/packages/starlight/components/StarlightPage.astro Lines 11 to 14 in af61ee1 The only difference is that you can’t really use  ---
import StarlightPage from '@astrojs/starlight/components/StarlightPage.astro';
// No way this `title` could already have the "My custom page" value set below
const { title } = Astro.locals.starlightRoute.entry.data;
---
<StarlightPage frontmatter={{ title: 'My custom page' }}>
  <!-- Custom page content -->
</StarlightPage> | 
  
Beta Was this translation helpful? Give feedback.
                  
                    0 replies
                  
                
            
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
-
Currently the route data guide does not mention how it works on custom pages using the
<StarlightPage>. As far as I know, there shouldn't be any difference for the user, alto making this work internally took some time.The custom pages guide also doesn't mention anything the other way around (how
<StarlightPage>works together with route data).I wonder if in one of the two places this should be mentioned or if this could maybe wait and sometime in the future we could think about adding a few "recipes" similar to the Astro docs in the "How-to guide" style from Diataxis? 🤔
Why is this necessary?
Explain how different concepts in Starlight work together and can be utilized to achieve advanced scenarios and opportunities.
Beta Was this translation helpful? Give feedback.
All reactions