From 3c81fc899c5d48168b41ac4f794f3c3c58a6c0d4 Mon Sep 17 00:00:00 2001 From: Yufan You Date: Wed, 5 Aug 2020 21:14:10 +0800 Subject: [PATCH 1/5] ci: check links --- .github/workflows/build-test.yml | 47 ++++++++++++++++---------------- 1 file changed, 24 insertions(+), 23 deletions(-) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 0f769fdb7..765d66e8f 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -1,30 +1,31 @@ name: "Build Test" -on: - pull_request: - branches: - - hugo +on: [push, pull_request] jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: Fetch submodules - run: git submodule update --init --recursive - - name: Setup Node - uses: actions/setup-node@v1 - with: - node-version: '13.x' - - run: npm install - - name: Setup Hugo - uses: peaceiris/actions-hugo@v2 - with: - hugo-version: '0.69.2' - extended: true - - name: Build Site - run: | - git config --global core.quotePath false - HUGO_ENV=production hugo --minify + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Fetch submodules + run: git submodule update --init --recursive + - name: Setup Node + uses: actions/setup-node@v1 + with: + node-version: "13.x" + - run: npm install + - name: Setup Hugo + uses: peaceiris/actions-hugo@v2 + with: + hugo-version: "0.69.2" + extended: true + - name: Build Site + run: | + git config --global core.quotePath false + HUGO_ENV=production hugo --minify + - name: Check links + uses: peter-evans/link-checker@v1 + with: + args: -v -r public From b32b8b298ec0dd3799e3c8ab5a7eba2de619620d Mon Sep 17 00:00:00 2001 From: Yufan You Date: Wed, 5 Aug 2020 21:20:01 +0800 Subject: [PATCH 2/5] ci(check-link): set root directory --- .github/workflows/build-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 765d66e8f..45481017b 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -28,4 +28,4 @@ jobs: - name: Check links uses: peter-evans/link-checker@v1 with: - args: -v -r public + args: -v -r public -d public From 0d19ad01f3fa027cf86de256428d280040999356 Mon Sep 17 00:00:00 2001 From: Yufan You Date: Wed, 5 Aug 2020 21:21:32 +0800 Subject: [PATCH 3/5] ci(check-link): fail on errors --- .github/workflows/build-test.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 45481017b..ed07bde84 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -26,6 +26,9 @@ jobs: git config --global core.quotePath false HUGO_ENV=production hugo --minify - name: Check links + id: check-links uses: peter-evans/link-checker@v1 with: args: -v -r public -d public + - name: Fail on link errors + run: exit ${{ steps.check-links.outputs.exit_code }} From a0e4ff21c25330efde2d65125104bcd574c2040c Mon Sep 17 00:00:00 2001 From: Yufan You Date: Wed, 5 Aug 2020 21:24:17 +0800 Subject: [PATCH 4/5] ci(check-link): disable verbose --- .github/workflows/build-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index ed07bde84..e7af4c354 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -29,6 +29,6 @@ jobs: id: check-links uses: peter-evans/link-checker@v1 with: - args: -v -r public -d public + args: -r public -d public - name: Fail on link errors run: exit ${{ steps.check-links.outputs.exit_code }} From c9bc69f6e1344046e5d947103ec02f004380b746 Mon Sep 17 00:00:00 2001 From: Yufan You Date: Wed, 5 Aug 2020 21:31:29 +0800 Subject: [PATCH 5/5] fix(contributing): fix link to build from source --- content/en/docs/Contribution guidelines/_index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/docs/Contribution guidelines/_index.md b/content/en/docs/Contribution guidelines/_index.md index 5e0cc308f..c29025c4c 100644 --- a/content/en/docs/Contribution guidelines/_index.md +++ b/content/en/docs/Contribution guidelines/_index.md @@ -24,7 +24,7 @@ You are here to help CP Editor? Awesome, feel free and read the following sectio **First time to developing?** There's a big difference between developing and competitive programming, but it's not hard. The first thing you should know is Object-Oriented Programming. Basically, you need to know how classes work in C++, and you should know it's a rule to put the class definitions in the `.hpp` files, and put the implementation of the functions in the `.cpp` files. The source code of the CP Editor is a good example. Google for what you want to implement is usually helpful. Copy and modify the source codes if you want to implement something similar to an existing feature. If you are looking for an IDE for developing, [VS Code](https://code.visualstudio.com/) is probably a good choice. -**First time to Qt?** Don't be afraid, Qt is not hard to get started. You have to install Qt>=5.14 and CMake>=3.5 first. Linux users may install them using the package manager on your system. Windows users may download Qt [here](https://www.qt.io/offline-installers) and it's recommended to use [Visual Studio](https://visualstudio.microsoft.com/) and install the CMake plugin. Read the [build from source](doc/INSTALL.md#Build-from-source) section to learn how to build. Read the [Qt docs](https://doc.qt.io/) on how to use Qt built-in widgets, how to design the UI and how to use the [signals and slots](https://doc.qt.io/qt-5/signalsandslots.html). Usually, you don't need anything from the std namespace, for example, use `QString` instead of `std::string`. +**First time to Qt?** Don't be afraid, Qt is not hard to get started. You have to install Qt>=5.14 and CMake>=3.5 first. Linux users may install them using the package manager on your system. Windows users may download Qt [here](https://www.qt.io/offline-installers) and it's recommended to use [Visual Studio](https://visualstudio.microsoft.com/) and install the CMake plugin. Read the [build from source](../installation/build-from-source) section to learn how to build. Read the [Qt docs](https://doc.qt.io/) on how to use Qt built-in widgets, how to design the UI and how to use the [signals and slots](https://doc.qt.io/qt-5/signalsandslots.html). Usually, you don't need anything from the std namespace, for example, use `QString` instead of `std::string`. **Don't know where to start?** You can start by looking through the [issues](https://github.com/cpeditor/cpeditor/issues) and find one you are interested in. The [good first issues](https://github.com/cpeditor/cpeditor/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) may be suitable for you. Ask in the [Telegram group](https://t.me/cpeditor) or under the issues if you have any questions.