diff --git a/.github/workflows/buildtest.yml b/.github/workflows/buildtest.yml new file mode 100644 index 0000000..9edc73c --- /dev/null +++ b/.github/workflows/buildtest.yml @@ -0,0 +1,42 @@ +# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions + +name: Node.js CI + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [16.x, 18.x, 20.x, 22.x] + # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ + + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + path: themes/hexo-theme-yuzu + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node-version }} + + - name: Install node modules + run: | + npm ci + npm i hexo-renderer-pug + + - name: Modify _config.yml + run: cat themes/hexo-theme-yuzu/_root_config_example.yml >> _config.yml + + - name: Build assets + run: npm run build diff --git a/_root_config_example.yml b/_root_config_example.yml new file mode 100644 index 0000000..1a7a964 --- /dev/null +++ b/_root_config_example.yml @@ -0,0 +1,41 @@ +since_year: 2020 + +post_copy: + text: 署名-非商业性使用-相同方式共享 + text_en: CC BY-NC-SA 2.5 CN + link: https://creativecommons.org/licenses/by-nc-sa/2.5/cn/ + +# 自定义侧边栏 +menu: + Archives: + widget: Archives # 三种:Archives | Posts | Tags + Posts1: + name: Posts + widget: Posts + Posts2: + name: Posts2 + widget: Posts + Tags: + widget: Tags + +# 右上角 +header_menu: + 关于: /about + +# 备案 +beian: + enable: true + icp: 京ICP备xxxxxxxx号 + +# visit count +visit_count: + type: busuanzi + +# hexo-generator-search +# Please see https://github.com/wzpan/hexo-generator-search/tree/master for detail. +search: + path: meta.json # changeable + field: post + content: false # currently unsupported + +theme: hexo-theme-yuzu