Skip to content

Commit 96b02c4

Browse files
committed
test 6
1 parent c0689d3 commit 96b02c4

File tree

2 files changed

+114
-20
lines changed

2 files changed

+114
-20
lines changed

.github/workflows/deploy.yml

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,36 +25,43 @@ jobs:
2525
with:
2626
fetch-depth: 0
2727

28-
# Setup Node.js
29-
- name: Setup Node
28+
- name: Setup Node.js
3029
uses: actions/setup-node@v4
3130
with:
3231
node-version: 20
3332
cache: npm # or pnpm / yarn
3433

35-
# Setup Pages action
3634
- name: Setup Pages
3735
uses: actions/configure-pages@v4
3836

39-
# Install dependencies
40-
- name: Install dependencies
41-
run: npm ci # or pnpm install / yarn install / bun install
42-
43-
# Create .env file from environment variables
4437
- name: Create .env file
4538
run: |
46-
echo "VITEPRESS_BASE=${{ secrets.VITEPRESS_BASE }}" >> .env
47-
echo "VITEPRESS_BASE_URL=${{ secrets.VITEPRESS_BASE_URL }}" >> .env
39+
echo "VITEPRESS_BASE_URL=${{ env.VITEPRESS_BASE_URL }}" >> .env
40+
echo "VITEPRESS_BASE=${{ env.VITEPRESS_BASE }}" >> .env
4841
49-
# Check if .env file was created (for debugging)
42+
# Debug .env content
5043
- name: Verify .env file contents
5144
run: cat .env
5245

46+
- name: Debug VITEPRESS_BASE_URL
47+
run: echo "VITEPRESS_BASE_URL=${{ env.VITEPRESS_BASE_URL }}"
48+
49+
- name: Install dependencies
50+
run: npm ci # or pnpm install / yarn install / bun install
51+
52+
# - name: Create .env file
53+
# run: |
54+
# echo "VITEPRESS_BASE_URL=${{ secrets.VITEPRESS_BASE_URL }}" >> .env
55+
# echo "VITEPRESS_BASE=${{ secrets.VITEPRESS_BASE }}" >> .env
56+
57+
# # Debug .env content
58+
# - name: Verify .env file contents
59+
# run: cat .env
60+
5361
# Build with VitePress
5462
- name: Build with VitePress
5563
run: npm run docs:build # or pnpm docs:build / yarn docs:build / bun run docs:build
5664

57-
# Upload artifact
5865
- name: Upload artifact
5966
uses: actions/upload-pages-artifact@v3
6067
with:

docs/.vitepress/config.ts

Lines changed: 95 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
import dotenv from 'dotenv';
2-
import { defineConfig, HeadConfig } from 'vitepress';
2+
import { defineConfig, HeadConfig } from 'vitepress'
33

4-
// Load .env file
54
dotenv.config();
65

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

10-
export default defineConfig({
8+
export default {
119
sitemap: {
1210
hostname: base_url
1311
},
1412
transformHead: ({ pageData }) => {
1513
const head: HeadConfig[] = [];
1614

1715
head.push(['meta', { property: 'keywords', content: pageData.frontmatter.keywords }]);
16+
17+
1818
head.push(['meta', { property: 'og:site_name', content: pageData.frontmatter.site_name }]);
1919
head.push(['meta', { property: 'og:title', content: pageData.frontmatter.title }]);
2020
head.push(['meta', { property: 'og:description', content: pageData.frontmatter.description }]);
@@ -31,12 +31,15 @@ export default defineConfig({
3131
head.push(['meta', { property: 'twitter:url', content: base_url + pageData.frontmatter.url }]);
3232
head.push(['meta', { property: 'twitter:image', content: pageData.frontmatter.image }]);
3333

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

4245
themeConfig: {
@@ -45,22 +48,27 @@ export default defineConfig({
4548
search: {
4649
provider: "local",
4750
},
51+
// Navbar Link
4852
nav: [
4953
{ text: "Job 2", link: "/comfortjob/" },
5054
{ text: "Resume", link: "/comfortresume/" },
5155
{ text: "Job Application", link: "/comfortjobapp/" },
5256
],
57+
//Social Icons
5358
socialLinks: [
5459
{ icon: "github", link: "https://github.com/codeboxrcodehub/comforthrmdocs" },
5560
{ icon: "twitter", link: "https://twitter.com/victorekea" },
61+
//{ icon: "discord", link: "..." },
5662
{
5763
icon: {
5864
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>',
5965
},
6066
link: "https://google.com",
6167
},
6268
],
69+
6370
sidebar: {
71+
// Sidebar for `/docs/` section
6472
'/comfortjob/': [
6573
{
6674
text: 'Comfort Job',
@@ -73,14 +81,93 @@ export default defineConfig({
7381
{ text: 'How to install', link: '/comfortjob/how-to-install' },
7482
{ text: 'How to Translate', link: '/comfortjob/how-to-translate' },
7583
{ text: 'Template Override', link: '/comfortjob/template-override' },
84+
//{ text: 'Shortcodes', link: '/comfortjob/shortcodes' },
85+
// { text: 'Classic Widgets', link: '/comfortjob/classic-widgets' },
86+
// { text: 'Elementor Widget', link: '/comfortjob/elementor-widgets' },
87+
// { text: 'Gutenberg Blocks', link: '/comfortjob/gutenberg-blocks' },
7688
{ text: 'Hooks and Filters', link: '/comfortjob/hooks-and-filters' },
89+
{ text: 'Code Samples', link: '/comfortjob/code-samples' },
90+
],
91+
},
92+
{
93+
text: 'Shortcode',
94+
collapsible: true,
95+
items: [
96+
// { text: 'How to install', link: '/comfortjob/how-to-install' },
97+
// { text: 'How to Translate', link: '/comfortjob/how-to-translate' },
98+
// { text: 'Template Override', link: '/comfortjob/template-override' },
99+
{ text: '9 Shortcodes', link: '/comfortjob/shortcodes' },
100+
// { text: 'Classic Widgets', link: '/comfortjob/classic-widgets' },
101+
// { text: 'Elementor Widget', link: '/comfortjob/elementor-widgets' },
102+
// { text: 'Gutenberg Blocks', link: '/comfortjob/gutenberg-blocks' },
103+
// { text: 'Hooks and Filters', link: '/comfortjob/hooks-and-filters' },
104+
// { text: 'Code Samples', link: '/comfortjob/code-samples' },
77105
],
78106
},
107+
{
108+
text: 'Widgets',
109+
collapsible: true,
110+
items: [
111+
{ text: 'Classic Widgets', link: '/comfortjob/classic-widgets' },
112+
{ text: 'Elementor Widget', link: '/comfortjob/elementor-widgets' },
113+
{ text: 'Gutenberg Blocks', link: '/comfortjob/gutenberg-blocks' },
114+
],
115+
}
79116
],
80-
},
117+
118+
119+
// Sidebar for `/guide/` section
120+
'/comfortresume/': [
121+
{
122+
text: 'Comfort Resume',
123+
collapsible: true,
124+
items: [
125+
{ text: 'How to install', link: '/comfortresume/how-to-install' },
126+
{ text: 'How to Translate', link: '/comfortresume/how-to-translate' },
127+
{ text: 'Template Override', link: '/comfortresume/template-override' },
128+
{ text: 'Shortcodes', link: '/comfortresume/shortcodes' },
129+
{ text: 'Classic Widgets', link: '/comfortresume/classic-widgets' },
130+
{ text: 'Elementor Widget', link: '/comfortresume/elementor-widgets' },
131+
{ text: 'Gutenberg Blocks', link: '/comfortresume/gutenberg-blocks' },
132+
{ text: 'Hooks and Filters', link: '/comfortresume/hooks-and-filters' },
133+
{ text: 'Code Samples', link: '/comfortresume/code-samples' },
134+
],
135+
},
136+
],
137+
'/comfortjobapp/': [
138+
{
139+
text: 'Comfort Job Application',
140+
collapsible: true,
141+
items: [
142+
{ text: 'How to install', link: '/comfortjobapp/how-to-install' },
143+
{ text: 'How to Translate', link: '/comfortjobapp/how-to-translate' },
144+
{ text: 'Template Override', link: '/comfortjobapp/template-override' },
145+
{ text: 'Shortcodes', link: '/comfortjobapp/shortcodes' },
146+
{ text: 'Hooks and Filters', link: '/comfortjobapp/hooks-and-filters' },
147+
{ text: 'Code Samples', link: '/comfortjobapp/code-samples' },
148+
],
149+
},
150+
],
151+
},
152+
// you can disable the previous and next page here
81153
docFooter: {
82154
prev: 'Previous',
83155
next: 'Next',
84156
},
157+
editLink: {
158+
pattern: 'https://github.com/codeboxrcodehub/comforthrmdocs/edit/main/docs/:path',
159+
text: 'Edit this page on GitHub'
160+
},
161+
footer: {
162+
message: "Released under the MIT License.",
163+
copyright: "Copyright © 2024-present Comfort HRM",
164+
},
165+
markdown: {
166+
theme: "material-palenight",
167+
lineNumbers: true,
168+
},
169+
// Mobile Config only
170+
returnToTopLabel: 'Go to Top',
171+
sidebarMenuLabel: 'Menu',
85172
},
86-
});
173+
};

0 commit comments

Comments
 (0)