docs: set up Astro Starlight site for Read the Docs (#46)

This commit is contained in:
Fiereu authored and GitHub committed 2026-07-20 15:30:23 +02:00
1 parent dfb1eec557
commit 19eb9f371d
12 files changed
+6909 -23

No files matched your search

+3
View File
@@ -0,0 +1,3 @@
node_modules/
dist/
.astro/
+26
View File
@@ -0,0 +1,26 @@
// @ts-check
import { defineConfig } from "astro/config";
import starlight from "@astrojs/starlight";
const canonical = process.env.READTHEDOCS_CANONICAL_URL;
const url = canonical ? new URL(canonical) : undefined;
export default defineConfig({
site: url?.origin,
base: url?.pathname,
integrations: [
starlight({
title: "OpenMMO",
social: [
{
icon: "github",
label: "GitHub",
href: "https://github.com/openmmo-org/OpenMMO",
},
],
sidebar: [
{ label: "Guides", items: [{ autogenerate: { directory: "guides" } }] },
],
}),
],
});
-6
View File
@@ -1,6 +0,0 @@
# Guides
How-to guides for working on OpenMMO.
- [Writing a code generator](writing-generators.md): how to add a new build-time
generator that turns pret decomp data into Kotlin game data.
-10
View File
@@ -1,10 +0,0 @@
# OpenMMO documentation
Welcome to the OpenMMO docs. This is the starting point for understanding how the
project is built and how to work on it.
## Sections
- [Guides](guides/index.md): step-by-step how-tos for common tasks.
More sections will be added over time.
+6821
View File
File diff suppressed because it is too large. Load diff
+16
View File
@@ -0,0 +1,16 @@
{
"name": "openmmo-docs",
"type": "module",
"version": "0.0.1",
"private": true,
"scripts": {
"dev": "astro dev",
"build": "astro build",
"preview": "astro preview"
},
"dependencies": {
"@astrojs/starlight": "^0.41.3",
"astro": "^7.1.2",
"sharp": "^0.35.3"
}
}
+7
View File
@@ -0,0 +1,7 @@
import { defineCollection } from "astro:content";
import { docsLoader } from "@astrojs/starlight/loaders";
import { docsSchema } from "@astrojs/starlight/schema";
export const collections = {
docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }),
};
+9
View File
@@ -0,0 +1,9 @@
---
title: Guides
description: How-to guides for working on OpenMMO.
---
How-to guides for working on OpenMMO.
- [Writing a code generator](writing-generators/): how to add a new
build-time generator that turns pret decomp data into Kotlin game data.
@@ -1,4 +1,7 @@
# Writing a code generator
---
title: Writing a code generator
description: How to add a new build-time generator that turns pret decomp data into Kotlin game data.
---
OpenMMO builds most of its game data (maps, moves, species, …) at compile time.
The `:codegen` module reads the raw data files from the pret decomps under
+13
View File
@@ -0,0 +1,13 @@
---
title: OpenMMO documentation
description: The starting point for understanding how OpenMMO is built and how to work on it.
---
Welcome to the OpenMMO docs. This is the starting point for understanding how the
project is built and how to work on it.
## Sections
- [Guides](guides/): step-by-step how-tos for common tasks.
More sections will be added over time.
+5
View File
@@ -0,0 +1,5 @@
{
"extends": "astro/tsconfigs/strict",
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"]
}