diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml new file mode 100644 index 0000000..d8e2a18 --- /dev/null +++ b/.github/workflows/pages.yml @@ -0,0 +1,50 @@ +name: Pages + +on: + push: + branches: + - main # default branch + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + token: ${{ secrets.GITHUB_TOKEN }} + # If your repository depends on submodule, please see: https://github.com/actions/checkout + submodules: recursive + - name: Use Node.js 20 + uses: actions/setup-node@v4 + with: + # Examples: 20, 18.19, >=16.20.2, lts/Iron, lts/Hydrogen, *, latest, current, node + # Ref: https://github.com/actions/setup-node#supported-version-syntax + node-version: '20' + - name: Cache NPM dependencies + uses: actions/cache@v4 + with: + path: node_modules + key: ${{ runner.OS }}-npm-cache + restore-keys: | + ${{ runner.OS }}-npm-cache + - name: Install Dependencies + run: npm install + - name: Build + run: npm run build + - name: Upload Pages artifact + uses: actions/upload-pages-artifact@v3 + with: + path: ./public + deploy: + needs: build + permissions: + pages: write + id-token: write + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 \ No newline at end of file diff --git a/_config.butterfly.yml b/_config.butterfly.yml index 31433bc..17e1566 100644 --- a/_config.butterfly.yml +++ b/_config.butterfly.yml @@ -33,8 +33,8 @@ code_word_wrap: false # formal: # icon: link || the description || color social: - # fab fa-github: https://github.com/xxxxx || Github || '#24292e' - # fas fa-envelope: mailto:xxxxxx@gmail.com || Email || '#4a7dbe' + fab fa-github: https://github.com/nekozone || Github || '#24292e' + fas fa-envelope: mailto:neko@neko.red || Email || '#4a7dbe' # Image (圖片設置) # -------------------------------------- @@ -44,14 +44,14 @@ favicon: /img/favicon.png # Avatar (頭像) avatar: - img: https://i.loli.net/2021/02/24/5O1day2nriDzjSu.png + img: https://xn--32g.601288.xyz/a.png effect: false # Disable all banner image disable_top_img: false # The banner image of home page -index_img: +index_img: https://xn--32g.601288.xyz/cat-4977436_1920.jpg # If the banner of page not setting, it will show the top_img default_top_img: @@ -207,7 +207,7 @@ noticeOutdate: footer: owner: enable: true - since: 2020 + since: 2017 custom_text: copyright: true # Copyright of theme and framework @@ -231,9 +231,9 @@ aside: enable: true icon: fab fa-github text: Follow Me - link: https://github.com/xxxxxx + link: https://github.com/nekozone card_announcement: - enable: true + enable: false content: This is my Blog card_recent_post: enable: true @@ -626,9 +626,9 @@ site_verification: # The top_img settings of home page # default: top img - full screen, site info - middle (默認top_img全屏,site_info在中間) # The position of site info, eg: 300px/300em/300rem/10% (主頁標題距離頂部距離) -index_site_info_top: +index_site_info_top: # The height of top_img, eg: 300px/300em/300rem (主頁top_img高度) -index_top_img_height: +index_top_img_height: 400px # The user interface setting of category and tag page (category和tag頁的UI設置) # index - same as Homepage UI (index 值代表 UI將與首頁的UI一樣) @@ -778,7 +778,7 @@ preloader: # wordcount (字數統計) # see https://butterfly.js.org/posts/ceeb73f/#字數統計 wordcount: - enable: false + enable: true post_wordcount: true min2read: true total_wordcount: true @@ -841,7 +841,7 @@ note: # It may contain bugs and unstable, give feedback when you find the bugs. # https://github.com/MoOx/pjax pjax: - enable: false + enable: true exclude: # - xxxx # - xxxx @@ -874,8 +874,8 @@ pangu: # Lazyload (圖片懶加載) # https://github.com/verlok/vanilla-lazyload lazyload: - enable: false - field: site # site/post + enable: true + field: post # site/post placeholder: blur: false diff --git a/_config.yml b/_config.yml index 531d7d6..1745db7 100644 --- a/_config.yml +++ b/_config.yml @@ -5,9 +5,9 @@ # Site title: Nekozone subtitle: '' -description: '' +description: '喵喵喵' keywords: -author: John Doe +author: dogcraft language: en timezone: '' diff --git a/package.json b/package.json index d6bb1d6..840eb86 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,7 @@ "hexo-renderer-stylus": "^3.0.1", "hexo-server": "^3.0.0", "hexo-theme-butterfly": "^4.13.0", - "hexo-theme-landscape": "^1.0.0" + "hexo-theme-landscape": "^1.0.0", + "hexo-wordcount": "^6.0.1" } }