Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
septs committed Aug 12, 2023
0 parents commit a9e9371
Show file tree
Hide file tree
Showing 154 changed files with 5,602 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[themes/**/*]
insert_final_newline = false
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# https://github.com/github/linguist/blob/master/docs/overrides.md
content/**/* linguist-documentation
themes/**/* linguist-vendored
5 changes: 5 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners

* @project-trans/ftmwiki-editors

/themes/ftmwiki/* @septs
3 changes: 3 additions & 0 deletions .github/auto_assign.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
addReviewers: true
reviewers: [/editors, /mtfwiki-delegates]
numberOfReviewers: 0
33 changes: 33 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Publish

on:
workflow_dispatch:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build:
runs-on: ubuntu-22.04
if: "! contains(toJSON(github.event.commits.*.message), '[skip ci]')"
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v3
- uses: peaceiris/actions-hugo@v2
with:
hugo-version: latest
extended: true
- run: npm ci
- run: npx prettier --check .
- run: npx markdownlint-cli "**/*.md"
- run: hugo --minify
- run: npx wrangler pages publish public --project-name ftmwiki --branch main
if: github.ref == 'refs/heads/main'
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CF_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }}
18 changes: 18 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/node_modules

# Generated files by hugo
**/public
**/resources
**/assets/jsconfig.json
**/hugo_stats.json

# Executable may be added to repository
**/hugo.exe
**/hugo.darwin
**/hugo.linux

# Temporary lock file while building
**/.hugo_build.lock

# macOS
*.DS_Store
4 changes: 4 additions & 0 deletions .markdownlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"line-length": false,
"code-block-style": false
}
3 changes: 3 additions & 0 deletions .markdownlintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/node_modules
/public
/resources
7 changes: 7 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
public
resources
**/assets/jsconfig.json
**/layouts

*.min.css
*.min.js
7 changes: 7 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"quoteProps": "consistent",
"singleQuote": true,
"semi": false,
"trailingComma": "all",
"printWidth": 120
}
8 changes: 8 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"recommendations": [
"EditorConfig.EditorConfig",
"DavidAnson.vscode-markdownlint",
"esbenp.prettier-vscode",
"redhat.vscode-yaml"
]
}
23 changes: 23 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll": true
},
"editor.defaultFormatter": "esbenp.prettier-vscode",
"files.associations": {
"**/LICENSE": "plaintext",
"**/CODEOWNERS": "plaintext",
"**/layouts/**/*": "plaintext",
"**/public/**/*": "plaintext",
"**/jsconfig.json": "plaintext",
"_headers": "plaintext",
"_redirects": "plaintext"
},
"search.exclude": {
"**/LICENSE": true,
"**/public/**/*": true,
"**/resources/**/*": true,
"**/themes/ftmwiki/**/*": true,
"**/*.svg": true
}
}
21 changes: 21 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "Serve",
"group": "test",
"type": "shell",
"command": "hugo",
"args": ["serve"],
"isBackground": true
},
{
"label": "Build",
"group": "build",
"type": "shell",
"command": "hugo",
"isBackground": false,
"promptOnClose": true
}
]
}
35 changes: 35 additions & 0 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# 参与开发

这里默认您已经安装好 [Node.js](https://nodejs.org)[Hugo](https://gohugo.io) 环境。

编辑器指定为 [Visual Studio Code](https://code.visualstudio.com) 下称 VSCode。

参与文档开发请使用 [content.code-workspace](content.code-workspace) 初始化 VSCode。

参与主题开发请使用 [theme.code-workspace](theme.code-workspace) 初始化 VSCode。

Install:

```console
$ npm ci

added 2 packages, and audited 3 packages in 4s

found 0 vulnerabilities
```

Watch:

```console
$ hugo serve
Start building sites …
hugo v0.102.3+extended darwin/amd64 BuildDate=unknown
```

Build:

```console
$ hugo
Start building sites …
hugo v0.102.3+extended darwin/amd64 BuildDate=unknown
```
Loading

0 comments on commit a9e9371

Please sign in to comment.