diff --git a/src/components/Greeting.jsx b/src/components/Greeting.jsx index caf15ac..47f7e99 100644 --- a/src/components/Greeting.jsx +++ b/src/components/Greeting.jsx @@ -12,6 +12,7 @@ export default function Greeting({ messages }) { diff --git a/src/content.config.ts b/src/content.config.ts index a8e84d9..c173fb8 100644 --- a/src/content.config.ts +++ b/src/content.config.ts @@ -1,7 +1,7 @@ +// Import utilities from `astro:content` +import { defineCollection, z } from "astro:content"; // Import the glob loader import { glob } from "astro/loaders"; -// Import utilities from `astro:content` -import { z, defineCollection } from "astro:content"; // Define a `loader` and `schema` for each collection const blog = defineCollection({ loader: glob({ pattern: "**/[^_]*.md", base: "./src/blog" }), diff --git a/src/layouts/BaseLayout.astro b/src/layouts/BaseLayout.astro index 69f66d4..417b46c 100644 --- a/src/layouts/BaseLayout.astro +++ b/src/layouts/BaseLayout.astro @@ -1,7 +1,7 @@ --- -import NavHeader from "../components/NavHeader.astro"; import Favicon from "../components/Favicon.astro"; import Footer from "../components/Footer.astro"; +import NavHeader from "../components/NavHeader.astro"; import "../styles/aria.css"; import EmbedCode from "../components/EmbedCode.astro"; diff --git a/src/pages/blog.astro b/src/pages/blog.astro index 20b3f55..8e1162e 100644 --- a/src/pages/blog.astro +++ b/src/pages/blog.astro @@ -1,9 +1,9 @@ --- import { getCollection } from "astro:content"; -import BaseLayout from "../layouts/BaseLayout.astro"; import BlogEntry from "../components/BlogEntry.astro"; import Partition from "../components/Partition.astro"; +import BaseLayout from "../layouts/BaseLayout.astro"; const allPosts = await getCollection("blog"); const pageTitle = "Aria's blog"; diff --git a/src/pages/friends.astro b/src/pages/friends.astro index f9f982a..ac7f81c 100644 --- a/src/pages/friends.astro +++ b/src/pages/friends.astro @@ -1,8 +1,8 @@ --- import FriendLink from "../components/FriendLink.astro"; import "../styles/aria.css"; -import BaseLayout from "../layouts/BaseLayout.astro"; import Partition from "../components/Partition.astro"; +import BaseLayout from "../layouts/BaseLayout.astro"; const pageTitle = "Aria's friends"; --- diff --git a/src/pages/index.astro b/src/pages/index.astro index 29a99b7..12c78c1 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -1,9 +1,9 @@ --- import Partition from "../components/Partition.astro"; -import BaseLayout from "../layouts/BaseLayout.astro"; import Greeting from "../components/Greeting"; import Social from "../components/Social.astro"; +import BaseLayout from "../layouts/BaseLayout.astro"; const pageTitle = "Aria"; --- diff --git a/src/pages/other buttons.astro b/src/pages/other buttons.astro index 86a076f..b6f739d 100644 --- a/src/pages/other buttons.astro +++ b/src/pages/other buttons.astro @@ -1,8 +1,8 @@ --- import FriendLink from "../components/FriendLink.astro"; import "../styles/aria.css"; -import BaseLayout from "../layouts/BaseLayout.astro"; import Partition from "../components/Partition.astro"; +import BaseLayout from "../layouts/BaseLayout.astro"; const pageTitle = "Aria's friends"; --- diff --git a/src/pages/rss.xml.js b/src/pages/rss.xml.js index 15144ce..8572929 100644 --- a/src/pages/rss.xml.js +++ b/src/pages/rss.xml.js @@ -1,5 +1,5 @@ -import rss from "@astrojs/rss"; import { getCollection } from "astro:content"; +import rss from "@astrojs/rss"; export async function GET(context) { const posts = await getCollection("blog"); diff --git a/src/pages/tags/[tag].astro b/src/pages/tags/[tag].astro index c154976..ae38a3a 100644 --- a/src/pages/tags/[tag].astro +++ b/src/pages/tags/[tag].astro @@ -1,15 +1,15 @@ --- import { getCollection } from "astro:content"; -import BaseLayout from "../../layouts/BaseLayout.astro"; import BlogEntry from "../../components/BlogEntry.astro"; import Partition from "../../components/Partition.astro"; +import BaseLayout from "../../layouts/BaseLayout.astro"; export async function getStaticPaths() { const allPosts = await getCollection("blog"); const uniqueTags = [ - ...new Set(allPosts.map((post: any) => post.data.tags).flat()), + ...new Set(allPosts.flatMap((post: any) => post.data.tags)), ]; return uniqueTags.map((tag) => { diff --git a/src/pages/tags/index.astro b/src/pages/tags/index.astro index 6a54dd6..7908ffe 100644 --- a/src/pages/tags/index.astro +++ b/src/pages/tags/index.astro @@ -1,10 +1,10 @@ --- import { getCollection } from "astro:content"; -import BaseLayout from "../../layouts/BaseLayout.astro"; import Partition from "../../components/Partition.astro"; +import BaseLayout from "../../layouts/BaseLayout.astro"; const allPosts = await getCollection("blog"); -const tags = [...new Set(allPosts.map((post: any) => post.data.tags).flat())]; +const tags = [...new Set(allPosts.flatMap((post: any) => post.data.tags))]; const pageTitle = "Tag Index"; ---