Skip to content

Commit

Permalink
✨ Feature: add hexo 5.0 support
Browse files Browse the repository at this point in the history
  • Loading branch information
Molunerfinn committed Aug 9, 2020
1 parent 1296062 commit 68e605c
Show file tree
Hide file tree
Showing 5 changed files with 77 additions and 6 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: publish
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: '12.x'
registry-url: 'https://registry.npmjs.org'
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
node_modules/*
node_modules/
yarn.lock
.DS_Store
_config.demo.yml
10 changes: 10 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
node_modules/
yarn-error.log
package-lock.json
.vscode/
.travis.yml
.github/
yarn.lock
.eslintignore
.eslintrc
stylus_format.json
48 changes: 47 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,28 +70,74 @@ See [releases](https://github.com/Molunerfinn/hexo-theme-melody/releases).

# Installation

**Notice: The installation method before and after hexo 5.0 version is different.**

## Hexo version < 5.0

Find your hexo work folder


```bash
git clone -b master https://github.com/Molunerfinn/hexo-theme-melody themes/melody
```

If you don't have jade & stylus renderer, follow this:

```bash
npm install hexo-renderer-jade hexo-renderer-stylus
npm install hexo-renderer-pug hexo-renderer-stylus
```

In your hexo site's `_config.yml`, find the `theme` field, change it to `melody`:

```yaml
theme: melody
```

## Hexo version >= 5.0

```
npm install hexo-theme-melody
```

If you don't have jade & stylus renderer, follow this:

```bash
npm install hexo-renderer-pug hexo-renderer-stylus
```

In your hexo site's `_config.yml`, find the `theme` field, change it to `melody`:


# Configuration

**Notice: The configuration file before and after hexo 5.0 version is different.**

## Hexo version < 5.0

For smoothly updating theme-melody, I recommand to create a config file named `melody.yml` in your hexo work folder's (**Notice: not the theme-melody folder**) `source/_data` folder(If it doesn't exist, create one)

Copy the contents of `_config.yml` to `melody.yml`. Now you can configure it by yourself and you can update theme-melody smoothly.

## Hexo version >= 5.0

1. create a `_config.melody.yml` in your hexo work folder.
2. copy the contents of `./node_modules/hexo-theme-melody/_config.yml` to `_config.melody.yml`
3. If you have used `hexo-theme-melody` for a long time, and has a `melody.yml` above, please copy the contents of `melody.yml` to `_config.melody.yml` & remove `melody.yml` since it will be deprecated.

Now you can configure it by yourself and you can update theme-melody smoothly.

# Update

**Notice: The update method before and after hexo 5.0 version is different.**

## Hexo version < 5.0

Jump into the melody folder, just `git pull` is OK.

## Hexo version >= 5.0

In your hexo work folder, just `npm update hexo-theme-melody` is OK.

> For more details, please check [documentation](https://molunerfinn.com/hexo-theme-melody-doc/)
# Browser Support
Expand Down
6 changes: 2 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"cz": "git-cz",
"release": "bump-version"
},
"dependencies": {
"devDependencies": {
"cross-env": "^5.1.3",
"eslint": "^4.4.1",
"eslint-config-standard": "^10.2.1",
Expand All @@ -15,9 +15,7 @@
"eslint-plugin-promise": "^3.5.0",
"eslint-plugin-standard": "^3.0.1",
"nib": "^1.1.2",
"stylus-supremacy": "^1.6.3"
},
"devDependencies": {
"stylus-supremacy": "^1.6.3",
"@commitlint/cli": "^7.5.2",
"@picgo/bump-version": "^1.0.3",
"commitizen": "^3.0.7",
Expand Down

0 comments on commit 68e605c

Please sign in to comment.