generated from gethinode/template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 72fb2aa
Showing
36 changed files
with
10,196 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
assets/js/critical/color.js | ||
assets/js/analytics.js | ||
assets/js/flexsearch.js | ||
assets/js/sharing.js | ||
assets/js/vendor | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
env: | ||
browser: true | ||
es6: true | ||
extends: | ||
- standard | ||
globals: | ||
Atomics: readonly | ||
SharedArrayBuffer: readonly | ||
parserOptions: | ||
ecmaVersion: 2018 | ||
sourceType: module | ||
rules: {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Please see the documentation for all configuration options: | ||
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: "npm" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
versioning-strategy: increase |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Source: https://nicolasiensen.github.io/2022-07-23-automating-dependency-updates-with-dependabot-github-auto-merge-and-github-actions/ | ||
name: Dependabot auto-merge | ||
on: pull_request_target | ||
|
||
permissions: | ||
pull-requests: write | ||
contents: write | ||
|
||
jobs: | ||
review-dependabot-pr: | ||
runs-on: ubuntu-latest | ||
if: ${{ github.event.pull_request.user.login == 'dependabot[bot]' }} | ||
steps: | ||
- name: Dependabot metadata | ||
id: metadata | ||
uses: dependabot/fetch-metadata@v1 | ||
with: | ||
github-token: "${{ secrets.GITHUB_TOKEN }}" | ||
|
||
- name: Enable auto-merge for Dependabot PRs | ||
run: gh pr merge --auto --merge "$PR_URL" | ||
env: | ||
PR_URL: ${{github.event.pull_request.html_url}} | ||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | ||
|
||
- name: Approve patch and minor updates | ||
if: ${{steps.dependabot-metadata.outputs.update-type == 'version-update:semver-patch' || steps.dependabot-metadata.outputs.update-type == 'version-update:semver-minor'}} | ||
run: gh pr review $PR_URL --approve -b "I'm **approving** this pull request because **it includes a patch or minor update**" | ||
env: | ||
PR_URL: ${{github.event.pull_request.html_url}} | ||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | ||
|
||
- name: Comment on major updates of any dependencies | ||
if: ${{steps.dependabot-metadata.outputs.update-type == 'version-update:semver-major'}} | ||
run: | | ||
gh pr comment $PR_URL --body "I'm **not approving** this PR because **it includes a major update of a dependency**" | ||
gh pr edit $PR_URL --add-label "requires-manual-qa" | ||
env: | ||
PR_URL: ${{github.event.pull_request.html_url}} | ||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
name: Lint & build | ||
on: | ||
workflow_dispatch: | ||
push: | ||
tags: | ||
- v* | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
env: | ||
CACHE_KEY: 'hugo-hinode-template' | ||
CACHE_PATH_DEBIAN: '/tmp/hugo_cache_runner' | ||
CACHE_PATH_WIN: '~\AppData\Local\hugo_cache' | ||
CACHE_PATH_MAC: '/Users/runner/Library/Caches/hugo_cache' | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: lts/* | ||
cache: 'npm' | ||
cache-dependency-path: '**/package-lock.json' | ||
|
||
# [24/AUG/23] Adjusted from npm ci to prevent EBADPLATFORM error due to fsevents | ||
- name: Install npm | ||
run: npm i | ||
|
||
- name: Lint the source files | ||
run: npm run lint | ||
|
||
build: | ||
needs: lint | ||
|
||
strategy: | ||
matrix: | ||
os: [macos-latest, windows-latest, ubuntu-latest] | ||
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/ | ||
node-version: [18.x, 20.x] | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: 'npm' | ||
cache-dependency-path: '**/package-lock.json' | ||
|
||
- name: Install Dart Sass | ||
run: | | ||
if [ "$RUNNER_OS" == "Linux" ]; then | ||
sudo snap install dart-sass | ||
elif [ "$RUNNER_OS" == "macOS" ]; then | ||
brew install sass/sass/sass | ||
elif [ "$RUNNER_OS" == "Windows" ]; then | ||
choco install sass | ||
fi | ||
shell: bash | ||
|
||
# [24/AUG/23] Adjusted from npm ci for non-macOS to prevent EBADPLATFORM error due to fsevents | ||
- name: Perform clean install of npm | ||
run: | | ||
if [ "$RUNNER_OS" == "macOS" ]; then | ||
npm ci | ||
else | ||
npm i | ||
fi | ||
shell: bash | ||
|
||
# Cache Hugo cachedir and resourcedir (configured in config/ci/hugo.toml) for each OS | ||
# No additional cache invalidation is needed, Hugo uses checksums itself | ||
- name: Use Hugo cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: ${{ runner.os == 'Windows' && env.CACHE_PATH_WIN || runner.os == 'macOS' && env.CACHE_PATH_MAC || env.CACHE_PATH_DEBIAN }} | ||
key: ${{ runner.os }}-${{ env.CACHE_KEY }} | ||
restore-keys: | | ||
${{ runner.os }}-${{ env.CACHE_KEY }} | ||
- name: Build main site | ||
run: npm run build:cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
name: Update Hugo dependencies | ||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '0 3 * * *' # run daily at 03:00 AM | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
jobs: | ||
update-mod: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: lts/* | ||
cache: 'npm' | ||
cache-dependency-path: '**/package-lock.json' | ||
|
||
# [26/AUG/23] Adjusted from npm ci to prevent EBADPLATFORM error due to fsevents | ||
- name: Install npm | ||
run: npm i | ||
|
||
- name: Update Hugo module dependencies | ||
id: mod-updates | ||
run: | | ||
MOD_OUTPUT=$(npm run mod:update 2>&1) | ||
echo "$MOD_OUTPUT" | ||
MOD_UPDATES=$(echo "$MOD_OUTPUT" | grep '^go: upgraded' | sed 's/go: / - /' | sort -u) | ||
echo 'MOD_UPDATES<<EOF' >> $GITHUB_OUTPUT | ||
echo "$MOD_UPDATES" >> "$GITHUB_OUTPUT" | ||
echo 'EOF' >> $GITHUB_OUTPUT | ||
- name: Create Pull Request | ||
uses: gethinode-actions/create-pull-request@v5 | ||
with: | ||
token: ${{ secrets.HUGO_MOD_PR }} | ||
commit-message: 'fix: update Hugo module dependencies' | ||
committer: GitHub <[email protected]> | ||
branch: hugo-mod-dependencies | ||
delete-branch: true | ||
title: 'Update Hugo module dependencies' | ||
body: | | ||
This PR is auto-generated by [create-pull-request][1]. | ||
Changes to go.mod: | ||
${{ steps.mod-updates.outputs.MOD_UPDATES }} | ||
[1]: https://github.com/peter-evans/create-pull-request | ||
labels: dependencies | ||
add-paths: | | ||
go.mod | ||
go.sum | ||
# add **/go.mod **/go.sum if your repository contains any modules in a subfolder |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/_vendor | ||
/public | ||
resources/ | ||
node_modules/ | ||
|
||
.DS_store | ||
.hugo_build.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"config": { | ||
"default": true, | ||
"MD013": false, | ||
"MD024": false, | ||
"MD026": false, | ||
"MD033": false, | ||
"MD034": false, | ||
"MD051": false, | ||
"MD053": false | ||
}, | ||
"ignores": ["node_modules", "CHANGELOG.md"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
assets/scss/common/_variables.scss | ||
assets/scss/components/_syntax-dark.scss | ||
assets/scss/components/_syntax-light.scss | ||
assets/scss/vendor | ||
assets/scss/theme/fonts.scss | ||
assets/scss/app.scss | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
{ | ||
"extends": "stylelint-config-standard-scss", | ||
"rules": { | ||
"no-empty-source": null, | ||
"scss/comment-no-empty": null, | ||
"scss/at-extend-no-missing-placeholder": null, | ||
"scss/dollar-variable-colon-space-after": null, | ||
"scss/dollar-variable-empty-line-before": null, | ||
"color-function-notation": null, | ||
"alpha-value-notation": null, | ||
"selector-id-pattern": null, | ||
"selector-class-pattern": null, | ||
"scss/no-global-function-names": null, | ||
"number-max-precision": null, | ||
"hue-degree-notation": null, | ||
"value-no-vendor-prefix": null, | ||
"property-no-vendor-prefix": null, | ||
"at-rule-no-unknown": [ | ||
true, | ||
{ | ||
"ignoreAtRules": [ | ||
"extend", | ||
"at-root", | ||
"debug", | ||
"warn", | ||
"error", | ||
"if", | ||
"else", | ||
"for", | ||
"each", | ||
"while", | ||
"mixin", | ||
"include", | ||
"content", | ||
"return", | ||
"function", | ||
"tailwind", | ||
"apply", | ||
"responsive", | ||
"variants", | ||
"screen" | ||
] | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2024 Mark Dumay | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
Oops, something went wrong.