Migrate documentation site to Astro

This commit is contained in:
2026-06-17 00:22:32 +09:00
parent 4020b7c2d5
commit 0e873fbd51
19 changed files with 5494 additions and 325 deletions
@@ -0,0 +1,17 @@
---
import ManualLayout from '../../layouts/ManualLayout.astro';
import { allDocSlugs, renderMarkdown } from '../../lib/docs.js';
export function getStaticPaths() {
return allDocSlugs().map((slug) => ({
params: { slug },
props: { slug },
}));
}
const { slug } = Astro.props;
const html = renderMarkdown(slug);
---
<ManualLayout title={`Decodal - ${slug}`} active={slug}>
<article class="markdown" set:html={html} />
</ManualLayout>
@@ -0,0 +1,3 @@
---
return Astro.redirect('/docs/introduction/');
---
+3
View File
@@ -0,0 +1,3 @@
---
return Astro.redirect('/docs/introduction/');
---
@@ -0,0 +1,26 @@
---
import ManualLayout from '../layouts/ManualLayout.astro';
---
<ManualLayout title="Decodal Playground" playground>
<section class="playground-page">
<div class="playground-header">
<div>
<h1>Playground</h1>
<p>Evaluate Decodal directly in your browser through WebAssembly.</p>
</div>
<button id="run" disabled>Run</button>
</div>
<p id="status" class="status">Loading WASM...</p>
<div class="playground-grid">
<label class="pane">
<span>Input</span>
<textarea id="source" spellcheck="false"></textarea>
</label>
<section class="pane output-pane">
<span>Output</span>
<pre id="output"></pre>
</section>
</div>
</section>
<script type="module" src="../scripts/playground.js"></script>
</ManualLayout>