Skip to content

Commit 07ccb61

Browse files
add cute fun stickers
1 parent 65f51e9 commit 07ccb61

File tree

6 files changed

+78
-3
lines changed

6 files changed

+78
-3
lines changed

CLAUDE.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# CLAUDE.md
2+
3+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4+
5+
## Project Overview
6+
7+
This is a monitoring prompts library website built with Astro. It serves as a curated collection of AI prompts for web monitoring, testing, and observability using Checkly and Playwright. The site displays prompt cards with filtering capabilities and uses a terminal-inspired theme.
8+
9+
## Development Commands
10+
11+
```bash
12+
# Start development server
13+
npm run dev
14+
15+
# Build for production (static site)
16+
npm run build
17+
18+
# Preview production build
19+
npm run preview
20+
```
21+
22+
## Architecture
23+
24+
### Content Management
25+
- Uses Astro's content collections with markdown files in `src/content/library/`
26+
- Two main categories: `checkly/` and `playwright/` prompts
27+
- Content schema defined in `src/content.config.ts` with frontmatter fields:
28+
- `title`, `description`, `icon`, `tags`, `author`, `externalLink`, `draft`
29+
30+
### Site Structure
31+
- **Homepage** (`src/pages/index.astro`): Grid of prompt cards with JavaScript filtering by tags (All/Checkly/Playwright)
32+
- **Individual prompts** (`src/pages/posts/[...slug].astro`): Dynamic routes for each markdown file with navigation
33+
- **Layouts**: `BaseLayout.astro` and `PostLayout.astro` provide consistent structure
34+
- **Static generation**: All content is pre-built for GitHub Pages deployment
35+
36+
### Deployment
37+
- Configured for GitHub Pages at `https://serverless-mom.github.io/prompt-library/`
38+
- Static output with base path handling for production vs development
39+
- Includes sitemap integration
40+
41+
### Content Creation
42+
When adding new prompts, create markdown files in appropriate subdirectories with required frontmatter. The filtering system automatically picks up tags for categorization.

src/content.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ const library = defineCollection({
99
image: z.string().optional(),
1010
icon: z.string().optional(),
1111
externalLink: z.string().optional(),
12+
sticker: z.string().optional(),
1213
tags: z.array(z.string()).default([]),
1314
draft: z.boolean().default(false),
1415
}),

src/content/library/checkly/performance-test.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
title: Performance Testing
33
description: Measure page performance and component load times with Playwright and Checkly.
44
icon:
5+
sticker: "Why is it slow???"
56
tags: ["AI", "Checkly"]
67
---
78
This prompt requires that you've given your agent access to the Playwright MCP, [follow the setup steps here](https://serverless-mom.github.io/prompt-library/posts/checkly/setup/).

src/content/library/checkly/setup.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
title: Checkly Setup
33
description: Step-by-step guide to setting up Checkly monitoring with Playwright MCP.
44
icon: ⚙️
5+
sticker: "Start here!"
56
tags: ["AI", "Checkly"]
67
---
78

src/content/library/playwright/single-page.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
title: Write a Test for a Single Page
33
description: Generate Playwright tests for single page interface verification and validation.
44
icon: 📄
5+
sticker: Your first PWT test
56
tags: ["AI", "Playwright"]
67
---
78
This prompt requires that you've given your agent access to the Playwright MCP. In general, adding the following to your AI agent's configuration JSON is enough to enable your tool to use the Playwright MCP:

src/pages/index.astro

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,14 @@
22
import BaseLayout from '../layouts/BaseLayout.astro'
33
import { getCollection } from 'astro:content'
44
5-
const posts = (await getCollection('library')).filter(
6-
(post) => !post.data.draft
7-
)
5+
const posts = (await getCollection('library'))
6+
.filter((post) => !post.data.draft)
7+
.sort((a, b) => {
8+
// Put setup card first
9+
if (a.data.title === 'Checkly Setup') return -1
10+
if (b.data.title === 'Checkly Setup') return 1
11+
return 0
12+
})
813
const base = import.meta.env.BASE_URL.endsWith('/')
914
? import.meta.env.BASE_URL
1015
: import.meta.env.BASE_URL + '/'
@@ -42,6 +47,9 @@ const base = import.meta.env.BASE_URL.endsWith('/')
4247

4348
return (
4449
<article class="card" data-tags={post.data.tags?.join(',') || ''}>
50+
{post.data.sticker && (
51+
<div class="start-here-sticker" style={`transform: rotate(${-12 + (Math.random() * 2 - 1)}deg)`}>{post.data.sticker}</div>
52+
)}
4553
<div class="card-header">
4654
<div class="card-icon">
4755
{post.data.icon ? (
@@ -130,3 +138,24 @@ const base = import.meta.env.BASE_URL.endsWith('/')
130138
})
131139
})
132140
</script>
141+
142+
<style>
143+
.start-here-sticker {
144+
position: absolute;
145+
top: -18px;
146+
left: -8px;
147+
background: var(--accent);
148+
color: var(--background);
149+
padding: 4px 12px;
150+
border-radius: 4px;
151+
font-size: 12px;
152+
font-weight: bold;
153+
z-index: 10;
154+
box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
155+
border: 1px solid var(--accent);
156+
}
157+
158+
.card {
159+
position: relative;
160+
}
161+
</style>

0 commit comments

Comments
 (0)