Repository navigation
Merge the Community section into Docs #215
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
Open
ruben-arts
wants to merge
1
commit into
RoboStack:main
Choose a base branch
from
ruben-arts:docs-merge-community
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+141
−66
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,111 @@ | ||
| --- | ||
| import type { StarlightRouteData } from "@astrojs/starlight/route-data"; | ||
|
|
||
| /** | ||
| * The sidebar's link tree for the Sidebar override. Starlight's own | ||
| * SidebarSublist renders every group as a `<details>` toggle; here a group is | ||
| * a plain label over its links, so no section can be folded away. Badges and | ||
| * custom link attributes are not rendered: the sidebar config uses neither. | ||
| */ | ||
| interface Props { | ||
| entries: StarlightRouteData["sidebar"]; | ||
| nested?: boolean; | ||
| } | ||
|
|
||
| const { entries, nested } = Astro.props; | ||
| --- | ||
|
|
||
| <ul class:list={{ "top-level": !nested }}> | ||
| {entries.map((entry) => ( | ||
| <li> | ||
| {entry.type === "link" ? ( | ||
| <a | ||
| href={entry.href} | ||
| aria-current={entry.isCurrent ? "page" : undefined} | ||
| class:list={{ large: !nested }} | ||
| > | ||
| {entry.label} | ||
| </a> | ||
| ) : ( | ||
| <Fragment> | ||
| <span class="group-label large">{entry.label}</span> | ||
| <Astro.self entries={entry.entries} nested /> | ||
| </Fragment> | ||
| )} | ||
| </li> | ||
| ))} | ||
| </ul> | ||
|
|
||
| {/* Copied from Starlight's SidebarSublist.astro, minus the summary and caret | ||
| rules, and kept in its cascade layer so the result looks the same. The | ||
| group label takes the padding the summary had, and nested lists indent | ||
| half as far as Starlight's. */} | ||
| <style> | ||
| @layer starlight.core { | ||
| ul { | ||
| --sl-sidebar-item-padding-inline: 0.5rem; | ||
| list-style: none; | ||
| padding: 0; | ||
| } | ||
|
|
||
| li { | ||
| overflow-wrap: anywhere; | ||
| } | ||
|
|
||
| ul ul li { | ||
| margin-inline-start: calc(var(--sl-sidebar-item-padding-inline) / 2); | ||
| border-inline-start: 1px solid var(--sl-color-hairline-light); | ||
| padding-inline-start: calc(var(--sl-sidebar-item-padding-inline) / 2); | ||
| } | ||
|
|
||
| .large { | ||
| font-size: var(--sl-text-lg); | ||
| font-weight: 600; | ||
| color: var(--sl-color-white); | ||
| } | ||
|
|
||
| .top-level > li + li { | ||
| margin-top: 0.75rem; | ||
| } | ||
|
|
||
| .group-label { | ||
| display: block; | ||
| padding: 0.2em var(--sl-sidebar-item-padding-inline); | ||
| line-height: 1.4; | ||
| } | ||
|
|
||
| a { | ||
| display: block; | ||
| border-radius: 0.25rem; | ||
| text-decoration: none; | ||
| color: var(--sl-color-gray-2); | ||
| padding: 0.3em var(--sl-sidebar-item-padding-inline); | ||
| line-height: 1.4; | ||
| } | ||
|
|
||
| a:hover, | ||
| a:focus { | ||
| color: var(--sl-color-white); | ||
| } | ||
|
|
||
| [aria-current="page"], | ||
| [aria-current="page"]:hover, | ||
| [aria-current="page"]:focus { | ||
| font-weight: 600; | ||
| color: var(--sl-color-text-invert); | ||
| background-color: var(--sl-color-text-accent); | ||
| } | ||
|
|
||
| @media (min-width: 50rem) { | ||
| .top-level > li + li { | ||
| margin-top: 0.5rem; | ||
| } | ||
| .large { | ||
| font-size: var(--sl-text-base); | ||
| } | ||
| a { | ||
| font-size: var(--sl-text-sm); | ||
| } | ||
| } | ||
| } | ||
| </style> | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| /* Starlight's internals import `virtual:starlight/*` modules that only exist | ||
| * inside Astro's runtime. svelte-check follows the import chain from | ||
| * routeData.ts into them and cannot resolve the specifiers, so declare them. */ | ||
| /* The component overrides import `virtual:starlight/*` modules that only | ||
| * exist inside Astro's runtime. The type checkers cannot resolve the | ||
| * specifiers, so declare them. */ | ||
| declare module "virtual:starlight/*"; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I can see the purpose of this is to add another level of nesting to the sidebar. I don't think that is worth vendoring yet another starlight component