feat: add blank template#3907
Conversation
🦋 Changeset detectedLatest commit: 732b82f The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
✅ Deploy Preview for astro-starlight ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Hello! Thank you for opening your first PR to Starlight! ✨ Here’s what will happen next:
|
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
|
trueberryless
left a comment
There was a problem hiding this comment.
Thanks for this amazing first time contribution 🥳
Overall the changes look good, I would just like to point out some docs changes:
-
Could you add a new section under https://starlight.astro.build/guides/customization/#page-layout which explains the new
'blank'template similar to how you currently explain it in the changeset. One difference to the current changeset explanation tho is that the docs should be more "stateless" and unemotional, meaning that they reflect the current state of how things work, so no need for phrases like "new'blank'template" or any introduction to reason about the third template.I think since this is a new feature, we can add an entire new heading, e.g. something like that (I'm sorry that I can't suggest it in the code directly, since it is outside the diff range):
## Page layout By default, Starlight pages use a layout with a global navigation sidebar and a table of contents that shows the current page headings. Starlight offers two additional layouts, which can be configured by setting the [`template` field](/reference/frontmatter/#template) in a page’s frontmatter. The `'splash'` template applies a wider page layout without sidebars. This works particularly well for landing pages and you can see it in action on the [homepage of this site](/). ```md {5} --- # src/content/docs/index.md title: My Landing Page template: splash --- ``` The `'blank'` template leaves only the navigation header and creates a blank canvas, which can be useful if you want to fully customize your landing page. ```md {5} --- # src/content/docs/index.md title: Empty Page template: blank --- ```
-
The advantage of documenting the new template there is that we can then just link to it from the changeset and we don't need to document all those details in the changeset, like my suggestion.
With these changes, I think the PR looks pretty solid, and we can wait for maintainers to look at your proposal 👍

Description
This pull request, adds a simple new page template called
blankthat allows the end-user to fully customize what's rendered in theContentPanelwithout having to worry about CSS hacks to hide things like thePageTitlewhich are present in thesplashtemplate. For more information see #3906Additionally, it refactors a small section in the
Page.astrothat handles conditional rendering for pages with a hero image. Hopefully it improves visibility and maintainability in comparison to the previous version.This pull request does not impact the default Starlight look.