From 8b95bbc722e5c77a7e8125441ed64d2ea3524ac0 Mon Sep 17 00:00:00 2001 From: Kagamigawa <35628460+KagamigawaMeguri@users.noreply.github.com> Date: Mon, 1 May 2023 22:30:53 +0800 Subject: [PATCH 1/6] fix(post-asset): strip extensions better on permalink (#5153) * compatible with hexo-abbrlink * strip extensions better on permalink --- lib/models/post_asset.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/models/post_asset.js b/lib/models/post_asset.js index 9c3c3778f8..656acdbac4 100644 --- a/lib/models/post_asset.js +++ b/lib/models/post_asset.js @@ -1,7 +1,7 @@ 'use strict'; const { Schema } = require('warehouse').default; -const { join } = require('path'); +const { join, dirname } = require('path'); module.exports = ctx => { const PostAsset = new Schema({ @@ -19,8 +19,8 @@ module.exports = ctx => { // PostAsset.path is file path relative to `public_dir` // no need to urlescape, #1562 - // strip /\.html?$/ extensions on permalink, #2134 - return join(post.path.replace(/\.html?$/, ''), this.slug); + // strip extensions better on permalink, #2134 + return join(dirname(post.path), post.slug, this.slug); }); PostAsset.virtual('source').get(function() { From 981560f51dcb6b480fd8c10e3554c3c1b1422076 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 21 Jun 2023 19:36:42 +0900 Subject: [PATCH 2/6] chore: bump c8 from 7.14.0 to 8.0.0 (#5227) Bumps [c8](https://github.com/bcoe/c8) from 7.14.0 to 8.0.0. - [Release notes](https://github.com/bcoe/c8/releases) - [Changelog](https://github.com/bcoe/c8/blob/main/CHANGELOG.md) - [Commits](https://github.com/bcoe/c8/compare/v7.14.0...v8.0.0) --- updated-dependencies: - dependency-name: c8 dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c8fc3c53da..22194c1ad8 100644 --- a/package.json +++ b/package.json @@ -67,7 +67,7 @@ "devDependencies": { "@easyops/git-exec-and-restage": "^1.0.4", "0x": "^5.1.2", - "c8": "^7.12.0", + "c8": "^8.0.0", "chai": "^4.3.6", "cheerio": "0.22.0", "decache": "^4.6.1", From b267475d306b616ab9a3cd37e904d36524aad8be Mon Sep 17 00:00:00 2001 From: yoshinorin Date: Wed, 26 Jul 2023 00:17:19 +0900 Subject: [PATCH 3/6] chore(github): delete `other` issue template (#5248) --- .github/ISSUE_TEMPLATE/other.md | 58 --------------------------------- 1 file changed, 58 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/other.md diff --git a/.github/ISSUE_TEMPLATE/other.md b/.github/ISSUE_TEMPLATE/other.md deleted file mode 100644 index 6d0d667285..0000000000 --- a/.github/ISSUE_TEMPLATE/other.md +++ /dev/null @@ -1,58 +0,0 @@ ---- -name: Other -about: Not a question, feature-request, bug -title: '' -labels: '' -assignees: '' - ---- - - - -## Check List - -Please check followings before submitting a new issue. - -- [ ] I have already confirmed other issue template and they are not different my want -- [ ] Not a question, feature-request, bug - - Please submit to [discussion](https://github.com/hexojs/hexo/discussions) if your issue is a question. - -## Information - - - -## Environment & Settings - -**Node.js & npm version** - -``` -``` - -**Your site `_config.yml`** (Optional) - -``` -``` - -**Hexo and Plugin version(`npm ls --depth 0`)** - -``` -``` - -**Your package.json `package.json`** - -``` -``` - -## Others - - From 4707a2d33b93052d0e3e3781d8f4313febd2d5cb Mon Sep 17 00:00:00 2001 From: D-Sketon <2055272094@qq.com> Date: Mon, 9 Oct 2023 15:56:42 +0800 Subject: [PATCH 4/6] Revert "fix(post-asset): strip extensions better on permalink (#5153)" (#5308) This reverts commit 8b95bbc722e5c77a7e8125441ed64d2ea3524ac0. --- lib/models/post_asset.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/models/post_asset.js b/lib/models/post_asset.js index 656acdbac4..9c3c3778f8 100644 --- a/lib/models/post_asset.js +++ b/lib/models/post_asset.js @@ -1,7 +1,7 @@ 'use strict'; const { Schema } = require('warehouse').default; -const { join, dirname } = require('path'); +const { join } = require('path'); module.exports = ctx => { const PostAsset = new Schema({ @@ -19,8 +19,8 @@ module.exports = ctx => { // PostAsset.path is file path relative to `public_dir` // no need to urlescape, #1562 - // strip extensions better on permalink, #2134 - return join(dirname(post.path), post.slug, this.slug); + // strip /\.html?$/ extensions on permalink, #2134 + return join(post.path.replace(/\.html?$/, ''), this.slug); }); PostAsset.virtual('source').get(function() { From ad056527cee2c55fa961cc84a56f44ea55404c63 Mon Sep 17 00:00:00 2001 From: Uiolee <22849383+uiolee@users.noreply.github.com> Date: Mon, 9 Oct 2023 15:57:32 +0800 Subject: [PATCH 5/6] ci: reduce the running of ci (#5291) --- .github/workflows/linter.yml | 17 +++++++++++++++-- .github/workflows/tester.yml | 25 ++++++++++++++++++++----- 2 files changed, 35 insertions(+), 7 deletions(-) diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index d3d9678043..8211d38999 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -1,6 +1,19 @@ name: Linter -on: [push, pull_request] +on: + push: + branches: + - "master" + - "v7.0.0" + paths: + - "lib/**" + - "test/**" + - ".github/workflows/linter.yml" + pull_request: + paths: + - "lib/**" + - "test/**" + - ".github/workflows/linter.yml" permissions: contents: read @@ -13,7 +26,7 @@ jobs: - name: Use Node.js 14.x uses: actions/setup-node@v3 with: - node-version: '14.x' + node-version: "14.x" - name: Install Dependencies run: npm install - name: Lint diff --git a/.github/workflows/tester.yml b/.github/workflows/tester.yml index a28cf0a77d..c245376116 100644 --- a/.github/workflows/tester.yml +++ b/.github/workflows/tester.yml @@ -1,6 +1,21 @@ name: Tester -on: [push, pull_request] +on: + push: + branches: + - "master" + - "v7.0.0" + paths: + - "lib/**" + - "test/**" + - "package.json" + - ".github/workflows/tester.yml" + pull_request: + paths: + - "lib/**" + - "test/**" + - "package.json" + - ".github/workflows/tester.yml" permissions: contents: read @@ -11,7 +26,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, windows-latest, macos-latest] - node-version: ['14.x', '16.x', '18.x'] + node-version: ["14.x", "16.x", "18.x"] fail-fast: false steps: - uses: actions/checkout@v3 @@ -27,13 +42,13 @@ jobs: CI: true coverage: permissions: - checks: write # for coverallsapp/github-action to create new checks - contents: read # for actions/checkout to fetch code + checks: write # for coverallsapp/github-action to create new checks + contents: read # for actions/checkout to fetch code runs-on: ${{ matrix.os }} strategy: matrix: os: [ubuntu-latest] - node-version: ['14.x'] + node-version: ["14.x"] steps: - uses: actions/checkout@v3 - name: Use Node.js ${{ matrix.node-version }} From f173abcb7be7c3d0580fcacc66e7602490bdd42b Mon Sep 17 00:00:00 2001 From: Uiolee <22849383+uiolee@users.noreply.github.com> Date: Sun, 22 Oct 2023 01:47:43 +0800 Subject: [PATCH 6/6] chore(github): use github issue form (#5319) Co-authored-by: D-Sketon <2055272094@qq.com> --- .github/ISSUE_TEMPLATE/bug_report.md | 93 ----------- .github/ISSUE_TEMPLATE/bug_report.yml | 148 ++++++++++++++++++ .github/ISSUE_TEMPLATE/config.yml | 2 +- .../feature-request-improvement.md | 23 --- .../feature-request-improvement.yml | 36 +++++ 5 files changed, 185 insertions(+), 117 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/bug_report.yml delete mode 100644 .github/ISSUE_TEMPLATE/feature-request-improvement.md create mode 100644 .github/ISSUE_TEMPLATE/feature-request-improvement.yml diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index 353fae2aca..0000000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,93 +0,0 @@ ---- -name: Bug report -about: Something isn't working as expected -title: '' -labels: '' -assignees: '' - ---- - - - -## Check List - -Please check followings before submitting a new issue. - -- [ ] I have already read [Docs page](https://hexo.io/docs/) & [Troubleshooting page](https://hexo.io/docs/troubleshooting) -- [ ] I have already searched existing issues and they are not help to me -- [ ] I examined error or warning messages and it's difficult to solve -- [ ] Using [the latest](https://github.com/hexojs/hexo/releases) version of Hexo (run `hexo version` to check) -- [ ] Node.js is higher than [minimum required version](https://hexo.io/docs/#Minimum-required-Node-js-version) - -## Expected behavior - -## Actual behavior - -## How to reproduce? - -* Step1 -* Step2 -* etc... - -## Is the problem still there under "Safe mode"? - - - -## Environment & Settings - -**Node.js & npm version(`node -v && npm -v`)** - - - -``` -``` - -**Your site `_config.yml`** (Optional) - - - -```yaml -``` - -**Hexo and Plugin version(`npm ls --depth 0`)** - - - -``` -``` - -**Your package.json `package.json`** - - - -``` -``` - -## Others - - diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000000..4c1e219d45 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,148 @@ +name: Bug report +description: Something isn't working as expected. +# title: "" +# labels: [] +# assignees: [] + +body: + - type: markdown + attributes: + value: | + ## Tips + + - 给简体中文用户的提示: + + - 在提交 issue 时请按照下面的模板提供相关信息,这将有助于我们发现问题。 + - 请尽量使用英语描述你遇到的问题,这可以让更多的人帮助到你。 + + - A good bug report should have your configuration and build environment information, which are essential for us to investigate the problem. We've provided the following steps on how to attach the necessary information. + + - If you find that markdown files are not rendered as expected, please go to https://marked.js.org/demo/ to see if it can be reproduced there. If it can be reproduced, please file a bug to https://github.com/markedjs/marked. + + - If you want help on your bug, please also send us the git repository (GitHub, GitLab, Bitbucket, etc.) where your hexo code is stored. It would greatly help. If you prefer not to have your hexo code out in public, please upload to a private GitHub repository and grant read-only access to `hexojs/core`. + + - Please take extra precaution not to attach any secret or personal information. (likes personal privacy, password, GitHub Personal Access Token, etc.) + + ------ + + - type: checkboxes + validations: + required: true + attributes: + label: Check List + description: Please check followings before submitting a new issue. + options: + - label: I have already read [Docs page](https://hexo.io/docs/) & [Troubleshooting page](https://hexo.io/docs/troubleshooting). + - label: I have already searched existing issues and they are not help to me. + - label: I examined error or warning messages and it's difficult to solve. + - label: I am using the [latest](https://github.com/hexojs/hexo/releases) version of Hexo. (run `hexo version` to check) + - label: My Node.js is matched [the required version](https://hexo.io/docs/#Required-Node-js-version). + + - type: textarea + validations: + required: true + attributes: + label: Expected behavior + # description: + placeholder: Descripe what you expected to happen. + # value: + # render: + + - type: textarea + validations: + required: true + attributes: + label: Actual behavior + # description: + placeholder: Descripe what actually happen. + # value: + # render: + + - type: textarea + validations: + required: true + attributes: + label: How to reproduce? + description: How do you trigger this bug? Please walk us through it step by step. + placeholder: | + 1. Step1 + 2. Step2 + 3. etc. + ... + # value: + # render: + + - type: input + validations: + required: true + attributes: + label: Is the problem still there under `Safe mode`? + description: | + https://hexo.io/docs/commands#Safe-mode + + "Safe mode" will disable all the plugins and scripts. + If your problem disappear under "Safe mode" means the problem is probably at your newly installed plugins, not at hexo. + # placeholder: + # value: | + # render: + + - type: markdown + attributes: + value: | + ------ + + ## Environment & Settings + + - type: textarea + validations: + required: false + attributes: + label: Your Node.js & npm version + description: | + Please run `node -v && npm -v` + and paste the output here. + placeholder: node -v && npm -v + # value: | + render: text + + - type: textarea + validations: + required: false + attributes: + label: Your Hexo and Plugin version + description: | + Please run `npm ls --depth 0` + and paste the output here. + placeholder: npm ls --depth 0 + # value: + render: text + + - type: textarea + validations: + required: false + attributes: + label: Your `package.json` + description: Please paste the content of `package.json` here. + placeholder: package.json + # value: + render: json + + - type: textarea + validations: + required: false + attributes: + label: Your site's `_config.yml` (Optional) + description: Please paste the content of your `_config.yml` here. + placeholder: _config.yml + # value: | + render: yaml + + - type: textarea + validations: + required: false + attributes: + label: Others + description: If you have other information. Please write here. + # placeholder: + # value: + # render: diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 3c6bdca6bd..5548b4bc8c 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -2,4 +2,4 @@ blank_issues_enabled: false contact_links: - name: Ask a Question, Help, Discuss url: https://github.com/hexojs/hexo/discussions - about: I have a question, help for hexo (e.g. Customize) \ No newline at end of file + about: I have a question, help for hexo (e.g. Customize) diff --git a/.github/ISSUE_TEMPLATE/feature-request-improvement.md b/.github/ISSUE_TEMPLATE/feature-request-improvement.md deleted file mode 100644 index 46f8ad6691..0000000000 --- a/.github/ISSUE_TEMPLATE/feature-request-improvement.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -name: Feature request / Improvement -about: I have a feature request, suggestion, improvement etc... -title: '' -labels: '' -assignees: '' - ---- - -## Check List - -Please check followings before submitting a new feature request. - -- [ ] I have already read [Docs page](https://hexo.io/docs/) -- [ ] I have already searched existing issues - -## Feature Request - - - -## Others - - diff --git a/.github/ISSUE_TEMPLATE/feature-request-improvement.yml b/.github/ISSUE_TEMPLATE/feature-request-improvement.yml new file mode 100644 index 0000000000..32db67e4e2 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature-request-improvement.yml @@ -0,0 +1,36 @@ +name: Feature request / Improvement +description: I have a feature request, suggestion, improvement etc... +# title: "" +# labels: [] +# assignees: [] + +body: + - type: checkboxes + validations: + required: true + attributes: + label: Check List + description: Please check followings before submitting a new feature request. + options: + - label: I have already read [Docs page](https://hexo.io/docs/). + - label: I have already searched existing issues. + + - type: textarea + validations: + required: true + attributes: + label: Feature Request + description: Descripe the feature and why it is needed. + # placeholder: + # value: + # render: + + - type: textarea + validations: + required: false + attributes: + label: Others + description: If you have other information. Please write here. + # placeholder: + # value: + # render: