refactor(spec): move spec page rendering to dedicated layout

This commit is contained in:
2026-01-11 01:53:24 +00:00
parent 88a8ba2f28
commit 9f1af55602
4 changed files with 36 additions and 13 deletions

View File

@@ -3,13 +3,13 @@ import type { CollectionEntry } from "astro:content";
import * as fs from "node:fs";
import * as path from "node:path";
import BaseLayout from "../layouts/BaseLayout.astro";
import Header from "./Header.astro";
import Hero from "./Hero.astro";
import AboutSection from "./AboutSection.astro";
import SpecSection from "./SpecSection.astro";
import FAQSection from "./FAQSection.astro";
import Footer from "./Footer.astro";
import BaseLayout from "./BaseLayout.astro";
import Header from "../components/Header.astro";
import Hero from "../components/Hero.astro";
import AboutSection from "../components/AboutSection.astro";
import SpecSection from "../components/SpecSection.astro";
import FAQSection from "../components/FAQSection.astro";
import Footer from "../components/Footer.astro";
import { parseSpecContent } from "../utils/parseSpecContent";
interface Props {

View File

@@ -1,7 +1,7 @@
---
import { getCollection } from "astro:content";
import SpecPage from "../components/SpecPage.astro";
import SpecLayout from "../layouts/SpecLayout.astro";
import { config } from "../config";
// Render the current/latest version
@@ -14,4 +14,4 @@ if (!spec) {
}
---
<SpecPage spec={spec} />
<SpecLayout spec={spec} />

View File

@@ -1,7 +1,7 @@
---
import { getCollection } from "astro:content";
import SpecPage from "../../components/SpecPage.astro";
import SpecLayout from "../../layouts/SpecLayout.astro";
export async function getStaticPaths() {
const specs = await getCollection("spec");
@@ -14,4 +14,4 @@ export async function getStaticPaths() {
const { spec } = Astro.props;
---
<SpecPage spec={spec} />
<SpecLayout spec={spec} />