feat: add Astro reference site and organize book contents
Reference site / build (push) Canceled after 0s

This commit is contained in:
2026-10-09 23:40:37 +09:00
parent 6086f3c5ef
commit 01c9498e6d
39 changed files with 7772 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
import './plugins/environment.mjs';
import { defineConfig } from 'astro/config';
import { unified } from '@astrojs/markdown-remark';
import documentLinks, { normalizeBase } from './plugins/document-links.mjs';
const base = normalizeBase(process.env.SITE_BASE || '/');
const site = process.env.SITE_URL || undefined;
if (site) {
const url = new URL(site);
if (!['http:', 'https:'].includes(url.protocol) || url.username || url.password || url.search || url.hash || url.pathname !== '/') {
throw new Error('SITE_URL must be an http(s) origin; use SITE_BASE for a path prefix');
}
}
export default defineConfig({
output: 'static',
site,
base,
trailingSlash: 'always',
markdown: {
processor: unified({ remarkPlugins: [[documentLinks, { base }]], smartypants: false }),
shikiConfig: { theme: 'github-light', langAlias: { wip: 'text' } },
},
});