diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..d0c4681 --- /dev/null +++ b/.travis.yml @@ -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 diff --git a/README.md b/README.md index e322de4..23ec0a6 100644 --- a/README.md +++ b/README.md @@ -75,7 +75,7 @@ blog feature-rich and powerful. Baidu Share.js External Site Links - Light Gallery and Justified Gallery + Light and Justified Gallery Gitalk @@ -134,14 +134,14 @@ Icarus directly import stylesheets from the [highlight.js](https://highlightjs.o - - - + + + - - - + + +
Atom One LightMonokaiKimbie DarkAtom One LightMonokaiKimbie Dark
@@ -166,10 +166,10 @@ Icarus allows you to configure your site on a per-page or per-layout basis.
widgets:
-- type: profile
-  position: left
-- type: recent_posts
-  position: left
+ - type: profile + position: left + - type: recent_posts + position: left
widgets: null
@@ -180,9 +180,9 @@ Icarus allows you to configure your site on a per-page or per-layout basis.
         
     
     
-        
-        
-        
+        
+        
+        
     
 
 
diff --git a/include/hexo/filter/stylus.js b/include/hexo/filter/stylus.js
index 923790f..c462215 100644
--- a/include/hexo/filter/stylus.js
+++ b/include/hexo/filter/stylus.js
@@ -1,7 +1,7 @@
 /**
  * Add resolved variables to the theme config for stylus.
  */
-module.exports = function (hexo) {
+module.exports = function(hexo) {
     hexo.extend.filter.register('template_locals', locals => {
         const fontcdn = hexo.extend.helper.get('fontcdn').bind(hexo);
         hexo.theme.config['@fontface'] = {
diff --git a/package.json b/package.json
index b715227..def20d5 100644
--- a/package.json
+++ b/package.json
@@ -10,8 +10,7 @@
   "author": "ppoffice ",
   "license": "MIT",
   "scripts": {
-    "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"
+    "lint": "eslint --ext .js --ext .jsx --ext .json ."
   },
   "devDependencies": {
     "eslint": "^6.8.0",