mirror of
https://github.com/nolen777/eagle0.git
synced 2026-07-28 21:35:42 +00:00
Add Bazel-built Eagle0pedia Starlight site (#8390)
This commit is contained in:
@@ -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
|
||||
#
|
||||
|
||||
Generated
+508
-55
File diff suppressed because one or more lines are too long
@@ -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",
|
||||
)
|
||||
@@ -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.
|
||||
@@ -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",
|
||||
},
|
||||
],
|
||||
}),
|
||||
],
|
||||
});
|
||||
@@ -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": []
|
||||
}
|
||||
}
|
||||
Generated
+4378
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,6 @@
|
||||
import { defineCollection } from "astro:content";
|
||||
import { docsSchema } from "@astrojs/starlight/schema";
|
||||
|
||||
export const collections = {
|
||||
docs: defineCollection({ schema: docsSchema() }),
|
||||
};
|
||||
+5
@@ -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
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
import "../node_modules/astro/astro.js";
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"extends": "astro/tsconfigs/strict"
|
||||
}
|
||||
Reference in New Issue
Block a user