Migrate documentation site to Astro
This commit is contained in:
@@ -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/');
|
||||
---
|
||||
@@ -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>
|
||||
Reference in New Issue
Block a user