mirror of
https://github.com/jimeh/commonflow.org.git
synced 2026-02-19 05:46:40 +00:00
18 lines
519 B
Plaintext
18 lines
519 B
Plaintext
---
|
|
import { getCollection } from "astro:content";
|
|
|
|
import SpecLayout from "../layouts/SpecLayout.astro";
|
|
import { getVersionInfo } from "../utils/versions";
|
|
|
|
// Get version info and render the current/latest version
|
|
const { versions, currentVersion } = await getVersionInfo();
|
|
const specs = await getCollection("spec");
|
|
const spec = specs.find((s) => s.data.version === currentVersion);
|
|
|
|
if (!spec) {
|
|
throw new Error(`Spec version ${currentVersion} not found`);
|
|
}
|
|
---
|
|
|
|
<SpecLayout spec={spec} versions={versions} />
|