Skip to content

Commit 5001e1d

Browse files
committed
Add RSS
1 parent e7a9995 commit 5001e1d

12 files changed

Lines changed: 889 additions & 179 deletions

File tree

.vitepress/config.mts

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,27 @@
11
import { defineConfig } from 'vitepress'
2+
import { RssPlugin } from 'vitepress-plugin-rss'
3+
4+
const baseUrl = 'https://php-testo.github.io'
5+
6+
const rssOptionsEn = {
7+
title: 'Testo Blog',
8+
baseUrl,
9+
copyright: 'Copyright © Testo',
10+
description: 'Updates from Testo - Modern PHP Testing Framework',
11+
filename: 'feed.xml',
12+
filter: (post: { url: string }) => post.url.startsWith('/blog/') && !post.url.endsWith('/blog/'),
13+
icon: false,
14+
}
15+
16+
const rssOptionsRu = {
17+
title: 'Блог Testo',
18+
baseUrl,
19+
copyright: 'Copyright © Testo',
20+
description: 'Новости Testo - современного PHP фреймворка для тестирования',
21+
filename: 'ru/feed.xml',
22+
filter: (post: { url: string }) => post.url.startsWith('/ru/blog/') && !post.url.endsWith('/blog/'),
23+
icon: false,
24+
}
225

326
export default defineConfig({
427
title: 'Testo',
@@ -7,15 +30,23 @@ export default defineConfig({
730
lastUpdated: true,
831
cleanUrls: true,
932
srcExclude: ['CLAUDE.md', 'README.md'],
33+
ignoreDeadLinks: [/feed\.xml$/],
1034

1135
head: [
1236
['link', { rel: 'icon', type: 'image/svg+xml', href: '/logo.svg' }],
1337
],
1438

39+
vite: {
40+
plugins: [RssPlugin(rssOptionsEn), RssPlugin(rssOptionsRu)],
41+
},
42+
1543
locales: {
1644
root: {
1745
label: 'English',
1846
lang: 'en',
47+
head: [
48+
['link', { rel: 'alternate', type: 'application/rss+xml', title: 'Testo Blog', href: '/feed.xml' }],
49+
],
1950
themeConfig: {
2051
nav: [
2152
{ text: 'Docs', link: '/docs/getting-started' },
@@ -56,6 +87,9 @@ export default defineConfig({
5687
label: 'Русский',
5788
lang: 'ru',
5889
link: '/ru/',
90+
head: [
91+
['link', { rel: 'alternate', type: 'application/rss+xml', title: 'Блог Testo', href: '/ru/feed.xml' }],
92+
],
5993
themeConfig: {
6094
nav: [
6195
{ text: 'Документация', link: '/ru/docs/getting-started' },

CLAUDE.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,23 @@ ru/ # Russian locale (same structure)
4242

4343
**Styles:** `.vitepress/theme/style.css` - brand colors `--vp-c-brand-1`, responsive breakpoints 960px/640px
4444

45+
## Blog
46+
47+
**Adding blog posts:**
48+
1. Create both `blog/post.md` (EN) and `ru/blog/post.md` (RU)
49+
2. Add link to `blog/index.md` and `ru/blog/index.md`
50+
51+
**Required frontmatter for RSS:**
52+
```yaml
53+
---
54+
title: "Post Title"
55+
date: 2025-01-01
56+
description: "Short description for RSS feed"
57+
---
58+
```
59+
60+
All three fields (`title`, `date`, `description`) are required for proper RSS generation.
61+
4562
## VitePress Commands
4663

4764
```bash

blog/assert-and-expect.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
---
2+
title: "Assert and Expect"
3+
date: 2026-01-01
4+
description: "Exploring assertion API design in Testo: why we split Assert and Expect facades, and how pipe assertions make tests cleaner."
5+
---
6+
17
# Testo. Assert and Expect
28

39
![Testo Assert and Expect](/blog/assert-and-expect/img-1.jpg)

blog/filters.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
---
2+
title: "Filters"
3+
date: 2025-11-07
4+
description: "Multi-layered filtering system in Testo: from Test Suite level down to individual test methods."
5+
---
6+
17
# Testo. Filters
28

39
![Filters](/blog/filters/img-1.jpg)

blog/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Blog
1+
# Blog <a href="/feed.xml"><Badge type="info" text="RSS" /></a>
22

33
- `2026-01-01` [Assert and Expect](./assert-and-expect.md)
44
- `2025-11-07` [Filters](./filters.md)

blog/khinkali.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
---
2+
title: "Khinkali"
3+
date: 2025-10-30
4+
description: "The story behind the khinkali icon for Testo IDE plugin."
5+
---
6+
17
# Khinkali
28

39
The elephant logo with a rolling pin is nice, of course. But we also need small icon formats to use in the IDE.

0 commit comments

Comments
 (0)