Add Bazel-built Eagle0pedia Starlight site (#8390)

This commit is contained in:
2026-07-09 22:04:49 -07:00
committed by GitHub
parent fb34a6f3d1
commit caca9e4f6a
12 changed files with 5051 additions and 57 deletions
+17
View File
@@ -29,6 +29,23 @@ bazel_dep(name = "rules_nodejs", version = "6.7.4")
bazel_dep(name = "rules_pkg", version = "1.2.0")
bazel_dep(name = "rules_shell", version = "0.8.0")
multiple_version_override(
module_name = "aspect_rules_js",
versions = [
"2.3.8",
"3.2.2",
],
)
npm = use_extension("@aspect_rules_js//npm:extensions.bzl", "npm")
npm.npm_translate_lock(
name = "eagle0pedia_npm",
pnpm_lock = "//docs/eagle0pedia:pnpm-lock.yaml",
run_lifecycle_hooks = False,
update_pnpm_lock = False,
)
use_repo(npm, "eagle0pedia_npm")
#
# Language Support - Scala
#
+508 -55
View File
File diff suppressed because one or more lines are too long
+44
View File
@@ -0,0 +1,44 @@
load("@aspect_rules_js//js:defs.bzl", "js_binary", "js_run_binary")
load("@eagle0pedia_npm//:defs.bzl", "npm_link_all_packages")
package(default_visibility = ["//visibility:public"])
exports_files([
"package.json",
"pnpm-lock.yaml",
])
npm_link_all_packages()
filegroup(
name = "site_sources",
srcs = glob([
"src/**",
"astro.config.mjs",
"package.json",
"tsconfig.json",
]),
)
js_binary(
name = "astro",
data = [
":node_modules",
],
entry_point = "tools/astro-cli.mjs",
)
js_run_binary(
name = "site",
srcs = [
":node_modules",
":site_sources",
],
args = ["build"],
chdir = package_name(),
env = {
"ASTRO_TELEMETRY_DISABLED": "1",
},
out_dirs = ["dist"],
tool = ":astro",
)
+29
View File
@@ -0,0 +1,29 @@
# Eagle0pedia Site
Eagle0pedia is a Starlight static site built through Bazel.
## Local Build
```bash
bazel build //docs/eagle0pedia:site
```
The generated site is written to:
```text
bazel-bin/docs/eagle0pedia/dist
```
## DigitalOcean App Platform
Use these settings for a static site app:
```text
Source directory: /
Build command: bazel build //docs/eagle0pedia:site
Output directory: bazel-bin/docs/eagle0pedia/dist
HTTP route: /
Domain: pedia.eagle0.net
```
The app should deploy from `main` after the pedia site changes are merged.
+31
View File
@@ -0,0 +1,31 @@
import { defineConfig } from "astro/config";
import starlight from "@astrojs/starlight";
export default defineConfig({
site: "https://pedia.eagle0.net",
integrations: [
starlight({
title: "Eagle0pedia",
description: "Reference guide for Eagle0 commands, systems, and game concepts.",
editLink: {
baseUrl: "https://github.com/nolen777/eagle0/edit/main/docs/eagle0pedia/src/content/docs/",
},
sidebar: [
{
label: "Reference",
items: [
{ label: "Eagle0pedia", slug: "" },
{ label: "Eagle Commands", slug: "commands" },
],
},
],
social: [
{
icon: "github",
label: "GitHub",
href: "https://github.com/nolen777/eagle0",
},
],
}),
],
});
+22
View File
@@ -0,0 +1,22 @@
{
"name": "eagle0pedia",
"version": "0.1.0",
"private": true,
"type": "module",
"scripts": {
"build": "astro build",
"dev": "astro dev",
"preview": "astro preview"
},
"dependencies": {
"@astrojs/starlight": "^0.36.0",
"astro": "^5.11.0",
"sharp": "^0.34.0"
},
"devDependencies": {
"typescript": "^5.8.0"
},
"pnpm": {
"onlyBuiltDependencies": []
}
}
+4378
View File
File diff suppressed because it is too large Load Diff
+6
View File
@@ -0,0 +1,6 @@
import { defineCollection } from "astro:content";
import { docsSchema } from "@astrojs/starlight/schema";
export const collections = {
docs: defineCollection({ schema: docsSchema() }),
};
@@ -1,3 +1,8 @@
---
title: Eagle Commands
description: Strategic command reference for Eagle command panels.
---
# Eagle Commands
Eagle commands are the strategic actions a faction can take from a province command panel. The server advertises available commands with `AvailableCommand`, and the client posts the matching `SelectedCommand`.
@@ -1,12 +1,17 @@
---
title: Eagle0pedia
description: Reference companion for Eagle0 commands, systems, and game concepts.
---
# Eagle0pedia
Eagle0pedia is the in-game reference companion for Eagle0. The tutorial answers "what should I do next?"; these pages answer "what does this mean?"
This first pass is plain Markdown so it can live close to the game data and be reviewed with code changes. A static site generator can later turn the same content into `pedia.eagle0.net`.
This Starlight site lives close to the game data and can be reviewed with code changes before being deployed to `pedia.eagle0.net`.
## Sections
- [Eagle commands](commands/index.md)
- [Eagle commands](commands/)
## Link Targets
+1
View File
@@ -0,0 +1 @@
import "../node_modules/astro/astro.js";
+3
View File
@@ -0,0 +1,3 @@
{
"extends": "astro/tsconfigs/strict"
}