由于本主题使用了 Hugo 中的 .Scratch 来实现一些特性, 非常建议你为 hugo server 命令添加 –disableFastRender 参数来实时预览你正在编辑的文章页面.
hugo serve 的默认运行环境是 development, 而 hugo 的默认运行环境是 production. 由于本地 development 环境的限制, 评论系统, CDN 和 fingerprint 不会在 development 环境下启用. 你可以使用 hugo serve -e production 命令来开启这些特性.
name:GitHub Pageson:push:branches:- main # Set a branch to deploypull_request:jobs:deploy:runs-on:ubuntu-latestconcurrency:group:${{ github.workflow }}-${{ github.ref }}steps:- uses:actions/checkout@v3with:submodules:true# Fetch Hugo themes (true OR recursive)fetch-depth:0# Fetch all history for .GitInfo and .Lastmod- name:Setup Hugouses:peaceiris/actions-hugo@v2with:hugo-version:'0.111.1'extended:true- name:Buildrun:hugo --minify- name:Deployuses:peaceiris/actions-gh-pages@v3if:${{ github.ref == 'refs/heads/main' }}with:external_repository:xxx/xxx.github.iopublish_dir:./publicpublish_branch:gh-pagepersonal_token:${{ secrets.PERSONAL_TOKEN }}commit_message:${{ github.event.head_commit.message }}