Skip to content

Commit cd73998

Browse files
authored
Initial commit
0 parents  commit cd73998

File tree

117 files changed

+16996
-0
lines changed

Some content is hidden

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

117 files changed

+16996
-0
lines changed

.devcontainer/Dockerfile

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Use an official node image as a parent image
2+
FROM node:20
3+
4+
# Set environment variables for versions
5+
ARG HUGO_VERSION=0.126.1
6+
ARG GO_VERSION=1.22.3
7+
8+
# Install dependencies
9+
RUN apt-get update && \
10+
apt-get install -y ca-certificates openssl git curl && \
11+
rm -rf /var/lib/apt/lists/*
12+
13+
# Determine architecture
14+
RUN ARCH=$(uname -m) && \
15+
if [ "$ARCH" = "aarch64" ]; then ARCH=arm64; else ARCH=amd64; fi && \
16+
echo "Architecture: $ARCH"
17+
18+
# Download and install Hugo
19+
RUN ARCH=$(uname -m) && \
20+
if [ "$ARCH" = "aarch64" ]; then ARCH=arm64; else ARCH=amd64; fi && \
21+
wget -O hugo_extended_${HUGO_VERSION}.tar.gz https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-${ARCH}.tar.gz && \
22+
tar xf hugo_extended_${HUGO_VERSION}.tar.gz && \
23+
mv hugo /usr/bin/hugo && \
24+
rm hugo_extended_${HUGO_VERSION}.tar.gz && \
25+
echo "Hugo installed"
26+
27+
# Download and install Go
28+
RUN ARCH=$(uname -m) && \
29+
if [ "$ARCH" = "aarch64" ]; then ARCH=arm64; else ARCH=amd64; fi && \
30+
wget -O go${GO_VERSION}.linux-${ARCH}.tar.gz https://dl.google.com/go/go${GO_VERSION}.linux-${ARCH}.tar.gz && \
31+
tar -C /usr/local -xzf go${GO_VERSION}.linux-${ARCH}.tar.gz && \
32+
rm go${GO_VERSION}.linux-${ARCH}.tar.gz && \
33+
echo "Go installed"
34+
35+
# Export Go path
36+
ENV PATH=$PATH:/usr/local/go/bin

.devcontainer/devcontainer.json

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"name": "Hugo",
3+
"build": {
4+
"dockerfile": "Dockerfile",
5+
"args": {
6+
"GO_VERSION": "1.22.3",
7+
"HUGO_VERSION": "0.126.1"
8+
}
9+
},
10+
"customizations": {
11+
"vscode": {
12+
"settings": {},
13+
"extensions": [
14+
"bradlc.vscode-tailwindcss",
15+
"budparr.language-hugo-vscode",
16+
"tamasfe.even-better-toml"
17+
]
18+
}
19+
},
20+
"remoteUser": "node",
21+
"postCreateCommand": "npm install && npm run dev:example",
22+
"forwardPorts": [1313]
23+
}

.editorconfig

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
; https://editorconfig.org
2+
3+
root = true
4+
5+
[*]
6+
charset = utf-8
7+
end_of_line = lf
8+
indent_size = 2
9+
indent_style = space
10+
trim_trailing_whitespace = true
11+
insert_final_newline = true
12+
13+
[*.md]
14+
trim_trailing_whitespace = false

.github/ISSUE_TEMPLATE/bug_report.yml

+79
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: 🐛 Bug Report
2+
description: Report any issues you encounter to make hugoplate even more efficient.
3+
4+
body:
5+
- type: input
6+
id: hugo-version
7+
attributes:
8+
label: What is your Hugo Extended Version
9+
description: Check the [README](https://github.com/zeon-studio/hugoplate?tab=readme-ov-file#user-content-️-prerequisites) for the required version. Use "hugo version" in your terminal to see your Hugo version.
10+
validations:
11+
required: true
12+
13+
- type: input
14+
id: go-version
15+
attributes:
16+
label: What is your Go Version
17+
description: Check the [README](https://github.com/zeon-studio/hugoplate?tab=readme-ov-file#user-content-️-prerequisites) for the required version. Use "go version" in your terminal to see your Go version.
18+
validations:
19+
required: true
20+
21+
- type: input
22+
id: node-version
23+
attributes:
24+
label: What is your Node.js Version
25+
description: Check the [README](https://github.com/zeon-studio/hugoplate?tab=readme-ov-file#user-content-️-prerequisites) for the required version. Use "node -v" in your terminal to see your Node.js version.
26+
validations:
27+
required: true
28+
29+
- type: input
30+
id: operating-system
31+
attributes:
32+
label: What is your Operating System
33+
validations:
34+
required: false
35+
36+
- type: checkboxes
37+
id: make-sure
38+
attributes:
39+
label: Check for Existing Issues
40+
description: |
41+
Before reporting a problem, please confirm that you've searched thoroughly for any existing reports on the same issue. If no relevant issues are found, proceed with the report.
42+
options:
43+
- label: I have searched and found no relevant issues.
44+
required: true
45+
46+
- type: textarea
47+
id: expected-behavior
48+
attributes:
49+
label: Expected Behavior
50+
description: A clear description of what you expected to happen.
51+
validations:
52+
required: true
53+
54+
- type: textarea
55+
id: steps-to-reproduce
56+
attributes:
57+
label: Steps to Reproduce
58+
description: |
59+
Please explain the steps required to duplicate this issue. Include detailed commands and expected outcomes.
60+
placeholder: |
61+
1.
62+
2.
63+
3.
64+
validations:
65+
required: true
66+
67+
- type: input
68+
id: reproduction-url
69+
attributes:
70+
label: Code Reproduction URL
71+
description: Please reproduce this issue and provide a link to the repository.
72+
placeholder: github.com/yourusername/repo
73+
74+
- type: textarea
75+
id: additional-information
76+
attributes:
77+
label: Additional Information
78+
description: |
79+
List any other information that is relevant to your issue. You can use Markdown for formatting, including code blocks, links, etc.

.github/workflows/main.yml

+75
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# Sample workflow for building and deploying a Hugo site to GitHub Pages
2+
name: Deploy Hugo site to Pages
3+
4+
on:
5+
# Runs on pushes targeting the default branch
6+
push:
7+
branches: ["main"]
8+
9+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
10+
permissions:
11+
contents: read
12+
pages: write
13+
id-token: write
14+
15+
# Environment variables available to all jobs and steps in this workflow
16+
env:
17+
HUGO_ENV: production
18+
HUGO_VERSION: "0.134.3"
19+
GO_VERSION: "1.22.2"
20+
NODE_VERSION: "20.0.0"
21+
TINA_CLIENT_ID: ${{ vars.TINA_CLIENT_ID }}
22+
TINA_TOKEN: ${{ vars.TINA_TOKEN }}
23+
24+
jobs:
25+
# Build job
26+
build:
27+
runs-on: ubuntu-latest
28+
steps:
29+
- uses: actions/checkout@v4
30+
- name: Set up Node.js
31+
uses: actions/setup-node@v4
32+
with:
33+
node-version: ${{ env.NODE_VERSION }}
34+
35+
- name: Install Hugo
36+
run: |
37+
curl -LO "https://github.com/gohugoio/hugo/releases/download/v${{ env.HUGO_VERSION }}/hugo_extended_${{ env.HUGO_VERSION }}_Linux-64bit.tar.gz"
38+
tar -xvf hugo_extended_${{ env.HUGO_VERSION }}_Linux-64bit.tar.gz
39+
sudo mv hugo /usr/local/bin/
40+
rm hugo_extended_${{ env.HUGO_VERSION }}_Linux-64bit.tar.gz
41+
hugo version
42+
43+
- name: Install Go
44+
run: |
45+
curl -LO "https://dl.google.com/go/go${{ env.GO_VERSION }}.linux-amd64.tar.gz"
46+
sudo tar -C /usr/local -xzf go${{ env.GO_VERSION }}.linux-amd64.tar.gz
47+
echo "export PATH=$PATH:/usr/local/go/bin" >> $GITHUB_ENV
48+
rm go${{ env.GO_VERSION }}.linux-amd64.tar.gz
49+
go version
50+
51+
- name: Setup Project
52+
run: npm run project-setup
53+
54+
- name: Install npm dependencies
55+
run: npm install
56+
57+
- name: Publish to GitHub Pages
58+
run: npm run build
59+
60+
- name: Upload artifact
61+
uses: actions/upload-pages-artifact@v3
62+
with:
63+
path: ./public
64+
65+
# Deployment job
66+
deploy:
67+
environment:
68+
name: github-pages
69+
url: ${{ steps.deployment.outputs.page_url }}
70+
runs-on: ubuntu-latest
71+
needs: build
72+
steps:
73+
- name: Deploy to GitHub Pages
74+
id: deployment
75+
uses: actions/deploy-pages@v4

.gitignore

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
Thumbs.db
2+
.DS_Store
3+
.dist
4+
.tmp
5+
.lock
6+
.sass-cache
7+
npm-debug.log
8+
node_modules
9+
builds
10+
package-lock.json
11+
public
12+
resources
13+
.hugo_build.lock
14+
jsconfig.json
15+
hugo_stats.json
16+
go.sum
17+
yarn.lock

.gitlab-ci.yml

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
stages:
2+
- build
3+
4+
variables:
5+
HUGO_ENV: production
6+
HUGO_VERSION: "0.134.3"
7+
GO_VERSION: "1.22.2"
8+
NODE_VERSION: "18.16.1"
9+
10+
cache:
11+
paths:
12+
- node_modules/
13+
14+
default:
15+
image: node:${NODE_VERSION}
16+
before_script:
17+
- echo "USING NODE ${NODE_VERSION}"
18+
- apt-get update && apt-get install -y curl
19+
- curl -LO "https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_Linux-64bit.tar.gz"
20+
- tar -xvf hugo_extended_${HUGO_VERSION}_Linux-64bit.tar.gz
21+
- mv hugo /usr/local/bin/
22+
- rm hugo_extended_${HUGO_VERSION}_Linux-64bit.tar.gz
23+
- echo "HUGO ${HUGO_VERSION} INSTALLED"
24+
- curl -LO "https://dl.google.com/go/go${GO_VERSION}.linux-amd64.tar.gz"
25+
- tar -C /usr/local -xzf go${GO_VERSION}.linux-amd64.tar.gz
26+
- export PATH=$PATH:/usr/local/go/bin
27+
- rm go${GO_VERSION}.linux-amd64.tar.gz
28+
- echo "GO ${GO_VERSION} INSTALLED"
29+
- npm install
30+
31+
pages:
32+
stage: build
33+
script:
34+
- npm run project-setup
35+
- npm run build
36+
artifacts:
37+
paths:
38+
- public

.jshintrc

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
{
2+
"maxerr": 50,
3+
"bitwise": true,
4+
"camelcase": false,
5+
"curly": true,
6+
"eqeqeq": true,
7+
"forin": true,
8+
"freeze": true,
9+
"immed": true,
10+
"indent": 2,
11+
"latedef": true,
12+
"newcap": false,
13+
"noarg": true,
14+
"noempty": true,
15+
"nonbsp": true,
16+
"nonew": true,
17+
"plusplus": false,
18+
"undef": true,
19+
"unused": false,
20+
"strict": true,
21+
"maxparams": false,
22+
"maxdepth": 4,
23+
"maxstatements": false,
24+
"maxcomplexity": false,
25+
"maxlen": 400,
26+
"browser": true,
27+
"devel": true,
28+
"asi": false,
29+
"boss": false,
30+
"debug": false,
31+
"eqnull": false,
32+
"es3": false,
33+
"es5": false,
34+
"esversion": 12,
35+
"moz": false,
36+
"evil": true,
37+
"expr": true,
38+
"funcscope": false,
39+
"globalstrict": false,
40+
"iterator": false,
41+
"lastsemic": false,
42+
"laxbreak": false,
43+
"laxcomma": false,
44+
"loopfunc": true,
45+
"multistr": true,
46+
"noyield": false,
47+
"notypeof": false,
48+
"proto": false,
49+
"scripturl": false,
50+
"shadow": false,
51+
"sub": false,
52+
"supernew": false,
53+
"validthis": false,
54+
"globals": {
55+
"jQuery": false,
56+
"google": false,
57+
"$": false
58+
}
59+
}

.markdownlint.json

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"MD033": false,
3+
"MD034": false,
4+
"MD013": false
5+
}

.prettierrc

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"plugins": ["prettier-plugin-go-template"],
3+
"overrides": [
4+
{
5+
"files": ["*.html"],
6+
"options": {
7+
"parser": "go-template",
8+
"goTemplateBracketSpacing": true,
9+
"bracketSameLine": true
10+
}
11+
}
12+
]
13+
}

.vscode/extensions.json

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"recommendations": [
3+
"bradlc.vscode-tailwindcss",
4+
"budparr.language-hugo-vscode",
5+
"tamasfe.even-better-toml"
6+
]
7+
}

0 commit comments

Comments
 (0)