Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: libre-knowledge/subject-template
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v3.0.1
Choose a base ref
...
head repository: libre-knowledge/subject-template
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
  • 12 commits
  • 24 files changed
  • 1 contributor

Commits on Aug 24, 2024

  1. docs: fix: Remove error in line continuation in git submodule add ope…

    …ration
    
    Signed-off-by: 林博仁(Buo-ren Lin) <[email protected]>
    brlin-tw committed Aug 24, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    ad8b812 View commit details

Commits on Sep 27, 2024

  1. docs(README): 修正缺少的親主題說明文件參照連結建立步驟

    Signed-off-by: 林博仁(Buo-ren Lin) <[email protected]>
    brlin-tw committed Sep 27, 2024
    Copy the full SHA
    f3db038 View commit details
  2. docs(README): 修正缺少的 pre-commit 框架配套 Git 提交前掛勾程序的安裝步驟

    Signed-off-by: 林博仁(Buo-ren Lin) <[email protected]>
    brlin-tw committed Sep 27, 2024
    Copy the full SHA
    dfe90ee View commit details

Commits on Sep 29, 2024

  1. docs(README): 修正引入說明中錯誤的獲取 GitLab 專案版控庫地址的說明

    Signed-off-by: 林博仁(Buo-ren Lin) <[email protected]>
    brlin-tw committed Sep 29, 2024
    Copy the full SHA
    c984c30 View commit details

Commits on Oct 1, 2024

  1. refactor: Incorporate 3.1.0 version of The Common Project Template(in…

    …consistent release description fix)
    
    Signed-off-by: 林博仁(Buo-ren Lin) <[email protected]>
    brlin-tw committed Oct 1, 2024
    Copy the full SHA
    b4b513d View commit details

Commits on Oct 15, 2024

  1. docs(README): Fix incorrect order of GitLab new project settings forms

    Signed-off-by: 林博仁(Buo-ren Lin) <[email protected]>
    brlin-tw committed Oct 15, 2024
    Copy the full SHA
    e800732 View commit details

Commits on Oct 21, 2024

  1. git: fix: 移除已過時的 REUSE DEP5 配置檔路徑屬性配置

    Signed-off-by: 林博仁(Buo-ren Lin) <[email protected]>
    brlin-tw committed Oct 21, 2024
    Copy the full SHA
    86eebdd View commit details

Commits on Oct 27, 2024

  1. fix(gitlab-ci): Fix Git submodules not included in the release archive

    Signed-off-by: 林博仁(Buo-ren Lin) <[email protected]>
    brlin-tw committed Oct 27, 2024
    Copy the full SHA
    649f1b7 View commit details
  2. fix(github-actions/release): Fix Git submodules not included in relea…

    …se archives
    
    Signed-off-by: 林博仁(Buo-ren Lin) <[email protected]>
    brlin-tw committed Oct 27, 2024
    Copy the full SHA
    11a9ac1 View commit details
  3. fix(github-actions/release): Limit fetch depth to reduce submodule ch…

    …eckout time
    
    Signed-off-by: 林博仁(Buo-ren Lin) <[email protected]>
    brlin-tw committed Oct 27, 2024
    Copy the full SHA
    a68dd6b View commit details

Commits on Nov 8, 2024

  1. docs(real.README): 新增官方文件與第三方文件區段內容模板

    Signed-off-by: 林博仁(Buo-ren Lin) <[email protected]>
    brlin-tw committed Nov 8, 2024
    Copy the full SHA
    54696f4 View commit details
  2. fix(gitlab-ci): 修正 GitLab CI 任務非必要地取出 Git 子模組

    減少 GitLab CI 任務執行所需時間
    
    Signed-off-by: 林博仁(Buo-ren Lin) <[email protected]>
    brlin-tw committed Nov 8, 2024
    Copy the full SHA
    61ce180 View commit details
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
# This file is based on The Common EditorConfig Template project
# https://github.com/the-common/editorconfig-template
#
# Copyright 2021 林博仁(Buo-ren, Lin) <Buo.Ren.Lin@gmail.com>
# Copyright 2021 林博仁(Buo-ren, Lin) <buo.ren.lin@gmail.com>
# SPDX-License-Identifier: WTFPL

# This is the top-most EditorConfig file
6 changes: 3 additions & 3 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -7,12 +7,12 @@
# * Git - gitattributes Documentation
# https://www.git-scm.com/docs/gitattributes
#
# Copyright 2023 林博仁(Buo-ren, Lin) <Buo.Ren.Lin@gmail.com>
# SPDX-License-Identifier: CC-BY-SA-4.0
# Copyright 2024 林博仁(Buo-ren Lin) <buo.ren.lin@gmail.com>
# SPDX-License-Identifier: CC-BY-SA-4.0 OR LicenseRef-Apache-2.0-If-Not-Used-In-Template-Projects

# Avoid exporting development files to release archive
/.* export-ignore
/continuous-integration/ export-ignore
/continuous-integration export-ignore

# Keep editorconfig for ease of editing of product files
/.editorconfig -export-ignore
4 changes: 2 additions & 2 deletions .github/workflows/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# workflows

放置 [GitHub Actions](https://github.com/features/actions) 的工作流程(workflow)定義檔
Workflow definition files of the [GitHub Actions Continuous Integration(CI) service](https://github.com/features/actions)

## 參考資料<br>Reference
## Reference

* [Features • GitHub Actions](https://github.com/features/actions)
Product page
20 changes: 10 additions & 10 deletions .github/workflows/check-potential-problems.yml
Original file line number Diff line number Diff line change
@@ -1,45 +1,45 @@
# 用來檢查專案中的潛在問題的 GitHub Actions 工作流程(workflow)定義檔
# GitHub Actions workflow for checking potential problems in the project
#
# 編輯參考:
# References:
#
# * Workflow syntax for GitHub Actions - GitHub Docs
# https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions
#
# Copyright 2022 林博仁(Buo-ren, Lin) <Buo.Ren.Lin@gmail.com>
# SPDX-License-Identifier: CC-BY-SA-4.0
name: 檢查專案中的潛在問題
# Copyright 2024 林博仁(Buo-ren Lin) <buo.ren.lin@gmail.com>
# SPDX-License-Identifier: CC-BY-SA-4.0 OR LicenseRef-Apache-2.0-If-Not-Used-In-Template-Projects
name: Check potential problems in the project
on:
push:
branches:
- '**'
jobs:
check-using-precommit:
name: 使用 pre-commit 檢查專案中的潛在問題
name: Check potential problems using pre-commit
runs-on: ubuntu-22.04
env:
PIP_CACHE_DIR: ${{ github.workspace }}/.cache/pip
PRE_COMMIT_HOME: ${{ github.workspace }}/.cache/pre-commit
SHELLCHECK_DIR: ${{ github.workspace }}/.cache/shellcheck-stable
steps:
- name: 自版控庫取出內容
- name: Check out content from the Git repository
uses: actions/checkout@v4

- name: Configure PyPI data cache to speed up continuous integration
uses: actions/cache@v3
uses: actions/cache@v4
with:
key: ${{ runner.os }}-pip
path: ${{ env.PIP_CACHE_DIR }}

- name: >-
Configure pre-commit data cache to speed up continuous integration
uses: actions/cache@v3
uses: actions/cache@v4
with:
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
path: ${{ env.PRE_COMMIT_HOME }}
- name: >-
Configure pre-built ShellCheck cache to speed up continuous integration
uses: actions/cache@v3
uses: actions/cache@v4
with:
key: ${{ runner.os }}-${{ runner.arch }}-shellcheck
path: ${{ env.SHELLCHECK_DIR }}
18 changes: 15 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -5,8 +5,8 @@
# * Workflow syntax for GitHub Actions - GitHub Docs
# https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions
#
# Copyright 2023 林博仁(Buo-ren, Lin) <Buo.Ren.Lin@gmail.com>
# SPDX-License-Identifier: CC-BY-SA-4.0
# Copyright 2024 林博仁(Buo-ren Lin) <buo.ren.lin@gmail.com>
# SPDX-License-Identifier: CC-BY-SA-4.0 OR LicenseRef-Apache-2.0-If-Not-Used-In-Template-Projects
name: Release product and their build aritfacts
on:
push:
@@ -29,6 +29,10 @@ jobs:
# WORKAROUND: Adding this option triggers actions/checkout#1467
#fetch-tags: true

# Also recursively fetch submodules
# WORKAROUND: Adding this option triggers actions/checkout#1959
#submodules: true

- name: >-
WORKAROUND: Fetch tags that points to the revisions
checked-out(actions/checkout#1467)
@@ -40,6 +44,14 @@ jobs:
--depth=100 \
--no-recurse-submodules
- name: >-
WORKAROUND: Checkout submodules recursively(actions/checkout#1959)
run: |-
git submodule update \
--init \
--recursive \
--depth 1
- name: Determine the project identifier
run: printf "project_id=${GITHUB_REPOSITORY##*/}\\n" >> $GITHUB_ENV

@@ -66,7 +78,7 @@ jobs:
run: ./continuous-integration/generate-release-description.sh

- name: Publish the release archive to the GitHub Releases
uses: softprops/action-gh-release@v0.1.15
uses: softprops/action-gh-release@v2
with:
name: ${{ env.project_id }} ${{ env.release_version }}
files: |
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@
# This file is based on The Common .gitignore Templates
# https://github.com/the-common/gitignore-templates
#
# Copyright 2022 林博仁(Buo-ren, Lin) <Buo.Ren.Lin@gmail.com>
# Copyright 2022 林博仁(Buo-ren, Lin) <buo.ren.lin@gmail.com>
# SPDX-License-Identifier: CC-BY-SA-4.0 OR LicenseRef-Apache-2.0-If-Not-Used-In-Template-Projects

# Don't track regular Unix hidden files
7 changes: 6 additions & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@
# * `.gitlab-ci.yml` keyword reference | GitLab
# https://docs.gitlab.com/ee/ci/yaml/
#
# Copyright 2023 林博仁(Buo-ren, Lin) <Buo.Ren.Lin@gmail.com>
# Copyright 2024 林博仁(Buo-ren Lin) <buo.ren.lin@gmail.com>
# SPDX-License-Identifier: CC-BY-SA-4.0 OR LicenseRef-Apache-2.0-If-Not-Used-In-Template-Projects
do-static-analysis:
stage: test
@@ -41,6 +41,11 @@ generate-build-artifacts:
script:
- ./continuous-integration/generate-build-artifacts.install-system-deps.sh
- ./continuous-integration/generate-build-artifacts.sh
variables:
GIT_SUBMODULE_STRATEGY: recursive

# Limit fetch depth to reduce submodule checkout time
GIT_SUBMODULE_DEPTH: 1

upload-release-assets:
stage: deploy
30 changes: 16 additions & 14 deletions .markdownlint.yml
Original file line number Diff line number Diff line change
@@ -1,47 +1,49 @@
# Markdownlint(Node.js variant) configuration file
# https://github.com/igorshubovych/markdownlint-cli#configuration
#
# This file is based on The Common Markdownlint(Node.js variant) Configuration Templates project
# https://github.com/Lin-Buo-Ren/common-markdownlint-nodejs-config-templates
# This file is based on The Common Markdownlint(Node.js variant)
# Configuration Templates project
# https://github.com/the-common/markdownlint-nodejs-config-templates
#
# Copyright 2021 林博仁(Buo-ren, Lin) <Buo.Ren.Lin@gmail.com>
# Copyright 2024 林博仁(Buo-ren Lin) <buo.ren.lin@gmail.com>
# SPDX-License-Identifier: CC-BY-SA-4.0 OR LicenseRef-Apache-2.0-If-Not-Used-In-Template-Projects

# Inherit Markdownlint rules
default: True

# Only allow consistent un-ordered list bullet style(allow alternations in sub-levels)
MD004:
# Only allow consistent un-ordered list bullet style(allow alternations
# in sub-levels)
ul-style:
style: sublist

# Only allow 4 spaces as indentation of lists
MD007:
ul-indent:
indent: 4

# Only allow 2 spaces as linebreak sequence
MD009:
no-trailing-spaces:
br_spaces: 2

# Disable line length limitation(not suitable with CJK context)
MD013: False
line-length: False

# Allow missing padding blank line between the heading markup and the context
MD022: False
blanks-around-headings: False

# Allow duplicated non-sibling heading text
MD024:
no-duplicate-heading:
siblings_only: True

# Allow missing padding blank line between a list and its context
MD032: False
blanks-around-lists: False

# Allow using raw HTML markups as workarounds of deficiencies of Markdown
MD033: False
no-inline-html: False

# 佔位字是要被替換掉的,為此規則之特例
MD036: false
no-emphasis-as-heading: false

# Allow using YAML front matter, while not require the definition of the
# `title` property
MD041:
first-line-h1:
front_matter_title: '.*'
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@
# This file is based on The Common Pre-commit Framework Configuration Template
# https://github.com/Lin-Buo-Ren/common-precommit-config-template
#
# Copyright 2021 林博仁(Buo-ren, Lin) <Buo.Ren.Lin@gmail.com>
# Copyright 2021 林博仁(Buo-ren, Lin) <buo.ren.lin@gmail.com>
# SPDX-License-Identifier: CC-BY-SA-4.0 OR LicenseRef-Apache-2.0-If-Not-Used-In-Template-Projects

repos:
@@ -35,7 +35,7 @@ repos:
# Check Markdown documents with Markdownlint(Node.js variant)
# https://github.com/DavidAnson/markdownlint
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.23.2
rev: v0.34.0
hooks:
- id: markdownlint

2 changes: 1 addition & 1 deletion .yamllint
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@
# This file is based on The Unofficial yamllint Configuration Templates
# https://github.com/Lin-Buo-Ren/yamllint-configuration-templates
#
# Copyright 2021 林博仁(Buo-ren, Lin) <Buo.Ren.Lin@gmail.com>
# Copyright 2021 林博仁(Buo-ren, Lin) <buo.ren.lin@gmail.com>
# SPDX-License-Identifier: CC-BY-SA-4.0 OR LicenseRef-Apache-2.0-If-Not-Used-In-Template-Projects
rules:
# Use this rule to control the number of spaces inside braces (`{` and `}`).
16 changes: 11 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -18,10 +18,10 @@
+ 「Visibility Level」選擇「Public」
+ 「Project Configuration」區塊勾選「Initialize repository with a README」
1. 點擊新專案頁面左側欄的 Settings > General 選項開啟 General Settings 設定頁面,進行下列設定:
+ Project description 欄位輸入主題適當的文字描述
+ Topics
- `自由知識協作平台 Libre Knowledge Collaboration Platform`
- `自由知識協作平台主題 L.K.C.P. Topics`
+ Project description 欄位輸入主題適當的文字描述
1. 如果您有 GitHub 組織權限:
1. 開啟[自由知識協作平台(鏡像用) Libre Knowledge Collaboration Platform(Mirrored)](https://github.com/libre-knowledge) 頁面
1. 點擊中間右側的「New」綠色按鈕建立新的專案
@@ -49,14 +49,13 @@
- 於 Include in the home page 欄位將下列項目取消勾選
* Packages
* Deployments
1. 回到新建立之專案的主頁面,點擊頁面右側的藍色「Clone」按鈕以獲取 Git 版控庫的拓製(clone)地址
1. 於本地啟動一個文字終端應用
1. 回到新建立之 GitLab 專案的主頁面,點擊頁面右側的藍色「Code」按鈕以獲取 Git 版控庫的拓製(clone)地址
1. 切換作業目錄至要新增該主題之「自由知識協作平台」根/子主題目錄
1. 執行下列命令將主題專案的 Git 版控庫以 Git 子模組的形式新增至本地先前已拓製到本地的「自由知識協作平台」:

```bash
git submodule add \
--name '_主題中文名稱_ _主題英文名稱_' \'
--name '_主題中文名稱_ _主題英文名稱_' \
https://gitlab.com/libre-knowledge/_主題識別名稱_.git \
'/path/to/自由知識協作平台 Libre Knowledge Collaboration Platform/_親主題路徑(如果有)_/_主題中文名稱_ _主題英文名稱_'
```
@@ -68,11 +67,18 @@
ignore = dirty
```

1. 編輯託管版控庫的 README 文件,加入本主題的參照連結(GitLab 專案連結)與文字描述
1. 將本專案除下列以外專案文件複製到新的主題專案中:
+ README.md
+ .git
+ .gitattributes
+ .markdownlint.yml
1. (選用)於文字終端中切換作業目錄至新主題中後執行下列命令安裝 pre-commit 框架的配套 Git 提交前掛勾程序:

```bash
pre-commit install
```

1. 編輯子模組專案 [real.README.md 主題說明文件模板](real.README.md),將 `_佔位字_` 替換為適當之內容(別忘了替換 `libre-knowledge/_專案ID_`),並移除未使用之(待補)章節
1. 將 [real.markdownlint.yml Markdownlint 配置文件](real.markdownlint.yml)更名為「.markdownlint.yml」
1. 將 [real.gitattributes Git 路徑屬性配置文件](real.gitattributes)更名為「.gitattributes」
@@ -110,7 +116,7 @@

## 參考資料

本章節列舉開發本專案期間所參考的第三方資料
以下列舉撰寫本主題內容時所參考的第三方資源

* [Machine-readable debian/copyright file](https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/)
說明 REUSE DEP5 檔案的撰寫格式
2 changes: 1 addition & 1 deletion continuous-integration/create-gitlab-release.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
# Create GitLab project release
#
# Copyright 2023 林博仁(Buo-ren, Lin) <Buo.Ren.Lin@gmail.com>
# Copyright 2024 林博仁(Buo-ren Lin) <buo.ren.lin@gmail.com>
# SPDX-License-Identifier: CC-BY-SA-4.0 OR LicenseRef-Apache-2.0-If-Not-Used-In-Template-Projects

set \
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
# System dependency installation logic for the static analysis program
#
# Copyright 2023 林博仁(Buo-ren, Lin) <Buo.Ren.Lin@gmail.com>
# Copyright 2024 林博仁(Buo-ren Lin) <buo.ren.lin@gmail.com>
# SPDX-License-Identifier: CC-BY-SA-4.0 OR LicenseRef-Apache-2.0-If-Not-Used-In-Template-Projects
set \
-o errexit \
2 changes: 1 addition & 1 deletion continuous-integration/do-static-analysis.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
# Check potential problems in the project
# Copyright 2023 林博仁(Buo-ren, Lin) <Buo.Ren.Lin@gmail.com>
# Copyright 2024 林博仁(Buo-ren Lin) <buo.ren.lin@gmail.com>
# SPDX-License-Identifier: CC-BY-SA-4.0 OR LicenseRef-Apache-2.0-If-Not-Used-In-Template-Projects
set \
-o errexit \
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
# Install system dependencies required for generating the project
# build artifacts
#
# Copyright 2023 林博仁(Buo-ren, Lin) <buo.ren.lin@gmail.com>
# Copyright 2024 林博仁(Buo-ren Lin) <buo.ren.lin@gmail.com>
# SPDX-License-Identifier: CC-BY-SA-4.0 OR LicenseRef-Apache-2.0-If-Not-Used-In-Template-Projects

set \
Loading