Skip to content

Commit

Permalink
Merge branch 'master' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenjoezhang authored Nov 26, 2022
2 parents d9fec85 + 58a8f8c commit c336d6e
Show file tree
Hide file tree
Showing 111 changed files with 1,753 additions and 1,403 deletions.
5 changes: 0 additions & 5 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,6 @@ Please paste the content of your _config.yml between two "```" provided below
```yaml
```

**Your theme `_config.yml`** (Optional)

```
```

**Hexo and Plugin version(`npm ls --depth 0`)**

<!--
Expand Down
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Ask a Question, Help, Discuss
url: https:/hexojs/hexo/discussions
about: I have a question, help for hexo (e.g. Customize)
7 changes: 2 additions & 5 deletions .github/ISSUE_TEMPLATE/other.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ Please take extra precaution not to attach any secret environment variables (lik
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:/hexojs/hexo/discussions) if your issue is a question.

## Information

Expand All @@ -41,11 +43,6 @@ Please check followings before submitting a new issue.
```
```

**Your theme `_config.yml`** (Optional)

```
```

**Hexo and Plugin version(`npm ls --depth 0`)**

```
Expand Down
65 changes: 0 additions & 65 deletions .github/ISSUE_TEMPLATE/question-help.md

This file was deleted.

9 changes: 0 additions & 9 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,6 @@ Thank you for creating a pull request to contribute to Hexo code! Before you ope



## How to test

```sh
git clone -b BRANCH https:/USER/hexo.git
cd hexo
npm install
npm test
```

## Screenshots


Expand Down
14 changes: 4 additions & 10 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,7 @@ updates:
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 20
ignore:
- dependency-name: husky
versions:
- 5.0.9
- 5.1.0
- 5.1.1
- 5.1.2
- 5.1.3
- 5.2.0
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: daily
28 changes: 0 additions & 28 deletions .github/release-drafter.yml

This file was deleted.

17 changes: 11 additions & 6 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
node-version: ['12', '14', '16']
node-version: ['14', '16', '18']
fail-fast: false
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
Expand All @@ -33,12 +33,12 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
node-version: ['12', '14', '16']
node-version: ['14', '16', '18']
fail-fast: false
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
Expand All @@ -52,3 +52,8 @@ jobs:
project: ./.tmp-hexo-theme-unit-test/0x/
login: ${{ secrets.SURGE_LOGIN }}
token: ${{ secrets.SURGE_TOKEN }}
- name: Comment PR
uses: marocchino/sticky-pull-request-comment@v2
with:
message: |
Publish flamegraph to https://${{ github.sha }}-${{ matrix.node-version }}-hexo.surge.sh/flamegraph.html
25 changes: 25 additions & 0 deletions .github/workflows/commenter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Commenter

on: [pull_request_target]

permissions:
contents: read

jobs:
commenter:
permissions:
pull-requests: write # for marocchino/sticky-pull-request-comment to create or update PR comment
runs-on: ubuntu-latest
steps:
- name: Comment PR
uses: marocchino/sticky-pull-request-comment@v2
with:
message: |
## How to test
```sh
git clone -b ${{ github.head_ref }} https:/${{ github.event.pull_request.head.repo.full_name }}.git
cd hexo
npm install
npm test
```
7 changes: 5 additions & 2 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@ name: Linter

on: [push, pull_request]

permissions:
contents: read

jobs:
linter:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Use Node.js 14.x
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: '14.x'
- name: Install Dependencies
Expand Down
14 changes: 0 additions & 14 deletions .github/workflows/release-drafter.yml

This file was deleted.

18 changes: 0 additions & 18 deletions .github/workflows/stale.yml

This file was deleted.

16 changes: 11 additions & 5 deletions .github/workflows/tester.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,21 @@ name: Tester

on: [push, pull_request]

permissions:
contents: read

jobs:
tester:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
node-version: ['12.x', '14.x', '16.x']
node-version: ['14.x', '16.x', '18.x']
fail-fast: false
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install Dependencies
Expand All @@ -23,15 +26,18 @@ jobs:
env:
CI: true
coverage:
permissions:
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']
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install Dependencies
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ package-lock.json
.nyc_output/
coverage/
.tmp*
.vscode
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged
2 changes: 0 additions & 2 deletions .mocharc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,4 @@ reporter: spec
ui: bdd
full-trace: true
exit: true
require:
- "chai/register-should"
parallel: true
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2012-2019 Tommy Chen
Copyright (c) 2012-present Tommy Chen

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

Expand Down
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@
$ npm install hexo-cli -g
```

Install with [brew](https://brew.sh/) on macOS and Linux:

```bash
$ brew install hexo
```

**Setup your blog**

``` bash
Expand Down Expand Up @@ -89,7 +95,7 @@ Also, we welcome PR or issue to [official-plugins](https:/hexojs).

## Sponsors

<a href="https://www.jetbrains.com/"><img src="/.github/jetbrains-variant-4.svg" alt="JetBrains" width="200"/></a>
<a href="https://linktr.ee/rss3"><img src="https://d1fdloi71mui9q.cloudfront.net/8xxahBqRTnecXgXKObeo_L8ks2KjC31fmM5Nd" alt="RSS3" width="200"/></a>

## License

Expand Down
2 changes: 1 addition & 1 deletion lib/box/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const Promise = require('bluebird');
const File = require('./file');
const { Pattern, createSha1Hash } = require('hexo-util');
const { createReadStream, readdir, stat, watch } = require('hexo-fs');
const { magenta } = require('chalk');
const { magenta } = require('picocolors');
const { EventEmitter } = require('events');
const { isMatch, makeRe } = require('micromatch');

Expand Down
Loading

0 comments on commit c336d6e

Please sign in to comment.