Skip to content

Commit 4f0e8d0

Browse files
committed
initial setup
1 parent 72a5433 commit 4f0e8d0

39 files changed

+8577
-0
lines changed

.github/workflows/deploy.yml

+69
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: Deploy VitePress site to Pages
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
branches: [master]
8+
workflow_dispatch:
9+
10+
permissions:
11+
contents: read
12+
pages: write
13+
id-token: write
14+
15+
concurrency:
16+
group: pages
17+
cancel-in-progress: false
18+
19+
jobs:
20+
build:
21+
runs-on: ubuntu-latest
22+
environment: github-pages
23+
steps:
24+
- name: Checkout
25+
uses: actions/checkout@v4
26+
with:
27+
fetch-depth: 0
28+
29+
- name: Setup Node.js
30+
uses: actions/setup-node@v4
31+
with:
32+
node-version: 20
33+
cache: npm # or pnpm / yarn
34+
35+
- name: Setup Pages
36+
uses: actions/configure-pages@v4
37+
38+
- name: Create .env file
39+
run: |
40+
echo "VITEPRESS_BASE_URL=${{ vars.VITEPRESS_BASE_URL }}" >> .env
41+
echo "VITEPRESS_BASE=${{ vars.VITEPRESS_BASE }}" >> .env
42+
43+
# Debug .env content
44+
- name: Verify .env file contents
45+
run: cat .env
46+
47+
- name: Install dependencies
48+
run: npm ci # or pnpm install / yarn install / bun install
49+
50+
# Build with VitePress
51+
- name: Build with VitePress
52+
run: npm run docs:build # or pnpm docs:build / yarn docs:build / bun run docs:build
53+
54+
- name: Upload artifact
55+
uses: actions/upload-pages-artifact@v3
56+
with:
57+
path: docs/.vitepress/dist
58+
59+
deploy:
60+
environment:
61+
name: github-pages
62+
url: ${{ steps.deployment.outputs.page_url }}
63+
needs: build
64+
runs-on: ubuntu-latest
65+
name: Deploy
66+
steps:
67+
- name: Deploy to GitHub Pages
68+
id: deployment
69+
uses: actions/deploy-pages@v4

.gitignore

+109
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
lerna-debug.log*
8+
vscode
9+
10+
# Diagnostic reports (https://nodejs.org/api/report.html)
11+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
12+
13+
# Runtime data
14+
pids
15+
*.pid
16+
*.seed
17+
*.pid.lock
18+
19+
# Directory for instrumented libs generated by jscoverage/JSCover
20+
lib-cov
21+
22+
# Coverage directory used by tools like istanbul
23+
coverage
24+
*.lcov
25+
26+
# nyc test coverage
27+
.nyc_output
28+
29+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
30+
.grunt
31+
32+
# Bower dependency directory (https://bower.io/)
33+
bower_components
34+
35+
# node-waf configuration
36+
.lock-wscript
37+
38+
# Compiled binary addons (https://nodejs.org/api/addons.html)
39+
build/Release
40+
41+
# Dependency directories
42+
/node_modules
43+
jspm_packages/
44+
45+
# TypeScript v1 declaration files
46+
typings/
47+
48+
# TypeScript cache
49+
*.tsbuildinfo
50+
51+
# Optional npm cache directory
52+
.npm
53+
54+
# Optional eslint cache
55+
.eslintcache
56+
57+
# Microbundle cache
58+
.rpt2_cache/
59+
.rts2_cache_cjs/
60+
.rts2_cache_es/
61+
.rts2_cache_umd/
62+
63+
# Optional REPL history
64+
.node_repl_history
65+
66+
# Output of 'npm pack'
67+
*.tgz
68+
69+
# Yarn Integrity file
70+
.yarn-integrity
71+
72+
# dotenv environment variables file
73+
.env
74+
.env.test
75+
76+
# parcel-bundler cache (https://parceljs.org/)
77+
.cache
78+
79+
# Next.js build output
80+
.next
81+
82+
# Nuxt.js build / generate output
83+
.nuxt
84+
dist
85+
86+
# Gatsby files
87+
.cache/
88+
# Comment in the public line in if your project uses Gatsby and *not* Next.js
89+
# https://nextjs.org/blog/next-9-1#public-directory-support
90+
# public
91+
92+
# vuepress build output
93+
.vuepress/dist
94+
95+
# Serverless directories
96+
.serverless/
97+
98+
# FuseBox cache
99+
.fusebox/
100+
101+
# DynamoDB Local files
102+
.dynamodb/
103+
104+
# TernJS port file
105+
.tern-port
106+
107+
docs/.vitepress/cache
108+
.env
109+
www

.husky/post-merge

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
npm run docs:build

README.md

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
<div align="center t">
2+
<img src="https://Comfort ERP.vercel.app/logo-big.svg" width="100px" height="100px" alt="Comfort ERP logo" />
3+
<h1>Comfort ERP</h1>
4+
<p>A docs template built using <a href="https://vitepress.vuejs.org">VitePress</a></p>
5+
<p>This repository serves as a resource for the tutorial, <a href="https://www.freecodecamp.org/news/how-to-build-a-modern-documentation-site-with-vitepress/">How to Build a Modern Documentation Site with VitePress</a> posted on freeCodeCamp</p>
6+
</div>
7+
8+
## Run project locally
9+
10+
Use this command below to boot this project locally.
11+
12+
```bash
13+
git clone https://github.com/codeboxrcodehub/comforterpdocs.git
14+
15+
cd Comfort ERP
16+
17+
npm install
18+
19+
npm run docs:dev
20+
```
21+
22+
Visit [https://localhost:5173](https://localhost:5173) to see your site
23+
24+
## Build
25+
You may run this command to build the docs
26+
27+
```bash
28+
npm run docs:build
29+
```
30+
31+
## Folder Structure
32+
33+
```
34+
docs/
35+
├── .vitepress/
36+
│ ├── config.js
37+
│ └── theme/
38+
│ ├── index.js
39+
│ └── custom.css
40+
├── public/
41+
│ ├── logo.png
42+
│ └── logo-big.svg
43+
├── about.md
44+
├── configs.md
45+
├── contact.md
46+
├── get-started.md
47+
├── guide.md
48+
├── index.md
49+
├── package.json
50+
└── README.md
51+
```

docs/.vitepress/config.ts

+145
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
import dotenv from 'dotenv';
2+
import { defineConfig, HeadConfig } from 'vitepress'
3+
4+
dotenv.config();
5+
6+
const base_url = process.env.VITEPRESS_BASE_URL || 'https://github.com/codeboxrcodehub/comforterpdocs';
7+
8+
export default {
9+
sitemap: {
10+
hostname: base_url
11+
},
12+
transformHead: ({ pageData }) => {
13+
const head: HeadConfig[] = [];
14+
15+
head.push(['meta', { property: 'keywords', content: pageData.frontmatter.keywords }]);
16+
17+
18+
head.push(['meta', { property: 'og:site_name', content: pageData.frontmatter.site_name }]);
19+
head.push(['meta', { property: 'og:title', content: pageData.frontmatter.title }]);
20+
head.push(['meta', { property: 'og:description', content: pageData.frontmatter.description }]);
21+
head.push(['meta', { property: 'og:keywords', content: pageData.frontmatter.keywords }]);
22+
head.push(['meta', { property: 'og:type', content: pageData.frontmatter.type }]);
23+
head.push(['meta', { property: 'og:url', content: base_url + pageData.frontmatter.url }]);
24+
head.push(['meta', { property: 'og:image', content: pageData.frontmatter.image }]);
25+
26+
head.push(['meta', { property: 'twitter:site', content: pageData.frontmatter.site_name }]);
27+
head.push(['meta', { property: 'twitter:title', content: pageData.frontmatter.title }]);
28+
head.push(['meta', { property: 'twitter:description', content: pageData.frontmatter.description }]);
29+
head.push(['meta', { property: 'twitter:keywords', content: pageData.frontmatter.keywords }]);
30+
head.push(['meta', { property: 'twitter:card', content: pageData.frontmatter.type }]);
31+
head.push(['meta', { property: 'twitter:url', content: base_url + pageData.frontmatter.url }]);
32+
head.push(['meta', { property: 'twitter:image', content: pageData.frontmatter.image }]);
33+
34+
return head
35+
},
36+
title: "Comfort ERP",
37+
description: "An awesome docs template built by me",
38+
lang: 'en-US',
39+
// cleanUrls: true,
40+
base: process.env.VITEPRESS_BASE || '/comforterpdocs/', // Default to '/' if the variable is not set
41+
// If this is disabled, when building it it will give deadlink errors if your markdown has the wrong links
42+
ignoreDeadLinks: true,
43+
44+
themeConfig: {
45+
logo: "/logo.png",
46+
siteTitle: "",
47+
search: {
48+
provider: "local",
49+
},
50+
// Navbar Link
51+
nav: [
52+
{ text: "Accounting", link: "/comfortaccounting/" },
53+
{ text: "Form", link: "/comfortform/" },
54+
],
55+
//Social Icons
56+
socialLinks: [
57+
{ icon: "github", link: "https://github.com/codeboxrcodehub/comforterpdocs" },
58+
{ icon: "twitter", link: "https://twitter.com/victorekea" },
59+
//{ icon: "discord", link: "..." },
60+
{
61+
icon: {
62+
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>',
63+
},
64+
link: "https://google.com",
65+
},
66+
],
67+
68+
sidebar: {
69+
// Sidebar for `/docs/` section
70+
'/comfortaccounting/': [
71+
{
72+
text: 'Comfort Accounting',
73+
collapsible: false,
74+
},
75+
{
76+
text: 'Getting Started',
77+
collapsible: true,
78+
items: [
79+
{ text: 'How to install', link: '/comfortaccounting/how-to-install' },
80+
{ text: 'How to Translate', link: '/comfortaccounting/how-to-translate' },
81+
{ text: 'Template Override', link: '/comfortaccounting/template-override' },
82+
{ text: 'Hooks and Filters', link: '/comfortaccounting/hooks-and-filters' },
83+
{ text: 'Code Samples', link: '/comfortaccounting/code-samples' },
84+
],
85+
},
86+
{
87+
text: 'Shortcode',
88+
collapsible: true,
89+
items: [
90+
{ text: '9 Shortcodes', link: '/comfortaccounting/shortcodes' },
91+
],
92+
},
93+
{
94+
text: 'Widgets',
95+
collapsible: true,
96+
items: [
97+
{ text: 'Classic Widgets', link: '/comfortaccounting/classic-widgets' },
98+
{ text: 'Elementor Widget', link: '/comfortaccounting/elementor-widgets' },
99+
{ text: 'Gutenberg Blocks', link: '/comfortaccounting/gutenberg-blocks' },
100+
],
101+
}
102+
],
103+
104+
105+
// Sidebar for `/guide/` section
106+
'/comfortform/': [
107+
{
108+
text: 'Comfort Form',
109+
collapsible: true,
110+
items: [
111+
{ text: 'How to install', link: '/comfortform/how-to-install' },
112+
{ text: 'How to Translate', link: '/comfortform/how-to-translate' },
113+
{ text: 'Template Override', link: '/comfortform/template-override' },
114+
{ text: 'Shortcodes', link: '/comfortform/shortcodes' },
115+
{ text: 'Classic Widgets', link: '/comfortform/classic-widgets' },
116+
{ text: 'Elementor Widget', link: '/comfortform/elementor-widgets' },
117+
{ text: 'Gutenberg Blocks', link: '/comfortform/gutenberg-blocks' },
118+
{ text: 'Hooks and Filters', link: '/comfortform/hooks-and-filters' },
119+
{ text: 'Code Samples', link: '/comfortform/code-samples' },
120+
],
121+
},
122+
],
123+
},
124+
// you can disable the previous and next page here
125+
docFooter: {
126+
prev: 'Previous',
127+
next: 'Next',
128+
},
129+
editLink: {
130+
pattern: 'https://github.com/codeboxrcodehub/comforterpdocs/edit/main/docs/:path',
131+
text: 'Edit this page on GitHub'
132+
},
133+
footer: {
134+
message: "Released under the MIT License.",
135+
copyright: "Copyright © 2024-present Comfort ERP",
136+
},
137+
markdown: {
138+
theme: "material-palenight",
139+
lineNumbers: true,
140+
},
141+
// Mobile Config only
142+
returnToTopLabel: 'Go to Top',
143+
sidebarMenuLabel: 'Menu',
144+
},
145+
};

0 commit comments

Comments
 (0)