Skip to content

Commit

Permalink
fix: add missing title and description meta tags
Browse files Browse the repository at this point in the history
  • Loading branch information
Goose97 committed Oct 5, 2024
1 parent 7ca5595 commit 6fbe702
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 25 deletions.
9 changes: 5 additions & 4 deletions src/layouts/Layout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,24 @@ import Favicon from '@components/Favicon.astro'
import '../styles/tailwind.base.css'
type Props = {
title: string
description: string
postTitle?: string
frontmatter?: Record<string, string>
stickyAsideId?: string
}
const { postTitle, frontmatter, stickyAsideId } = Astro.props
const { title, description, postTitle, stickyAsideId } = Astro.props
---

<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="description" content={frontmatter?.description} />
<meta name="description" content={description} />
<meta name="viewport" content="initial-scale=1.0, width=device-width" />
<Favicon />
<meta name="generator" content={Astro.generator} />
<title>{frontmatter?.title}</title>
<title>{title}</title>
</head>
<body class="px-4 md:px-8">
<main class="main" data-has-aside={Astro.slots.has("aside")}>
Expand Down
8 changes: 5 additions & 3 deletions src/pages/btree-under-a-microscope/basics.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
---
title: "B-Tree Under a Microscope - Part 1: The Basics"
description: "A deep dive into the B-Tree data structure: Learn everything from basic operations to variations and various optimizations."
---

import { Image } from 'astro:assets';
Expand All @@ -13,7 +11,11 @@ import ChapterLink from "@components/ChapterLink.astro";
import binarySearchTree from '@images/binary-search-tree.png';
import plainBtree from '@images/plain-btree.png';

<Layout stickyAsideId="sticky-aside">
<Layout
stickyAsideId="sticky-aside"
title="B-Tree Under a Microscope - Part 1: The Basics"
description="A deep dive into the B-Tree data structure: Learn everything
from basic operations to variations and various optimizations.">
<div slot="aside" id="sticky-aside" class="sticky mt-12">
<TableOfContents
headings={[
Expand Down
8 changes: 5 additions & 3 deletions src/pages/btree-under-a-microscope/databases.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
---
title: "B-Tree Under a Microscope - Part 2: Databases"
description: "A deep dive into the B-Tree data structure: Learn everything from basic operations to variations and various optimizations."
---

import { Image } from 'astro:assets';
Expand All @@ -13,7 +11,11 @@ import ChapterLink from "@components/ChapterLink.astro";
import slottedPage from '@images/slotted-page.png';
import slottedPageFragmentation from '@images/slotted-page-fragmentation.png';

<Layout stickyAsideId="sticky-aside">
<Layout
stickyAsideId="sticky-aside"
title="B-Tree Under a Microscope - Part 2: Databases"
description="A deep dive into the B-Tree data structure: Learn everything
from basic operations to variations and various optimizations.">
<div slot="aside" id="sticky-aside" class="sticky mt-12">
<TableOfContents
headings={[
Expand Down
13 changes: 7 additions & 6 deletions src/pages/btree-under-a-microscope/ending.mdx
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
---
layout: "@layouts/Layout.astro"
title: "B-Tree Under a Microscope - Ending"
description: "A deep dive into the B-Tree data structure: Learn everything from basic operations to variations and various optimizations."
---

import Layout from "@layouts/Layout.astro";

<Layout
title="B-Tree Under a Microscope - Ending"
description="A deep dive into the B-Tree data structure: Learn everything
from basic operations to variations and various optimizations.">
<h1 class="my-12">
<div class="text-4xl font-bold">Ending</div>
</h1>
Expand Down Expand Up @@ -97,6 +100,4 @@ If you are interested in learning more about B-Tree, here are some resources tha
</ul>
</li>
</ol>



</Layout>
9 changes: 6 additions & 3 deletions src/pages/btree-under-a-microscope/intro.mdx
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
---
title: "B-Tree Under a Microscope"
description: "A deep dive into the B-Tree data structure: Learn everything from basic operations to variations and various optimizations."
---

import Layout from "@layouts/Layout.astro";
import ChapterLink from "@components/ChapterLink.astro";

<Layout postTitle="B-Tree Under a Microscope">
<Layout
postTitle="B-Tree Under a Microscope"
stickyAsideId="sticky-aside"
title="B-Tree Under a Microscope"
description="A deep dive into the B-Tree data structure: Learn everything
from basic operations to variations and various optimizations.">
B-Tree features in every data structure textbook, and its presence spans across
different areas. It is dubbed "ubiquitous" just 8 years after its creation. I
first encountered B-Tree through working with database indexes, specifically
Expand Down
8 changes: 5 additions & 3 deletions src/pages/btree-under-a-microscope/optimizations.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
---
title: "B-Tree Under a Microscope - Part 4: Optimizations"
description: "A deep dive into the B-Tree data structure: Learn everything from basic operations to variations and various optimizations."
---

import { Image } from 'astro:assets';
Expand All @@ -12,7 +10,11 @@ import Callout from "@components/Callout.astro";
import ChapterLink from "@components/ChapterLink.astro";
import slottedPage from '@images/slotted-page.png';

<Layout stickyAsideId="sticky-aside">
<Layout
stickyAsideId="sticky-aside"
title="B-Tree Under a Microscope - Part 4: Optimizations"
description="A deep dive into the B-Tree data structure: Learn everything
from basic operations to variations and various optimizations.">
<div slot="aside" id="sticky-aside" class="sticky mt-12">
<TableOfContents
headings={[
Expand Down
8 changes: 5 additions & 3 deletions src/pages/btree-under-a-microscope/variations.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
---
title: "B-Tree Under a Microscope - Part 3: Variations"
description: "A deep dive into the B-Tree data structure: Learn everything from basic operations to variations and various optimizations."
---

import { Image } from 'astro:assets';
Expand All @@ -13,7 +11,11 @@ import bPlusTreeShape from '@images/b+-tree-shape.png';
import siblingPointers from '@images/sibling-pointers.png';
import bLinkTree from '@images/b-link-tree.png';

<Layout stickyAsideId="sticky-aside">
<Layout
stickyAsideId="sticky-aside"
title="B-Tree Under a Microscope - Part 3: Variations"
description="A deep dive into the B-Tree data structure: Learn everything
from basic operations to variations and various optimizations.">
<div slot="aside" id="sticky-aside" class="sticky mt-12">
<TableOfContents
headings={[
Expand Down

0 comments on commit 6fbe702

Please sign in to comment.