Skip to content

Commit

Permalink
test 4
Browse files Browse the repository at this point in the history
  • Loading branch information
deepakdeb committed Dec 10, 2024
1 parent 724535b commit c0689d3
Showing 1 changed file with 8 additions and 96 deletions.
104 changes: 8 additions & 96 deletions docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
import dotenv from 'dotenv';
import { defineConfig, HeadConfig } from 'vitepress'
//const dotenv = require('dotenv');
import { defineConfig, HeadConfig } from 'vitepress';

// Load .env file
dotenv.config();

// Ensure your environment variables are loaded correctly
const base_url = process.env.VITEPRESS_BASE_URL || 'https://github.com/codeboxrcodehub/comforthrmdocs2222';

export default {
export default defineConfig({
sitemap: {
hostname: base_url
},
transformHead: ({ pageData }) => {
const head: HeadConfig[] = [];

head.push(['meta', { property: 'keywords', content: pageData.frontmatter.keywords }]);


head.push(['meta', { property: 'og:site_name', content: pageData.frontmatter.site_name }]);
head.push(['meta', { property: 'og:title', content: pageData.frontmatter.title }]);
head.push(['meta', { property: 'og:description', content: pageData.frontmatter.description }]);
Expand All @@ -32,15 +31,12 @@ export default {
head.push(['meta', { property: 'twitter:url', content: base_url + pageData.frontmatter.url }]);
head.push(['meta', { property: 'twitter:image', content: pageData.frontmatter.image }]);

return head
return head;
},
title: "Comfort HRM",
description: "An awesome docs template built by me",
lang: 'en-US',
// cleanUrls: true,
//base: '/comforthrmdocs/',
base: process.env.VITEPRESS_BASE || '/comforthrmdocs/', // Default to '/' if the variable is not set
// If this is disabled, when building it it will give deadlink errors if your markdown has the wrong links
base: process.env.VITEPRESS_BASE || '/comforthrmdocs/', // Default to '/' if the variable is not set
ignoreDeadLinks: true,

themeConfig: {
Expand All @@ -49,27 +45,22 @@ export default {
search: {
provider: "local",
},
// Navbar Link
nav: [
{ text: "Job 2", link: "/comfortjob/" },
{ text: "Resume", link: "/comfortresume/" },
{ text: "Job Application", link: "/comfortjobapp/" },
],
//Social Icons
socialLinks: [
{ icon: "github", link: "https://github.com/codeboxrcodehub/comforthrmdocs" },
{ icon: "twitter", link: "https://twitter.com/victorekea" },
//{ icon: "discord", link: "..." },
{
icon: {
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>',
},
link: "https://google.com",
},
],

sidebar: {
// Sidebar for `/docs/` section
'/comfortjob/': [
{
text: 'Comfort Job',
Expand All @@ -82,93 +73,14 @@ export default {
{ text: 'How to install', link: '/comfortjob/how-to-install' },
{ text: 'How to Translate', link: '/comfortjob/how-to-translate' },
{ text: 'Template Override', link: '/comfortjob/template-override' },
//{ text: 'Shortcodes', link: '/comfortjob/shortcodes' },
// { text: 'Classic Widgets', link: '/comfortjob/classic-widgets' },
// { text: 'Elementor Widget', link: '/comfortjob/elementor-widgets' },
// { text: 'Gutenberg Blocks', link: '/comfortjob/gutenberg-blocks' },
{ text: 'Hooks and Filters', link: '/comfortjob/hooks-and-filters' },
{ text: 'Code Samples', link: '/comfortjob/code-samples' },
],
},
{
text: 'Shortcode',
collapsible: true,
items: [
// { text: 'How to install', link: '/comfortjob/how-to-install' },
// { text: 'How to Translate', link: '/comfortjob/how-to-translate' },
// { text: 'Template Override', link: '/comfortjob/template-override' },
{ text: '9 Shortcodes', link: '/comfortjob/shortcodes' },
// { text: 'Classic Widgets', link: '/comfortjob/classic-widgets' },
// { text: 'Elementor Widget', link: '/comfortjob/elementor-widgets' },
// { text: 'Gutenberg Blocks', link: '/comfortjob/gutenberg-blocks' },
// { text: 'Hooks and Filters', link: '/comfortjob/hooks-and-filters' },
// { text: 'Code Samples', link: '/comfortjob/code-samples' },
],
},
{
text: 'Widgets',
collapsible: true,
items: [
{ text: 'Classic Widgets', link: '/comfortjob/classic-widgets' },
{ text: 'Elementor Widget', link: '/comfortjob/elementor-widgets' },
{ text: 'Gutenberg Blocks', link: '/comfortjob/gutenberg-blocks' },
],
}
],


// Sidebar for `/guide/` section
'/comfortresume/': [
{
text: 'Comfort Resume',
collapsible: true,
items: [
{ text: 'How to install', link: '/comfortresume/how-to-install' },
{ text: 'How to Translate', link: '/comfortresume/how-to-translate' },
{ text: 'Template Override', link: '/comfortresume/template-override' },
{ text: 'Shortcodes', link: '/comfortresume/shortcodes' },
{ text: 'Classic Widgets', link: '/comfortresume/classic-widgets' },
{ text: 'Elementor Widget', link: '/comfortresume/elementor-widgets' },
{ text: 'Gutenberg Blocks', link: '/comfortresume/gutenberg-blocks' },
{ text: 'Hooks and Filters', link: '/comfortresume/hooks-and-filters' },
{ text: 'Code Samples', link: '/comfortresume/code-samples' },
],
},
],
'/comfortjobapp/': [
{
text: 'Comfort Job Application',
collapsible: true,
items: [
{ text: 'How to install', link: '/comfortjobapp/how-to-install' },
{ text: 'How to Translate', link: '/comfortjobapp/how-to-translate' },
{ text: 'Template Override', link: '/comfortjobapp/template-override' },
{ text: 'Shortcodes', link: '/comfortjobapp/shortcodes' },
{ text: 'Hooks and Filters', link: '/comfortjobapp/hooks-and-filters' },
{ text: 'Code Samples', link: '/comfortjobapp/code-samples' },
],
},
],
},
// you can disable the previous and next page here
},
docFooter: {
prev: 'Previous',
next: 'Next',
},
editLink: {
pattern: 'https://github.com/codeboxrcodehub/comforthrmdocs/edit/main/docs/:path',
text: 'Edit this page on GitHub'
},
footer: {
message: "Released under the MIT License.",
copyright: "Copyright © 2024-present Comfort HRM",
},
markdown: {
theme: "material-palenight",
lineNumbers: true,
},
// Mobile Config only
returnToTopLabel: 'Go to Top',
sidebarMenuLabel: 'Menu',
},
};
});

0 comments on commit c0689d3

Please sign in to comment.