11import { 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
326export 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 : [ / f e e d \. x m l $ / ] ,
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' } ,
0 commit comments