Skip to content
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

Add support for draft documentation pages #1613

Merged
merged 13 commits into from Apr 30, 2024
Merged

Conversation

HiDeoo
Copy link
Member

@HiDeoo HiDeoo commented Mar 8, 2024

What kind of changes does this PR include?

  • Changes or translations of Starlight docs site content
  • Changes to Starlight code

Description

This PR adds a new draft frontmatter option to exclude a page from production builds.

During development, draft pages can be accessed but a new notice will be displayed at the top of the page.

image

Copy link

changeset-bot bot commented Mar 8, 2024

🦋 Changeset detected

Latest commit: 8fef3f2

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

Copy link

vercel bot commented Mar 8, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
starlight ✅ Ready (Inspect) Visit Preview Apr 30, 2024 3:14pm

@github-actions github-actions bot added 📚 docs Documentation website changes 🌟 core Changes to Starlight’s main package labels Mar 8, 2024
@@ -105,6 +105,7 @@ The following properties differ from Markdown frontmatter:
- The [`slug`](/reference/frontmatter/#slug) property is not supported and is automatically set based on the custom page’s URL.
- The [`editUrl`](/reference/frontmatter/#editurl) option requires a URL to display an edit link.
- The [`sidebar`](/reference/frontmatter/#sidebar) frontmatter property for customizing how the page appears in [autogenerated link groups](/reference/configuration/#sidebar) is not available. Pages using the `<StarlightPage />` component are not part of a collection and cannot be added to an autogenerated sidebar group.
- The [`draft`](/reference/frontmatter/#draft) option only displays a [notice](/reference/overrides/#draftcontentnotice) that the page is a draft but does not automatically exclude it from production builds.
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this correct or should it read like this:

Suggested change
- The [`draft`](/reference/frontmatter/#draft) option only displays a [notice](/reference/overrides/#draftcontentnotice) that the page is a draft but does not automatically exclude it from production builds.
- The [`draft`](/reference/frontmatter/#draft) option displays a [notice](/reference/overrides/#draftcontentnotice) that the page is a draft and will not be included in production builds.

Copy link
Member Author

Choose a reason for hiding this comment

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

This is actually correct in this specific section as we are talking about custom pages automatically injected by a plugin for example so it would be up to the plugin to make sure the page is not injected when not needed.

Altho, this may also be poorly worded as I'm the one who wrote it so may need some tweaking ^^

HiDeoo and others added 2 commits April 5, 2024 18:33
Co-authored-by: Luiz Ferraz <luiz@lferraz.com>
Co-authored-by: liruifengv <liruifeng1024@gmail.com>
* main: (111 commits)
  Fix various Expressive Code translation issues (withastro#1708)
  Fix nested aside title rendering issue (withastro#1703)
  I18n(pt-PT): Add resources pages (withastro#1678)
  Add SST Ion & Font Awesome to site showcase (withastro#1710)
  [ci] format
  Add SudoVanilla to showcase (withastro#1702)
  i18n(fr): Update `resources-showcase` (withastro#1697)
  [i18nIgnore] docs: update `starlight-links-validator` to version `0.7.1` (withastro#1696)
  [ci] format
  [ci] release (withastro#1688)
  [ci] format
  Update Russian translation (withastro#1616)
  [ci] format
  Adds `starlight` icon to Starlight (withastro#1698)
  Update Icons.ts with Farcaster Purple for SocialIcons (withastro#1622)
  Remove duplicate from showcase example in `contributing.md` (withastro#1692)
  i18n(zh-cn): Update `showcase.mdx` (withastro#1689)
  [ci] format
  i18n(zh-cn): Update configuration.mdx (withastro#1691)
  i18n(ko-KR): update `showcase.mdx` (withastro#1690)
  ...
Copy link
Member

@delucis delucis left a comment

Choose a reason for hiding this comment

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

This looks great @HiDeoo! Left a tiny it on the docs, but no major comments from me 🎉

docs/src/content/docs/reference/frontmatter.md Outdated Show resolved Hide resolved
@delucis delucis added the 🌟 minor Change that triggers a minor release label Apr 30, 2024
HiDeoo and others added 2 commits April 30, 2024 14:00
* main: (63 commits)
  Add translation for copy button (withastro#1788)
  Update astro-expressive-code (withastro#1720)
  Fix type inference for extended i18n schemas (withastro#1786)
  Fix TypeScript schema error when using project references (withastro#1777)
  Update fa.json (withastro#1793)
  i18n(fr): update `resources/community-content.mdx` (withastro#1795)
  [ci] format
  i18n(ko-KR): update `community-content.mdx` (withastro#1794)
  [ci] format
  Adds Starlight in Next.js project video (withastro#1789)
  [ci] format
  i18n(ru): update translations (withastro#1783)
  i18n(id): Update getting-started.mdx (withastro#1778)
  Upgrade Lunaria and add Action (withastro#1768)
  [ci] format
  i18n(es): update `sidebar` (withastro#1767)
  i18n(pt-br): Update `getting-started.mdx` (withastro#1776)
  i18n(es): update `configuration` (withastro#1766)
  [ci] format
  Add TrueCharts to showcases (withastro#1773)
  ...
Co-authored-by: Chris Swithinbank <357379+delucis@users.noreply.github.com>
@astrobot-houston
Copy link
Collaborator

astrobot-houston commented Apr 30, 2024

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/pages.mdx Source changed, localizations will be marked as outdated.
en reference/frontmatter.md Source changed, localizations will be marked as outdated.
en reference/overrides.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.

@delucis delucis merged commit 61493e5 into withastro:main Apr 30, 2024
10 checks passed
@astrobot-houston astrobot-houston mentioned this pull request Apr 30, 2024
@HiDeoo HiDeoo mentioned this pull request May 3, 2024
liruifengv added a commit to liruifengv/starlight that referenced this pull request May 7, 2024
HiDeoo added a commit that referenced this pull request May 8, 2024
Co-authored-by: HiDeoo <494699+HiDeoo@users.noreply.github.com>
Co-authored-by: huyikai <25839948+huyikai@users.noreply.github.com>
HiDeoo added a commit to HiDeoo/starlight that referenced this pull request May 8, 2024
* main:
  i18n(zh-cn): Update docs about synced-tabs (withastro#1834)
  i18n(zh-cn): Update some docs about withastro#1620 & withastro#1613 (withastro#1835)
  Add more diagnostic help to error messages thrown by `<Steps>` (withastro#1838)
  i18n(zh-cn): Update components.mdx (withastro#1836)
  i18n(zh-cn): Update community-content.mdx (withastro#1833)
  Improve type checking job (withastro#1831)
  [ci] format
  [ci] release (withastro#1832)
  i18n(ru): update ru.json (withastro#1826)
  Fix `<Tabs>` sync issue with inconsistent use of `icon` on `<TabItem>` components (withastro#1811)
  Enable `BASE_URL` tests (withastro#1828)
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 🌟 minor Change that triggers a minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants