Skip to content

Commit

Permalink
feat: init
Browse files Browse the repository at this point in the history
  • Loading branch information
supersonictw committed Sep 24, 2024
0 parents commit 26de00c
Show file tree
Hide file tree
Showing 6 changed files with 89 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Docs workflow

on:
push:
branches:
- main

permissions:
contents: write

jobs:
build-and-deploy-docs:
runs-on: ubuntu-latest
steps:
- name: Specific Node.js version 🦄
uses: actions/setup-node@v3
with:
node-version: 20

- name: Checkout 🛎️
uses: actions/checkout@v4

- name: Install and Build 📎
run: |
npm install
npm run docs:build
- name: Deploy Docs 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: docs/.vitepress/dist
22 changes: 22 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
.DS_Store
node_modules
docs/.vitepress/dist
docs/.vitepress/cache

# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*

# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

# Lock file
package-lock.json
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Wiki
16 changes: 16 additions & 0 deletions docs/.vitepress/config.mts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { defineConfig } from 'vitepress'

const isProduction = process.env.NODE_ENV === 'production'

// https://vitepress.dev/reference/site-config
export default defineConfig({
title: "Wiki",
base: isProduction ? "/wiki/" : "/",
description: "Taiwan Web Technology Promotion Organization",
themeConfig: {
// https://vitepress.dev/reference/default-theme-config
nav: [
{ text: 'Home', link: '/' },
],
}
})
8 changes: 8 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
layout: home

hero:
name: Wiki
tagline: Taiwan Web Technology Promotion Organization
---

10 changes: 10 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"scripts": {
"docs:dev": "vitepress dev docs",
"docs:build": "vitepress build docs",
"docs:preview": "vitepress preview docs"
},
"devDependencies": {
"vitepress": "^1.3.4"
}
}

0 comments on commit 26de00c

Please sign in to comment.