diff --git a/package-lock.json b/package-lock.json index b3f23d3..6a01de2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "astro-erudite", - "version": "1.1.9", + "version": "1.2.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "astro-erudite", - "version": "1.1.9", + "version": "1.2.1", "dependencies": { "@astrojs/check": "^0.9.4", "@astrojs/markdown-remark": "^6.0.1", diff --git a/package.json b/package.json index e7f7b45..006ee62 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "astro-erudite", "type": "module", - "version": "1.2.0", + "version": "1.2.1", "private": true, "scripts": { "dev": "astro dev", @@ -74,4 +74,4 @@ } ] } -} \ No newline at end of file +} diff --git a/src/components/Footer.astro b/src/components/Footer.astro index 84a4dcd..7ee69c0 100644 --- a/src/components/Footer.astro +++ b/src/components/Footer.astro @@ -1,6 +1,8 @@ --- import Container from '@/components/Container.astro' +import { Separator } from '@/components/ui/separator' import { SOCIAL_LINKS } from '@/consts' +import Link from './Link.astro' import SocialIcons from './SocialIcons.astro' --- @@ -9,9 +11,18 @@ import SocialIcons from './SocialIcons.astro'
-
-

+

+ © {new Date().getFullYear()} All rights reserved. + + +

+ Made with 🤍 by enscribe!

diff --git a/src/components/ProjectCard.astro b/src/components/ProjectCard.astro index f0923f8..3dd3ae6 100644 --- a/src/components/ProjectCard.astro +++ b/src/components/ProjectCard.astro @@ -12,30 +12,44 @@ const { project } = Astro.props ---
- - {project.data.name} -
-

{project.data.name}

-

+ + { + project.data.image && ( +

+ {project.data.name} +
+ ) + } +
+

+ {project.data.name} +

+

{project.data.description}

-
- { - project.data.tags.map((tag) => ( - - {tag} - - )) - } -
+ { + project.data.tags && ( +
+ {project.data.tags.map((tag: string) => ( + + {tag} + + ))} +
+ ) + }
diff --git a/src/content.config.ts b/src/content.config.ts index 97be98c..20e3fa7 100644 --- a/src/content.config.ts +++ b/src/content.config.ts @@ -2,7 +2,7 @@ import { glob } from 'astro/loaders' import { defineCollection, z } from 'astro:content' const blog = defineCollection({ - loader: glob({ pattern: '**/*.{md,mdx}', base: "./src/content/blog" }), + loader: glob({ pattern: '**/*.{md,mdx}', base: './src/content/blog' }), schema: ({ image }) => z.object({ title: z @@ -26,7 +26,7 @@ const blog = defineCollection({ }) const authors = defineCollection({ - loader: glob({ pattern: '**/*.{md,mdx}', base: "./src/content/authors" }), + loader: glob({ pattern: '**/*.{md,mdx}', base: './src/content/authors' }), schema: z.object({ name: z.string(), pronouns: z.string().optional(), @@ -42,7 +42,7 @@ const authors = defineCollection({ }) const projects = defineCollection({ - loader: glob({ pattern: '**/*.{md,mdx}', base: "./src/content/projects" }), + loader: glob({ pattern: '**/*.{md,mdx}', base: './src/content/projects' }), schema: ({ image }) => z.object({ name: z.string(), diff --git a/src/lib/server-utils.ts b/src/lib/server-utils.ts index 2d87514..3fe917b 100644 --- a/src/lib/server-utils.ts +++ b/src/lib/server-utils.ts @@ -1,4 +1,4 @@ -import { getEntry } from "astro:content" +import { getEntry } from 'astro:content' export async function parseAuthors(authors: string[]) { if (!authors || authors.length === 0) return [] diff --git a/src/pages/about.astro b/src/pages/about.astro index f686f5e..b270f73 100644 --- a/src/pages/about.astro +++ b/src/pages/about.astro @@ -1,6 +1,7 @@ --- import Breadcrumbs from '@/components/Breadcrumbs.astro' import Container from '@/components/Container.astro' +import Link from '@/components/Link.astro' import ProjectCard from '@/components/ProjectCard.astro' import { SITE } from '@/consts' import Layout from '@/layouts/Layout.astro' @@ -15,14 +16,39 @@ const projects = await getCollection('projects')
-

Some more about us

-

- {SITE.TITLE} is an opinionated, no-frills static blogging template built - with Astro. -

+
+

+ astro-erudite is an opinionated, no-frills static blogging template + that prioritizes simplicity and performance, built with Astro, Tailwind, and shadcn/ui. It provides a clean foundation for your content while being + extremely easy to customize. +

+

+ To learn more about the philosophy behind this template, check out + the following blog post: The State of Static Blogs in 2024. +

+
-

Our Projects

-
+

Example Projects Listing

+
{projects.map((project) => )}
diff --git a/src/pages/tags/index.astro b/src/pages/tags/index.astro index dbfa754..e534f1f 100644 --- a/src/pages/tags/index.astro +++ b/src/pages/tags/index.astro @@ -9,9 +9,17 @@ import { getCollection } from 'astro:content' const blog = (await getCollection('blog')).filter((post) => !post.data.draft) -const tags = blog - .flatMap((post) => post.data.tags) - .filter((tag, index, self) => self.indexOf(tag) === index) +const tagCounts = blog.reduce((acc, post) => { + post.data.tags?.forEach((tag) => { + acc.set(tag, (acc.get(tag) || 0) + 1) + }) + return acc +}, new Map()) + +const tags = [...tagCounts.keys()].sort((a, b) => { + const countDiff = tagCounts.get(b)! - tagCounts.get(a)! + return countDiff !== 0 ? countDiff : a.localeCompare(b) +}) --- @@ -19,7 +27,6 @@ const tags = blog
-

Tags

{ tags.map((tag) => ( @@ -29,6 +36,9 @@ const tags = blog > {tag} + + ({tagCounts.get(tag)}) + )) } diff --git a/src/styles/global.css b/src/styles/global.css index adf5b5c..67ab4c8 100644 --- a/src/styles/global.css +++ b/src/styles/global.css @@ -124,6 +124,19 @@ } } + /* Shadcn-like scrollbar */ + pre::-webkit-scrollbar { + @apply h-2.5 w-2.5; + } + + pre::-webkit-scrollbar-track { + @apply bg-transparent; + } + + pre::-webkit-scrollbar-thumb { + @apply rounded-full bg-border bg-clip-padding p-px; + } + /* Code block styles */ pre { @apply static max-h-[600px] overflow-auto rounded-xl border bg-secondary/20 py-4 text-sm leading-loose;