mirror of
https://github.com/jimeh/commonflow.org.git
synced 2026-02-19 05:46:40 +00:00
refactor(spec): move spec page rendering to dedicated layout
This commit is contained in:
@@ -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 {
|
||||
@@ -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} />
|
||||
|
||||
@@ -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} />
|
||||
|
||||
Reference in New Issue
Block a user