Skip to content

Commit 6f952d7

Browse files
committed
chore: remove Sidebar override, typos.toml exemptions -> comment fencing
1 parent 09e1a6a commit 6f952d7

File tree

6 files changed

+26
-19
lines changed

6 files changed

+26
-19
lines changed

.typos.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ extend-exclude = [
55

66
[default]
77
locale = "en-us"
8-
extend-ignore-identifiers-re = [
9-
"Prioritised[A-Z][a-z]\\w+" # allow canadian spelling in code, e.g. PrioritisedTask, PrioritisedThreadedTaskQueue...
8+
extend-ignore-re = [
9+
# {/* spellchecker:<on|off> */}
10+
"(?s)\\{/\\*\\s*spellchecker:off\\s*\\*/\\}.*?\\n\\s*\\{/\\*\\s*spellchecker:on\\s*\\*/\\}"
1011
]
1112

1213
[default.extend-identifiers]

astro.config.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,16 @@ export default defineConfig({
5050
components: {
5151
Head: "./src/components/overrides/Head.astro",
5252
SiteTitle: "./src/components/overrides/SiteTitle.astro",
53-
Sidebar: "./src/components/overrides/Sidebar.astro",
5453
PageFrame: "./src/components/overrides/PageFrame.astro",
5554
Footer: "./src/components/overrides/Footer.astro",
5655
LastUpdated: "./src/components/overrides/LastUpdated.astro",
5756
Banner: "./src/components/overrides/Banner.astro",
5857
TableOfContents: "./src/components/overrides/TableOfContents.astro",
5958
MobileTableOfContents: "./src/components/overrides/MobileTableOfContents.astro",
6059
SocialIcons: "./src/components/overrides/SocialIcons.astro",
60+
// stop starlight-sidebar-topics from having its component there
61+
// we override the topics with our dropdown in PageFrame
62+
Sidebar: "@astrojs/starlight/components/Sidebar.astro",
6163
},
6264
plugins: [
6365
starlightLinksValidator({

src/components/overrides/Footer.astro

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { Icon } from "@astrojs/starlight/components";
66
<Default><slot /></Default>
77
<div>
88
<p class="footer-item">
9-
Copyright © {new Date().getFullYear()} PaperMC and contributors. Built with <Icon name="starlight" />
9+
Copyright © {new Date().getFullYear()} PaperMC and contributors. Built with <Icon name="starlight" class="icon" />
1010
<a href="https://starlight.astro.build/" target="_blank">Starlight</a>.
1111
</p>
1212
<p class="footer-item muted">
@@ -24,6 +24,14 @@ import { Icon } from "@astrojs/starlight/components";
2424
margin-bottom: 0.25rem;
2525
}
2626

27+
.footer-item a:not(:hover) {
28+
text-decoration: none;
29+
}
30+
31+
.icon {
32+
color: var(--sl-color-orange);
33+
}
34+
2735
.muted {
2836
color: var(--sl-color-gray-3);
2937
}

src/components/overrides/PageFrame.astro

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,15 @@ const { hasSidebar } = Astro.locals.starlightRoute;
2525
<div class="main-frame"><slot /></div>
2626
</div>
2727

28+
<script>
29+
// scroll current page on sidebar into view
30+
window.addEventListener("load", () => {
31+
document
32+
.querySelector(`#starlight__sidebar a[aria-current="page"]`)
33+
?.scrollIntoView({ behavior: "smooth", block: "center" });
34+
});
35+
</script>
36+
2837
<style>
2938
.page {
3039
flex-direction: column;

src/components/overrides/Sidebar.astro

Lines changed: 0 additions & 15 deletions
This file was deleted.

src/content/docs/paper/admin/how-to/basic-troubleshooting.md renamed to src/content/docs/paper/admin/how-to/basic-troubleshooting.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ This may happen in two cases:
9090
2. `server-ip`, in `server.properties`, is configured incorrectly. Note that this option is not a placeholder for your external IP, it controls which network interfaces your server will bind to. Most of the time, it should be left empty.
9191

9292
### Attempted to load chunk saved with newer version
93+
{/* spellchecker:off */}
9394
```
9495
java.lang.RuntimeException: Server attempted to load chunk saved with newer version of minecraft! 3955 > 3465
9596
[18:23:38 WARN]: at net.minecraft.world.level.chunk.storage.ChunkRegionLoader.loadChunk(ChunkRegionLoader.java:149)
@@ -100,6 +101,7 @@ java.lang.RuntimeException: Server attempted to load chunk saved with newer vers
100101
[18:23:38 WARN]: at ca.spottedleaf.concurrentutil.executor.standard.PrioritisedThreadPool$PrioritisedThread.pollTasks(PrioritisedThreadPool.java:274)
101102
[18:23:38 WARN]: at ca.spottedleaf.concurrentutil.executor.standard.PrioritisedQueueExecutorThread.run(PrioritisedQueueExecutorThread.java:50)
102103
```
104+
{/* spellchecker:on */}
103105

104106
That error means that your world was created or opened in a server version that's newer than one you're currently running. Downgrading your world is not supported, so make sure to use the latest supported version of Paper. Even if you haven't joined the server, by loading your world in a newer version, it is upgraded automatically.
105107

0 commit comments

Comments
 (0)