@@ -4,7 +4,7 @@ import { defineConfig } from "vitepress";
44export default defineConfig ( {
55 title : "Razd" ,
66 description :
7- "Упрощённая настройка проекта с интеграцией git, mise и taskfile" ,
7+ "Современный инструмент для настройки проектовУпрощённая настройка проекта с интеграцией git, mise и taskfile" ,
88 base : "/docs/" ,
99
1010 // Support for iconify-icon custom elements
@@ -21,7 +21,7 @@ export default defineConfig({
2121 lang : "ru" ,
2222 title : "Razd" ,
2323 description :
24- "Упрощённая настройка проекта с интеграцией git, mise и taskfile" ,
24+ "Современный инструмент для настройки проектов. Упрощённая настройка проекта с интеграцией git, mise и taskfile" ,
2525 themeConfig : {
2626 nav : [
2727 { text : "Документация" , link : "/guide/" } ,
@@ -133,13 +133,56 @@ export default defineConfig({
133133
134134 // Theme and meta configurations
135135 [ "meta" , { name : "theme-color" , content : "#cba6f7" } ] , // Catppuccin Mocha Mauve
136- [ "meta" , { name : "og:type" , content : "website" } ] ,
136+
137+ // SEO Meta Tags
138+ [
139+ "meta" ,
140+ {
141+ name : "keywords" ,
142+ content :
143+ "razd, project setup, mise, taskfile, git, automation, cross-platform, cli tool, developer tools, project management" ,
144+ } ,
145+ ] ,
146+ [ "meta" , { name : "author" , content : "razd-cli" } ] ,
147+ [ "meta" , { name : "robots" , content : "index, follow" } ] ,
148+
149+ // Open Graph Tags
150+ [ "meta" , { property : "og:type" , content : "website" } ] ,
151+ [
152+ "meta" ,
153+ { property : "og:url" , content : "https://razd-cli.github.io/docs/" } ,
154+ ] ,
155+ [ "meta" , { property : "og:site_name" , content : "Razd" } ] ,
156+ [
157+ "meta" ,
158+ {
159+ property : "og:image" ,
160+ content : "https://razd-cli.github.io/docs/logo.png" ,
161+ } ,
162+ ] ,
163+ [ "meta" , { property : "og:image:width" , content : "1200" } ] ,
164+ [ "meta" , { property : "og:image:height" , content : "630" } ] ,
165+ [
166+ "meta" ,
167+ { property : "og:image:alt" , content : "Razd - Modern Project Setup Tool" } ,
168+ ] ,
169+
170+ // Twitter Card Tags
171+ [ "meta" , { name : "twitter:card" , content : "summary_large_image" } ] ,
172+ [
173+ "meta" ,
174+ {
175+ name : "twitter:image" ,
176+ content : "https://razd-cli.github.io/docs/logo.png" ,
177+ } ,
178+ ] ,
137179 [
138180 "meta" ,
139- { name : "og:image" , content : "https://razd-cli.github.io/docs/logo.png" } ,
181+ {
182+ name : "twitter:image:alt" ,
183+ content : "Razd - Modern Project Setup Tool" ,
184+ } ,
140185 ] ,
141- [ "meta" , { name : "og:image:width" , content : "1200" } ] ,
142- [ "meta" , { name : "og:image:height" , content : "630" } ] ,
143186 ] ,
144187
145188 themeConfig : {
@@ -214,4 +257,71 @@ export default defineConfig({
214257 // Performance optimization
215258 lastUpdated : true ,
216259 cleanUrls : true ,
260+
261+ // Generate sitemap for better SEO
262+ sitemap : {
263+ hostname : "https://razd-cli.github.io/docs/" ,
264+ } ,
265+
266+ // Transform page data to add canonical URLs and dynamic meta tags
267+ transformPageData ( pageData ) {
268+ const canonicalUrl =
269+ `https://razd-cli.github.io/docs/${ pageData . relativePath } `
270+ . replace ( / i n d e x \. m d $ / , "" )
271+ . replace ( / \. m d $ / , ".html" ) ;
272+
273+ pageData . frontmatter . head ??= [ ] ;
274+
275+ // Add canonical URL
276+ pageData . frontmatter . head . push ( [
277+ "link" ,
278+ { rel : "canonical" , href : canonicalUrl } ,
279+ ] ) ;
280+
281+ // Determine the appropriate title
282+ const isHomePage = pageData . frontmatter . layout === "home" ;
283+ const pageTitle = isHomePage
284+ ? "Razd - Modern Project Setup Tool"
285+ : pageData . title
286+ ? `${ pageData . title } | Razd`
287+ : "Razd" ;
288+
289+ // Add dynamic Open Graph title
290+ pageData . frontmatter . head . push ( [
291+ "meta" ,
292+ {
293+ property : "og:title" ,
294+ content : pageTitle ,
295+ } ,
296+ ] ) ;
297+
298+ // Add dynamic Open Graph description
299+ if ( pageData . description ) {
300+ pageData . frontmatter . head . push ( [
301+ "meta" ,
302+ {
303+ property : "og:description" ,
304+ content : pageData . description ,
305+ } ,
306+ ] ) ;
307+
308+ // Add Twitter description
309+ pageData . frontmatter . head . push ( [
310+ "meta" ,
311+ {
312+ name : "twitter:description" ,
313+ content : pageData . description ,
314+ } ,
315+ ] ) ;
316+ }
317+
318+ // Add dynamic Twitter title
319+ pageData . frontmatter . head . push ( [
320+ "meta" ,
321+ {
322+ name : "twitter:title" ,
323+ content : pageTitle ,
324+ } ,
325+ ] ) ;
326+ } ,
217327} ) ;
0 commit comments