11import dotenv from 'dotenv' ;
2- import { defineConfig , HeadConfig } from 'vitepress'
3- //const dotenv = require('dotenv');
2+ import { defineConfig , HeadConfig } from 'vitepress' ;
43
4+ // Load .env file
55dotenv . config ( ) ;
66
7+ // Ensure your environment variables are loaded correctly
78const base_url = process . env . VITEPRESS_BASE_URL || 'https://github.com/codeboxrcodehub/comforthrmdocs2222' ;
89
9- export default {
10+ export default defineConfig ( {
1011 sitemap : {
1112 hostname : base_url
1213 } ,
1314 transformHead : ( { pageData } ) => {
1415 const head : HeadConfig [ ] = [ ] ;
1516
1617 head . push ( [ 'meta' , { property : 'keywords' , content : pageData . frontmatter . keywords } ] ) ;
17-
18-
1918 head . push ( [ 'meta' , { property : 'og:site_name' , content : pageData . frontmatter . site_name } ] ) ;
2019 head . push ( [ 'meta' , { property : 'og:title' , content : pageData . frontmatter . title } ] ) ;
2120 head . push ( [ 'meta' , { property : 'og:description' , content : pageData . frontmatter . description } ] ) ;
@@ -32,15 +31,12 @@ export default {
3231 head . push ( [ 'meta' , { property : 'twitter:url' , content : base_url + pageData . frontmatter . url } ] ) ;
3332 head . push ( [ 'meta' , { property : 'twitter:image' , content : pageData . frontmatter . image } ] ) ;
3433
35- return head
34+ return head ;
3635 } ,
3736 title : "Comfort HRM" ,
3837 description : "An awesome docs template built by me" ,
3938 lang : 'en-US' ,
40- // cleanUrls: true,
41- //base: '/comforthrmdocs/',
42- base : process . env . VITEPRESS_BASE || '/comforthrmdocs/' , // Default to '/' if the variable is not set
43- // If this is disabled, when building it it will give deadlink errors if your markdown has the wrong links
39+ base : process . env . VITEPRESS_BASE || '/comforthrmdocs/' , // Default to '/' if the variable is not set
4440 ignoreDeadLinks : true ,
4541
4642 themeConfig : {
@@ -49,27 +45,22 @@ export default {
4945 search : {
5046 provider : "local" ,
5147 } ,
52- // Navbar Link
5348 nav : [
5449 { text : "Job 2" , link : "/comfortjob/" } ,
5550 { text : "Resume" , link : "/comfortresume/" } ,
5651 { text : "Job Application" , link : "/comfortjobapp/" } ,
5752 ] ,
58- //Social Icons
5953 socialLinks : [
6054 { icon : "github" , link : "https://github.com/codeboxrcodehub/comforthrmdocs" } ,
6155 { icon : "twitter" , link : "https://twitter.com/victorekea" } ,
62- //{ icon: "discord", link: "..." },
6356 {
6457 icon : {
6558 svg : '<svg role="img" width="26.01" height="32" viewBox="0 0 256 315"><path d="M213.803 167.03c.442 47.58 41.74 63.413 42.197 63.615c-.35 1.116-6.599 22.563-21.757 44.716c-13.104 19.153-26.705 38.235-48.13 38.63c-21.05.388-27.82-12.483-51.888-12.483c-24.061 0-31.582 12.088-51.51 12.871c-20.68.783-36.428-20.71-49.64-39.793c-27-39.033-47.633-110.3-19.928-158.406c13.763-23.89 38.36-39.017 65.056-39.405c20.307-.387 39.475 13.662 51.889 13.662c12.406 0 35.699-16.895 60.186-14.414c10.25.427 39.026 4.14 57.503 31.186c-1.49.923-34.335 20.044-33.978 59.822M174.24 50.199c10.98-13.29 18.369-31.79 16.353-50.199c-15.826.636-34.962 10.546-46.314 23.828c-10.173 11.763-19.082 30.589-16.678 48.633c17.64 1.365 35.66-8.964 46.64-22.262"/></svg>' ,
6659 } ,
6760 link : "https://google.com" ,
6861 } ,
6962 ] ,
70-
7163 sidebar : {
72- // Sidebar for `/docs/` section
7364 '/comfortjob/' : [
7465 {
7566 text : 'Comfort Job' ,
@@ -82,93 +73,14 @@ export default {
8273 { text : 'How to install' , link : '/comfortjob/how-to-install' } ,
8374 { text : 'How to Translate' , link : '/comfortjob/how-to-translate' } ,
8475 { text : 'Template Override' , link : '/comfortjob/template-override' } ,
85- //{ text: 'Shortcodes', link: '/comfortjob/shortcodes' },
86- // { text: 'Classic Widgets', link: '/comfortjob/classic-widgets' },
87- // { text: 'Elementor Widget', link: '/comfortjob/elementor-widgets' },
88- // { text: 'Gutenberg Blocks', link: '/comfortjob/gutenberg-blocks' },
8976 { text : 'Hooks and Filters' , link : '/comfortjob/hooks-and-filters' } ,
90- { text : 'Code Samples' , link : '/comfortjob/code-samples' } ,
91- ] ,
92- } ,
93- {
94- text : 'Shortcode' ,
95- collapsible : true ,
96- items : [
97- // { text: 'How to install', link: '/comfortjob/how-to-install' },
98- // { text: 'How to Translate', link: '/comfortjob/how-to-translate' },
99- // { text: 'Template Override', link: '/comfortjob/template-override' },
100- { text : '9 Shortcodes' , link : '/comfortjob/shortcodes' } ,
101- // { text: 'Classic Widgets', link: '/comfortjob/classic-widgets' },
102- // { text: 'Elementor Widget', link: '/comfortjob/elementor-widgets' },
103- // { text: 'Gutenberg Blocks', link: '/comfortjob/gutenberg-blocks' },
104- // { text: 'Hooks and Filters', link: '/comfortjob/hooks-and-filters' },
105- // { text: 'Code Samples', link: '/comfortjob/code-samples' },
10677 ] ,
10778 } ,
108- {
109- text : 'Widgets' ,
110- collapsible : true ,
111- items : [
112- { text : 'Classic Widgets' , link : '/comfortjob/classic-widgets' } ,
113- { text : 'Elementor Widget' , link : '/comfortjob/elementor-widgets' } ,
114- { text : 'Gutenberg Blocks' , link : '/comfortjob/gutenberg-blocks' } ,
115- ] ,
116- }
11779 ] ,
118-
119-
120- // Sidebar for `/guide/` section
121- '/comfortresume/' : [
122- {
123- text : 'Comfort Resume' ,
124- collapsible : true ,
125- items : [
126- { text : 'How to install' , link : '/comfortresume/how-to-install' } ,
127- { text : 'How to Translate' , link : '/comfortresume/how-to-translate' } ,
128- { text : 'Template Override' , link : '/comfortresume/template-override' } ,
129- { text : 'Shortcodes' , link : '/comfortresume/shortcodes' } ,
130- { text : 'Classic Widgets' , link : '/comfortresume/classic-widgets' } ,
131- { text : 'Elementor Widget' , link : '/comfortresume/elementor-widgets' } ,
132- { text : 'Gutenberg Blocks' , link : '/comfortresume/gutenberg-blocks' } ,
133- { text : 'Hooks and Filters' , link : '/comfortresume/hooks-and-filters' } ,
134- { text : 'Code Samples' , link : '/comfortresume/code-samples' } ,
135- ] ,
136- } ,
137- ] ,
138- '/comfortjobapp/' : [
139- {
140- text : 'Comfort Job Application' ,
141- collapsible : true ,
142- items : [
143- { text : 'How to install' , link : '/comfortjobapp/how-to-install' } ,
144- { text : 'How to Translate' , link : '/comfortjobapp/how-to-translate' } ,
145- { text : 'Template Override' , link : '/comfortjobapp/template-override' } ,
146- { text : 'Shortcodes' , link : '/comfortjobapp/shortcodes' } ,
147- { text : 'Hooks and Filters' , link : '/comfortjobapp/hooks-and-filters' } ,
148- { text : 'Code Samples' , link : '/comfortjobapp/code-samples' } ,
149- ] ,
150- } ,
151- ] ,
152- } ,
153- // you can disable the previous and next page here
80+ } ,
15481 docFooter : {
15582 prev : 'Previous' ,
15683 next : 'Next' ,
15784 } ,
158- editLink : {
159- pattern : 'https://github.com/codeboxrcodehub/comforthrmdocs/edit/main/docs/:path' ,
160- text : 'Edit this page on GitHub'
161- } ,
162- footer : {
163- message : "Released under the MIT License." ,
164- copyright : "Copyright © 2024-present Comfort HRM" ,
165- } ,
166- markdown : {
167- theme : "material-palenight" ,
168- lineNumbers : true ,
169- } ,
170- // Mobile Config only
171- returnToTopLabel : 'Go to Top' ,
172- sidebarMenuLabel : 'Menu' ,
17385 } ,
174- } ;
86+ } ) ;
0 commit comments