Skip to content

Commit 79e132b

Browse files
committed
Generate public guides for all plugins
1 parent 4418337 commit 79e132b

60 files changed

Lines changed: 4231 additions & 91 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

astro.config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export default defineConfig({
2929
{ slug: 'player-guides/commands' },
3030
{ slug: 'player-guides/features' },
3131
{
32-
label: 'Plugin Player Guides',
32+
label: 'Plugin Guides',
3333
items: [{ autogenerate: { directory: 'player-guides/plugins' } }],
3434
},
3535
],

scripts/generate-site-content.mjs

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -958,6 +958,7 @@ function groupedLists(plugins) {
958958
const pluginMarkdown = await readFile(pluginReadme, 'utf8');
959959
const plugins = parsePlugins(pluginMarkdown);
960960
const playerPlugins = plugins.filter((plugin) => plugin.category === 'Player Fun');
961+
const guidePlugins = plugins.filter((plugin) => plugin.file !== 'hoppers-roadmap.md');
961962
const pluginDetails = new Map();
962963
const commandIndexRows = [];
963964

@@ -967,7 +968,7 @@ await mkdir(path.join(contentRoot, 'staff-reference'), { recursive: true });
967968
await rm(pluginGuideRoot, { recursive: true, force: true });
968969
await mkdir(pluginGuideRoot, { recursive: true });
969970

970-
for (const plugin of playerPlugins) {
971+
for (const plugin of guidePlugins) {
971972
const slug = slugFromFile(plugin.file);
972973
const override = PLAYER_GUIDE_OVERRIDES[slug] ?? {};
973974
const markdown = await readFile(path.join(docsRoot, 'plugins', plugin.file), 'utf8');
@@ -990,11 +991,11 @@ for (const plugin of playerPlugins) {
990991
}
991992

992993
await writeFile(path.join(pluginGuideRoot, `${slug}.mdx`), `---
993-
title: ${plugin.name} Player Guide
994-
description: Learn what ${plugin.name} does, how to use it, and which player commands are available.
994+
title: ${plugin.name} Guide
995+
description: Learn what ${plugin.name} does, how to use it, and which public commands are available.
995996
---
996997
997-
This page introduces ${escapeHtml(plugin.name)} from a player point of view. It focuses on what you can do in-game, how to get started, and which commands are useful when the feature is available to you.
998+
This page introduces ${escapeHtml(plugin.name)} from a public server-docs point of view. It focuses on what the feature does in-game, how to get started when you have access, and which commands are useful.
998999
9991000
## What It Does
10001001
@@ -1031,13 +1032,13 @@ The [full synced ${plugin.name} reference](${publicRepoBlob}/project-docs/docs/p
10311032
}
10321033

10331034
await writeFile(path.join(pluginGuideRoot, 'index.mdx'), `---
1034-
title: Plugin Player Guides
1035-
description: Friendly player guides for 1MoreBlock plugin features.
1035+
title: Plugin Guides
1036+
description: Friendly public guides for 1MoreBlock plugin features.
10361037
---
10371038
1038-
Each page introduces a feature in normal player language, then shows useful commands and examples you can try when you have access.
1039+
Each page introduces a feature in normal server language, then shows useful commands and examples you can try when you have access.
10391040
1040-
${pluginTable(playerPlugins, pluginDetails, './')}
1041+
${pluginTable(guidePlugins, pluginDetails, './')}
10411042
`);
10421043

10431044
await writeFile(path.join(contentRoot, 'index.mdx'), `---
@@ -1054,7 +1055,7 @@ This site explains the player-facing features, commands, and server systems that
10541055
- [Getting started](./player-guides/getting-started/) gives players a friendly overview.
10551056
- [Common player commands](./player-guides/commands/) lists useful commands and what they are for.
10561057
- [Feature overview](./player-guides/features/) summarizes the player-facing plugin features.
1057-
- [Plugin player guides](./player-guides/plugins/) explain each feature, how to use it, commands, and examples.
1058+
- [Plugin guides](./player-guides/plugins/) explain each feature, how to use it, commands, and examples.
10581059
- [Staff reference](./staff-reference/) links to the raw synced documentation for deeper staff review.
10591060
10601061
## Public URL
@@ -1099,7 +1100,7 @@ Commands can be permission-based. This list explains what common commands are me
10991100
11001101
${commandTable(PLAYER_COMMANDS)}
11011102
1102-
For the fuller introduction to each feature, open the [plugin player guides](../plugins/). Those pages explain what each feature does before listing commands.
1103+
For the fuller introduction to each feature, open the [plugin guides](../plugins/). Those pages explain what each feature does before listing commands.
11031104
11041105
## All Listed Player Commands
11051106

src/content/docs/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ This site explains the player-facing features, commands, and server systems that
1212
- [Getting started](./player-guides/getting-started/) gives players a friendly overview.
1313
- [Common player commands](./player-guides/commands/) lists useful commands and what they are for.
1414
- [Feature overview](./player-guides/features/) summarizes the player-facing plugin features.
15-
- [Plugin player guides](./player-guides/plugins/) explain each feature, how to use it, commands, and examples.
15+
- [Plugin guides](./player-guides/plugins/) explain each feature, how to use it, commands, and examples.
1616
- [Staff reference](./staff-reference/) links to the raw synced documentation for deeper staff review.
1717

1818
## Public URL

0 commit comments

Comments
 (0)