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.image && (
+
+
+
+ )
+ }
+
+
+ {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;