-
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.
feat: support hugo and doks as github pages (#1)
- Loading branch information
Showing
132 changed files
with
8,673 additions
and
25 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,11 @@ | ||
# editorconfig.org | ||
|
||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true |
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,2 @@ | ||
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,31 @@ | ||
{ | ||
"env": { | ||
"browser": true, | ||
"commonjs": true, | ||
"es6": true, | ||
"node": true | ||
}, | ||
"extends": "eslint:recommended", | ||
"globals": { | ||
"Atomics": "readonly", | ||
"SharedArrayBuffer": "readonly" | ||
}, | ||
"parserOptions": { | ||
"ecmaVersion": 2018, | ||
"sourceType": "module" | ||
}, | ||
"rules": { | ||
"no-console": 0, | ||
"quotes": ["error", "single"], | ||
"comma-dangle": [ | ||
"error", | ||
{ | ||
"arrays": "always-multiline", | ||
"objects": "always-multiline", | ||
"imports": "always-multiline", | ||
"exports": "always-multiline", | ||
"functions": "ignore" | ||
} | ||
] | ||
} | ||
} |
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,37 @@ | ||
name: deploy github pages | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
branches: | ||
- main | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: [20.x] | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Run linters | ||
run: npm run lint --if-present | ||
|
||
- name: Build site | ||
run: npm run build | ||
|
||
- name: Deploy github pages | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./public |
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 |
---|---|---|
@@ -1,24 +1,13 @@ | ||
# Compiled class file | ||
*.class | ||
|
||
# Log file | ||
*.log | ||
|
||
# BlueJ files | ||
*.ctxt | ||
|
||
# Mobile Tools for Java (J2ME) | ||
.mtj.tmp/ | ||
|
||
# Package Files # | ||
*.jar | ||
*.war | ||
*.nar | ||
*.ear | ||
*.zip | ||
*.tar.gz | ||
*.rar | ||
|
||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml | ||
hs_err_pid* | ||
replay_pid* | ||
.eslintcache | ||
.stylelintcache | ||
.netlify | ||
.hugo_build.lock | ||
yarn-error.log | ||
node_modules | ||
public | ||
resources | ||
pnpm-lock.yaml | ||
|
||
.idea | ||
.vscode | ||
.impl |
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 @@ | ||
# Source: | ||
# - https://github.com/gitpod-io/template-hugo | ||
# - https://www.gitpod.io/docs/configure/workspaces/tasks#one-line-tasks | ||
|
||
tasks: | ||
- name: Run development server | ||
init: pnpm install | ||
command: pnpm dev | ||
|
||
ports: | ||
- port: 1313 | ||
onOpen: open-preview |
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,14 @@ | ||
{ | ||
"config": { | ||
"default": true, | ||
"MD013": false, | ||
"MD022": false, | ||
"MD024": false, | ||
"MD025": false, | ||
"MD026": false, | ||
"MD033": false, | ||
"MD034": false, | ||
"MD036": false | ||
}, | ||
"ignores": ["node_modules", "CHANGELOG.md", "README.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,6 @@ | ||
node_modules | ||
public | ||
resources | ||
.netlify | ||
.hugo_build.lock | ||
yarn-error.log |
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,4 @@ | ||
enable-pre-post-scripts = true | ||
auto-install-peers = true | ||
node-linker = hoisted | ||
prefer-symlinked-executables = false |
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,2 @@ | ||
assets/scss/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,37 @@ | ||
{ | ||
"extends": "stylelint-config-standard-scss", | ||
"rules": { | ||
"no-empty-source": null, | ||
"string-quotes": "double", | ||
"scss/comment-no-empty": null, | ||
"max-line-length": null, | ||
"scss/at-extend-no-missing-placeholder": 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 |
---|---|---|
@@ -1 +1,26 @@ | ||
# satellites-labs.github.io | ||
# xlabs-club.github.io | ||
|
||
This is the source of [xlabs.club][]. | ||
|
||
卫星实验室,一个专注于研究卫星以及 CRM 的开源组织。 | ||
|
||
## 本地开发 | ||
|
||
本项目使用 [Hugo](https://gohugo.io/) 开发,使用 [Doks]((https://github.com/gethyas/doks)) 作为主题,本地开发时先安装 Nodejs,然后使用 npm(或 pnpm) 安装 Hugo。 | ||
|
||
```bash | ||
|
||
# 安装 npm 依赖包 | ||
npm install | ||
|
||
# 启动 Web,然后浏览器访问 http://localhost:1313/即可浏览效果,更多命令请参考 package.json | ||
npm run dev | ||
|
||
``` | ||
|
||
## License | ||
|
||
本文档采用 [CC BY-NC 4.0][] 许可协议。 | ||
|
||
[xlabs.club]: https://www.xlabs.club | ||
[CC BY-NC 4.0]: https://creativecommons.org/licenses/by-nc/4.0/ |
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 @@ | ||
|
||
// disable docs links, see https://www.docsy.dev/docs/adding-content/repository-links/ | ||
.td-page-meta--view { display: none !important; } | ||
.td-page-meta--edit { display: none !important; } | ||
.td-page-meta--child { display: none !important; } | ||
.td-page-meta--issue { display: none !important; } | ||
.td-page-meta--project-issue { display: none !important; } |
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,86 @@ | ||
title = "XLabs" | ||
baseurl = "/" | ||
canonifyURLs = false | ||
disableAliases = true | ||
disableHugoGeneratorInject = true | ||
# disableKinds = ["taxonomy", "term"] | ||
enableEmoji = true | ||
enableGitInfo = true | ||
enableRobotsTXT = true | ||
languageCode = "zh-CN" | ||
paginate = 10 | ||
rssLimit = 10 | ||
summarylength = 20 # 70 (default) | ||
|
||
# Multilingual | ||
defaultContentLanguage = "zh" | ||
disableLanguages = ["en"] | ||
defaultContentLanguageInSubdir = false | ||
|
||
copyRight = "Copyright (c) 2020-2023 Henk Verlinde" | ||
|
||
[social] | ||
twitter = "getdoks" | ||
|
||
[outputs] | ||
home = ["HTML", "RSS", "searchIndex"] | ||
section = ["HTML", "RSS", "SITEMAP"] | ||
|
||
[outputFormats.searchIndex] | ||
mediaType = "application/json" | ||
baseName = "search-index" | ||
isPlainText = true | ||
notAlternative = true | ||
|
||
# Add output format for section sitemap.xml | ||
[outputFormats.SITEMAP] | ||
mediaType = "application/xml" | ||
baseName = "sitemap" | ||
isHTML = false | ||
isPlainText = true | ||
noUgly = true | ||
rel = "sitemap" | ||
|
||
[sitemap] | ||
changefreq = "monthly" | ||
filename = "sitemap.xml" | ||
priority = 0.5 | ||
|
||
[caches] | ||
[caches.getjson] | ||
dir = ":cacheDir/:project" | ||
maxAge = "30m" | ||
|
||
[taxonomies] | ||
contributor = "contributors" | ||
category = "categories" | ||
tag = "tags" | ||
|
||
[permalinks] | ||
blog = "/blog/:slugorfilename/" | ||
docs = "/docs/:sections[1:]/:slugorfilename/" | ||
# docs = "/docs/1.0/:sections[1:]/:slug/" | ||
|
||
[minify.tdewolff.html] | ||
keepWhitespace = false | ||
|
||
[related] | ||
threshold = 80 | ||
includeNewer = true | ||
toLower = false | ||
[[related.indices]] | ||
name = "categories" | ||
weight = 100 | ||
[[related.indices]] | ||
name = "tags" | ||
weight = 80 | ||
[[related.indices]] | ||
name = "date" | ||
weight = 10 | ||
|
||
[imaging] | ||
anchor = "Smart" | ||
bgColor = "#ffffff" | ||
hint = "photo" | ||
quality = 75 | ||
resampleFilter = "Box" |
Oops, something went wrong.