Add site landing page

This commit is contained in:
2026-07-09 02:55:50 +09:00
parent 6d80c66144
commit 871d342e15
3 changed files with 166 additions and 7 deletions
+62 -1
View File
@@ -1,3 +1,64 @@
---
return Astro.redirect('/docs/introduction/');
import ManualLayout from '../layouts/ManualLayout.astro';
const example = `Port = Int >= 1 & <= 65535 default 8080;
Server = {
host = String default "localhost";
port = Port;
};
Production = Server & {
host = "example.com";
};`;
---
<ManualLayout title="Decodal" frontpage>
<section class="hero">
<p class="eyebrow">Lazy configuration and schema language</p>
<h1>Decodal keeps configuration, constraints, and defaults in one composable value.</h1>
<p class="hero-copy">
Define structured data with constraints, compose it with patches, and materialize the result from Rust,
WebAssembly, or the browser playground.
</p>
<div class="hero-actions">
<a class="button primary" href="/playground/">Try the playground</a>
<a class="button secondary" href="/docs/introduction/">Read the manual</a>
</div>
</section>
<section class="home-grid" aria-label="Decodal overview">
<article class="home-card">
<h2>What it is</h2>
<p>
Decodal is a small data language for configuration shapes that need validation, defaults,
lazy imports, and predictable composition.
</p>
</article>
<article class="home-card">
<h2>Where it runs</h2>
<p>
Use the Rust crate for runtime embedding, the WASM package in browsers, CodeMirror/Lezer for the Web editor,
and Tree-sitter for general editor integration.
</p>
</article>
<article class="home-card">
<h2>Start here</h2>
<p>
Open the playground to run examples in your browser, or read the components page to see how the runtime and
editor pieces fit together.
</p>
<p><a href="/docs/components/">View components →</a></p>
</article>
</section>
<section class="home-example" aria-label="Decodal example">
<div>
<h2>A compact example</h2>
<p>
Constraints and defaults are values. Compose them with concrete data and materialize when the host knows what
output shape it expects.
</p>
</div>
<pre><code>{example}</code></pre>
</section>
</ManualLayout>