Skip to content

feat: add blank template#3907

Open
steveiliop56 wants to merge 3 commits into
withastro:mainfrom
steveiliop56:feat/blank-page
Open

feat: add blank template#3907
steveiliop56 wants to merge 3 commits into
withastro:mainfrom
steveiliop56:feat/blank-page

Conversation

@steveiliop56
Copy link
Copy Markdown

Description

This pull request, adds a simple new page template called blank that allows the end-user to fully customize what's rendered in the ContentPanel without having to worry about CSS hacks to hide things like the PageTitle which are present in the splash template. For more information see #3906

Additionally, it refactors a small section in the Page.astro that 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.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 17, 2026

🦋 Changeset detected

Latest commit: 732b82f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@astrojs/starlight Minor

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

@netlify
Copy link
Copy Markdown

netlify Bot commented May 17, 2026

Deploy Preview for astro-starlight ready!

Name Link
🔨 Latest commit 732b82f
🔍 Latest deploy log https://app.netlify.com/projects/astro-starlight/deploys/6a09ab38da00fd0008182718
😎 Deploy Preview https://deploy-preview-3907--astro-starlight.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 100 (no change from production)
Accessibility: 100 (no change from production)
Best Practices: 100 (no change from production)
SEO: 100 (no change from production)
PWA: -
View the detailed breakdown and full score reports
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions github-actions Bot added 📚 docs Documentation website changes 🌟 core Changes to Starlight’s main package labels May 17, 2026
@astrobot-houston
Copy link
Copy Markdown
Contributor

Hello! Thank you for opening your first PR to Starlight! ✨

Here’s what will happen next:

  1. Our GitHub bots will run to check your changes.
    If they spot any issues you will see some error messages on this PR.
    Don’t hesitate to ask any questions if you’re not sure what these mean!

  2. In a few minutes, you’ll be able to see a preview of your changes on Netlify 🤩

  3. One or more of our maintainers will take a look and may ask you to make changes.
    We try to be responsive, but don’t worry if this takes a few days.

@astrobot-houston
Copy link
Copy Markdown
Contributor

astrobot-houston commented May 17, 2026

Lunaria Status Overview

🌕 This pull request will trigger status changes.

Learn more

By default, every PR changing files present in the Lunaria configuration's files property will be considered and trigger status changes accordingly.

You can change this by adding one of the keywords present in the ignoreKeywords property in your Lunaria configuration file in the PR's title (ignoring all files) or by including a tracker directive in the merged commit's description.

Tracked Files

Locale File Note
en guides/customization.mdx Source changed, localizations will be marked as outdated.
en reference/frontmatter.md Source changed, localizations will be marked as outdated.
Warnings reference
Icon Description
🔄️ The source for this localization has been updated since the creation of this pull request, make sure all changes in the source have been applied.

Copy link
Copy Markdown
Contributor

@trueberryless trueberryless left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this amazing first time contribution 🥳

Overall the changes look good, I would just like to point out some docs changes:

  1. 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
    ---
    ```
  2. 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 👍

Comment thread .changeset/tricky-wings-sit.md Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🌟 core Changes to Starlight’s main package 📚 docs Documentation website changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants