chore: minor fixes and add travis ci
parent
e4cdb01dd8
commit
a8b7dd6c12
|
@ -0,0 +1,53 @@
|
||||||
|
language: node_js
|
||||||
|
|
||||||
|
os: linux
|
||||||
|
|
||||||
|
cache: false
|
||||||
|
|
||||||
|
node_js:
|
||||||
|
- "8"
|
||||||
|
- "node"
|
||||||
|
|
||||||
|
before_script:
|
||||||
|
- export DEPS=$(node -e "const deps=require('./package.json').peerDependencies;console.log(Object.keys(deps).map(key=>key+'@'+deps[key]).join(' '));")
|
||||||
|
- npm install $DEPS
|
||||||
|
|
||||||
|
script:
|
||||||
|
- echo "Running tests against $(node -v) ..."
|
||||||
|
- npm run lint
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
include:
|
||||||
|
- stage: github pages
|
||||||
|
node_js: "10"
|
||||||
|
git:
|
||||||
|
clone: false
|
||||||
|
script:
|
||||||
|
- echo "Publish site to github pages ..."
|
||||||
|
- git clone --recurse-submodules https://github.com/ppoffice/hexo-theme-icarus.git -b site $TRAVIS_BUILD_DIR
|
||||||
|
- cd $TRAVIS_BUILD_DIR/themes/icarus
|
||||||
|
- git fetch origin $TRAVIS_COMMIT && git merge $TRAVIS_COMMIT
|
||||||
|
- export DEPS=$(node -e "const deps=require('./package.json').peerDependencies;console.log(Object.keys(deps).map(key=>key+'@'+deps[key]).join(' '));")
|
||||||
|
- cd $TRAVIS_BUILD_DIR
|
||||||
|
- npm install -g hexo-cli
|
||||||
|
- npm install
|
||||||
|
- npm install $DEPS
|
||||||
|
- cp _config.theme.yml themes/icarus/_config.yml
|
||||||
|
- hexo g
|
||||||
|
deploy:
|
||||||
|
provider: pages
|
||||||
|
token: $GITHUB_TOKEN
|
||||||
|
keep_history: false
|
||||||
|
local_dir: public
|
||||||
|
skip_cleanup: true
|
||||||
|
on:
|
||||||
|
tags: true
|
||||||
|
|
||||||
|
- stage: github release
|
||||||
|
node_js: "10"
|
||||||
|
script: echo "Deploying to github release ..."
|
||||||
|
deploy:
|
||||||
|
provider: releases
|
||||||
|
token: $GITHUB_TOKEN
|
||||||
|
on:
|
||||||
|
tags: true
|
28
README.md
28
README.md
|
@ -75,7 +75,7 @@ blog feature-rich and powerful.
|
||||||
<td>Baidu</td>
|
<td>Baidu</td>
|
||||||
<td>Share.js</td>
|
<td>Share.js</td>
|
||||||
<td>External Site Links</td>
|
<td>External Site Links</td>
|
||||||
<td>Light Gallery and Justified Gallery</td>
|
<td>Light and Justified Gallery</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Gitalk</td>
|
<td>Gitalk</td>
|
||||||
|
@ -134,14 +134,14 @@ Icarus directly import stylesheets from the [highlight.js](https://highlightjs.o
|
||||||
|
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Atom One Light</td>
|
<th>Atom One Light</th>
|
||||||
<td>Monokai</td>
|
<th>Monokai</th>
|
||||||
<td>Kimbie Dark</td>
|
<th>Kimbie Dark</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><img src="https://ppoffice.github.io/hexo-theme-icarus/gallery/code-highlight/atom-one-light.png?1"></td>
|
<td><img width="266" src="https://ppoffice.github.io/hexo-theme-icarus/gallery/code-highlight/atom-one-light.png?1"></td>
|
||||||
<td><img src="https://ppoffice.github.io/hexo-theme-icarus/gallery/code-highlight/monokai.png?1"></td>
|
<td><img width="266" src="https://ppoffice.github.io/hexo-theme-icarus/gallery/code-highlight/monokai.png?1"></td>
|
||||||
<td><img src="https://ppoffice.github.io/hexo-theme-icarus/gallery/code-highlight/kimbie-dark.png"></td>
|
<td><img width="266" src="https://ppoffice.github.io/hexo-theme-icarus/gallery/code-highlight/kimbie-dark.png"></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
@ -166,10 +166,10 @@ Icarus allows you to configure your site on a per-page or per-layout basis.
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<pre>widgets:
|
<pre>widgets:
|
||||||
- type: profile
|
- type: profile
|
||||||
position: left
|
position: left
|
||||||
- type: recent_posts
|
- type: recent_posts
|
||||||
position: left</pre>
|
position: left</pre>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<pre>widgets: null
|
<pre>widgets: null
|
||||||
|
@ -180,9 +180,9 @@ Icarus allows you to configure your site on a per-page or per-layout basis.
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><img src="https://ppoffice.github.io/hexo-theme-icarus/gallery/screenshots/default-config.png"></td>
|
<td><img width="266" src="https://ppoffice.github.io/hexo-theme-icarus/gallery/screenshots/default-config.png"></td>
|
||||||
<td><img src="https://ppoffice.github.io/hexo-theme-icarus/gallery/screenshots/post-config.png"></td>
|
<td><img width="266" src="https://ppoffice.github.io/hexo-theme-icarus/gallery/screenshots/post-config.png"></td>
|
||||||
<td><img src="https://ppoffice.github.io/hexo-theme-icarus/gallery/screenshots/layout-config.png"></td>
|
<td><img width="266" src="https://ppoffice.github.io/hexo-theme-icarus/gallery/screenshots/layout-config.png"></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/**
|
/**
|
||||||
* Add resolved variables to the theme config for stylus.
|
* Add resolved variables to the theme config for stylus.
|
||||||
*/
|
*/
|
||||||
module.exports = function (hexo) {
|
module.exports = function(hexo) {
|
||||||
hexo.extend.filter.register('template_locals', locals => {
|
hexo.extend.filter.register('template_locals', locals => {
|
||||||
const fontcdn = hexo.extend.helper.get('fontcdn').bind(hexo);
|
const fontcdn = hexo.extend.helper.get('fontcdn').bind(hexo);
|
||||||
hexo.theme.config['@fontface'] = {
|
hexo.theme.config['@fontface'] = {
|
||||||
|
|
|
@ -10,8 +10,7 @@
|
||||||
"author": "ppoffice <zrp1994@gmail.com>",
|
"author": "ppoffice <zrp1994@gmail.com>",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"lint": "eslint --ext .js --ext .jsx --ext .json .",
|
"lint": "eslint --ext .js --ext .jsx --ext .json ."
|
||||||
"postpublish": "PACKAGE_VERSION=$(cat package.json | grep \\\"version\\\" | head -1 | awk -F: '{ print $2 }' | sed 's/[\",]//g' | tr -d '[[:space:]]') && git tag $PACKAGE_VERSION && git push --tags"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"eslint": "^6.8.0",
|
"eslint": "^6.8.0",
|
||||||
|
|
Loading…
Reference in New Issue