Added sitemap, with filtering of disabled pages, removal of content from disabled pages, robots.txt generation pointing to the sitemap, adjustment of the Navbar generation to ignore disabled entries, e2e check for all pages including a non-blank title, content for body mods page
This commit is contained in:
@@ -4,26 +4,33 @@ import '@styles/global.css'
|
||||
import Navbar from '@components/Navbar.astro';
|
||||
import Footer from '@components/Footer.astro';
|
||||
|
||||
import {pathToMetadata} from "@data/site-layout.ts";
|
||||
|
||||
|
||||
const pageTitle = Astro.props.title ? `${Astro.props.title} - Corwin Perren` : "Corwin Perren";
|
||||
const showTitle = Astro.props.showTitle ?? true;
|
||||
const pageEnabled = pathToMetadata(Astro.url.pathname).enabled ?? true;
|
||||
---
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8"/>
|
||||
<link rel="icon" href="/favicon-solid.png" type="image/png"/>
|
||||
<link rel="sitemap" href="/sitemap-index.xml"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
<title>{pageTitle}</title>
|
||||
<title>{pageEnabled ? pageTitle : "Corwin Perren"}</title>
|
||||
</head>
|
||||
<body class="bg-black text-white">
|
||||
<Navbar/>
|
||||
<main class="mx-6 mt-6 mb-14">
|
||||
{(Astro.props.title) && (
|
||||
{(Astro.props.title && showTitle && pageEnabled) && (
|
||||
<h1 class="font-extrabold md:text-3xl md:mb-6">{Astro.props.title}</h1>
|
||||
)}
|
||||
<slot/>
|
||||
{pageEnabled && (
|
||||
<slot/>
|
||||
)}
|
||||
</main>
|
||||
<Footer/>
|
||||
<script src="../scripts/main.ts"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user