From ed4ab4618d71ebcdbe3b899135a3d298b73ae690 Mon Sep 17 00:00:00 2001 From: Chris Williams Date: Wed, 28 Aug 2024 09:26:59 +0100 Subject: [PATCH 1/2] rename blog/Hero.astro to blog/Masthead.astro --- README.md | 2 +- src/components/blog/{Hero.astro => Masthead.astro} | 5 ++--- src/layouts/BlogPost.astro | 4 ++-- 3 files changed, 5 insertions(+), 6 deletions(-) rename src/components/blog/{Hero.astro => Masthead.astro} (92%) diff --git a/README.md b/README.md index b2442529a..b477a4388 100644 --- a/README.md +++ b/README.md @@ -135,7 +135,7 @@ This integration brings a static search feature for searching blog posts. In its Search results only includes blog posts. If you would like to include other/all your pages, remove/re-locate the attribute `data-pagefind-body` to the article tag found in `src/layouts/BlogPost.astro`. -It also allows you to filter posts by tags added in the frontmatter of blog posts. If you would rather remove this, remove the data attribute `data-pagefind-filter="tag"` from the link in `src/components/blog/Hero.astro`. +It also allows you to filter posts by tags added in the frontmatter of blog posts. If you would rather remove this, remove the data attribute `data-pagefind-filter="tag"` from the link in `src/components/blog/Masthead.astro`. If you would rather not include this integration, simply remove the component `src/components/Search.astro`, and uninstall both `@pagefind/default-ui` & `pagefind` from package.json. You will also need to remove the postbuild script from here as well. diff --git a/src/components/blog/Hero.astro b/src/components/blog/Masthead.astro similarity index 92% rename from src/components/blog/Hero.astro rename to src/components/blog/Masthead.astro index 9ca963d52..20cf53832 100644 --- a/src/components/blog/Hero.astro +++ b/src/components/blog/Masthead.astro @@ -42,9 +42,8 @@ const dateTimeOptions: Intl.DateTimeFormatOptions = {

{ data.updatedDate && ( - - Last Updated: - + + Updated: ) } diff --git a/src/layouts/BlogPost.astro b/src/layouts/BlogPost.astro index 0eae9f5aa..8a39b416b 100644 --- a/src/layouts/BlogPost.astro +++ b/src/layouts/BlogPost.astro @@ -1,7 +1,7 @@ --- import type { CollectionEntry } from "astro:content"; -import BlogHero from "@/components/blog/Hero.astro"; +import Masthead from "@/components/blog/Masthead.astro"; import TOC from "@/components/blog/TOC.astro"; import WebMentions from "@/components/blog/webmentions/index.astro"; @@ -25,7 +25,7 @@ const { headings } = await post.render();
{!!headings.length && }
-
+
From 60ed040175ccfbc9040e911f3a69a1acc0cdae83 Mon Sep 17 00:00:00 2001 From: Chris Williams Date: Wed, 28 Aug 2024 09:29:28 +0100 Subject: [PATCH 2/2] fix whitespace, update intro --- src/components/FormattedDate.astro | 4 +--- src/components/SocialList.astro | 4 ++-- src/pages/index.astro | 6 +++--- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/components/FormattedDate.astro b/src/components/FormattedDate.astro index bde2a4241..574d4ebed 100644 --- a/src/components/FormattedDate.astro +++ b/src/components/FormattedDate.astro @@ -12,6 +12,4 @@ const { date, dateTimeOptions, ...attrs } = Astro.props; const postDate = getFormattedDate(date, dateTimeOptions); --- - + diff --git a/src/components/SocialList.astro b/src/components/SocialList.astro index 73d92261e..c6b61a9bb 100644 --- a/src/components/SocialList.astro +++ b/src/components/SocialList.astro @@ -27,12 +27,12 @@ const socialLinks: { socialLinks.map(({ friendlyName, isWebmention, link, name }) => (
  • -
  • diff --git a/src/pages/index.astro b/src/pages/index.astro index ebfbf40d8..c1cedf2f3 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -56,9 +56,9 @@ const cactusTech: { desc: string; href: string; title: string }[] = [

    Hello World!

    - Hi, I’m a theme for Astro, an example of how you can use this starter to create a personal - blog. If you want to know more about how you can customise me, add more posts, and make it - your own, click on the github icon link below and it will take you to my repo. + Hi, I’m a theme for Astro, a simple starter that you can use to create your website or blog. + If you want to know more about how you can customise me, add more posts, and make it your own, + click on the GitHub icon link below and it will take you to my repo.