Skip to content

Commit cd83313

Browse files
Added docs generator and getting started guide (#1)
- Added [Hugo static site generator](https://gohugo.io/documentation/) with [Hyas Doks theme](https://getdoks.org/docs/start-here/getting-started/) - Migrated existing content to the new directory structure - Split and updated the `QuickStart.md` to getting started guide
1 parent 85cacd1 commit cd83313

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+5637
-224
lines changed

.circleci/config.yml

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# CircleCI 2.1 configuration file
2+
#
3+
version: 2.1
4+
5+
orbs:
6+
# Check https://circleci.com/developer/orbs/orb/circleci/node for more details
7+
node: circleci/[email protected]
8+
9+
# Check https://circleci.com/developer/orbs/orb/circleci/hugo for more details
10+
hugo: circleci/[email protected]
11+
12+
executors:
13+
base:
14+
# Check https://circleci.com/developer/images/image/cimg/base for more details
15+
docker:
16+
- image: cimg/base:2023.05
17+
resource_class: small
18+
19+
jobs:
20+
build:
21+
executor: base
22+
steps:
23+
- checkout
24+
- node/install:
25+
node-version: '20'
26+
- run:
27+
name: "Install Dart Sass"
28+
command: npm install -g sass
29+
- restore_cache:
30+
keys:
31+
- v1-npm-deps-{{ checksum "package-lock.json" }}
32+
- run:
33+
name: Install dependencies
34+
command: npm ci
35+
- hugo/install:
36+
version: 0.132.2
37+
- run:
38+
name: "Build website"
39+
command: |
40+
# Inject custom javascript
41+
cat test/assets/js/proxy-links.js >> assets/js/custom.js
42+
artifactsUrl="https://output.circle-artifacts.com/output/job/${CIRCLE_WORKFLOW_JOB_ID}/artifacts/0/site"
43+
npm run build \
44+
-- \
45+
--baseURL "${artifactsUrl}/"
46+
environment:
47+
# For maximum backward compatibility with Hugo modules
48+
HUGO_ENVIRONMENT: production
49+
HUGO_ENV: production
50+
TZ: America/New_York
51+
- persist_to_workspace:
52+
paths:
53+
- public
54+
root: .
55+
- store_artifacts: # upload docs site in Artifacts
56+
path: public
57+
destination: site
58+
- save_cache:
59+
key: v1-npm-deps-{{ checksum "package-lock.json" }}
60+
paths:
61+
- "node_modules"
62+
63+
test:
64+
executor: hugo/default
65+
steps:
66+
- attach_workspace:
67+
at: .
68+
- run:
69+
name: "Static analysis"
70+
command: |
71+
htmlproofer public \
72+
--log-level info \
73+
--checks-to-ignore '' \
74+
--directory-index-file index.html \
75+
--extension .html \
76+
--timeframe '1h' \
77+
--typhoeus-config '{}' \
78+
--check-html true \
79+
--disable-external true
80+
81+
workflows:
82+
continuous:
83+
jobs:
84+
- build:
85+
name: "Build docs"
86+
- test:
87+
name: "Validate HTML"
88+
requires:
89+
- "Build docs"

.github/workflows/publish.yml

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
# Publish site to GitHub Pages
2+
name: Publish site to GitHub Pages
3+
4+
on:
5+
# Runs on pushes targeting the default branch
6+
push:
7+
branches:
8+
- main
9+
10+
# Allows you to run this workflow manually from the Actions tab
11+
workflow_dispatch:
12+
13+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
14+
permissions:
15+
contents: read
16+
pages: write
17+
id-token: write
18+
19+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
20+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
21+
concurrency:
22+
group: "pages"
23+
cancel-in-progress: false
24+
25+
# Default to bash
26+
defaults:
27+
run:
28+
shell: bash
29+
30+
jobs:
31+
# Build job
32+
build:
33+
runs-on: ubuntu-latest
34+
env:
35+
HUGO_VERSION: 0.132.2
36+
steps:
37+
- name: Install Hugo CLI
38+
run: |
39+
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
40+
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
41+
- name: Install Dart Sass
42+
run: sudo snap install dart-sass
43+
- name: Checkout
44+
uses: actions/checkout@v4
45+
with:
46+
submodules: recursive
47+
fetch-depth: 0
48+
- name: Setup Node.js
49+
uses: actions/setup-node@v4
50+
with:
51+
node-version: '20'
52+
cache: 'npm'
53+
- name: Setup Pages
54+
id: pages
55+
uses: actions/configure-pages@v4
56+
- name: Install dependencies
57+
run: "npm ci"
58+
- name: Build production website
59+
env:
60+
# For maximum backward compatibility with Hugo modules
61+
HUGO_ENVIRONMENT: production
62+
HUGO_ENV: production
63+
TZ: America/New_York
64+
run: |
65+
npm run build \
66+
-- \
67+
--baseURL "${{ steps.pages.outputs.base_url }}/"
68+
- name: Upload artifact
69+
uses: actions/upload-pages-artifact@v3
70+
with:
71+
path: ./public
72+
73+
# Deployment job
74+
deploy:
75+
environment:
76+
name: github-pages
77+
url: ${{ steps.deployment.outputs.page_url }}
78+
runs-on: ubuntu-latest
79+
needs: build
80+
steps:
81+
- name: Deploy to GitHub Pages
82+
id: deployment
83+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.env
2+
.netlify
3+
.hugo_build.lock
4+
node_modules
5+
public
6+
resources/_gen
7+
hugo_stats.json

.gitpod.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Source: https://github.com/gitpod-io/template-hugo/blob/main/.gitpod.yml
2+
3+
# List the start up tasks. Learn more https://www.gitpod.io/docs/config-start-tasks/
4+
tasks:
5+
- name: Run start up tasks
6+
before: brew install hugo
7+
init: pnpm install
8+
command: hugo server --baseURL $(gp url 1313) --liveReloadPort=443 --appendPort=false --bind=0.0.0.0 --disableFastRender --noHTTPCache --navigateToChanged
9+
10+
# List the ports to expose. Learn more https://www.gitpod.io/docs/config-ports/
11+
ports:
12+
- port: 1313
13+
onOpen: open-preview

.npmignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.env
2+
.netlify
3+
.hugo_build.lock
4+
node_modules
5+
public
6+
resources

.npmrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
enable-pre-post-scripts=true
2+
auto-install-peers=true
3+
node-linker=hoisted
4+
prefer-symlinked-executables=false

.prettierignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
*.html
2+
*.ico
3+
*.png
4+
*.jp*g
5+
*.toml
6+
*.*ignore
7+
*.svg
8+
*.xml
9+
LICENSE
10+
.npmrc
11+
.gitkeep
12+
*.woff*

.prettierrc.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Default config
2+
tabWidth: 4
3+
endOfLine: crlf
4+
singleQuote: true
5+
printWidth: 100000
6+
trailingComma: none
7+
bracketSameLine: true
8+
quoteProps: consistent
9+
experimentalTernaries: true
10+
11+
# Overrided config
12+
overrides:
13+
- files: ["*.md", "*.json", "*.yaml"]
14+
options:
15+
tabWidth: 2
16+
singleQuote: false
17+
- files: ["*.scss"]
18+
options:
19+
singleQuote: false

.vscode/extensions.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"recommendations": ["budparr.language-hugo-vscode", "yzhang.markdown-all-in-one", "tamasfe.even-better-toml", "dbaeumer.vscode-eslint", "DavidAnson.vscode-markdownlint", "stylelint.vscode-stylelint"]
3+
}

.vscode/settings.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"editor.wordWrap": "off",
3+
"files.trimTrailingWhitespace": true,
4+
"files.insertFinalNewline": true,
5+
"editor.tabSize": 2,
6+
"editor.insertSpaces": true,
7+
}

0 commit comments

Comments
 (0)