Skip to content

Commit

Permalink
Enhance blog building config
Browse files Browse the repository at this point in the history
  • Loading branch information
mobeicanyue committed Apr 10, 2024
1 parent a8fdd14 commit 7352565
Show file tree
Hide file tree
Showing 4 changed files with 2,367 additions and 3,954 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'yarn'

- name: Install Dependencies
run: |
Expand All @@ -30,7 +31,7 @@ jobs:
# 修复 hexo 生成的文件更新时间 为当前时间,实际应为提交时间
- name: Fix File Updated Date
run: |
git ls-files | while read filepath; do touch -d "$(git log -1 --format='@%ct' $filepath)" "$filepath" && echo "Fixed: $filepath"; done
git ls-files "*.md" | while read filepath; do touch -d "$(git log -1 --format='@%ct' $filepath)" "$filepath" && echo "Fixed: $filepath"; done
- name: Build Site
run: |
Expand Down
30 changes: 7 additions & 23 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -158,32 +158,16 @@ minify:
- '*.svg'
- '!*.min.svg'
gzip:
enable: false
brotli:
enable: false
xml:
enable: true
include:
- '*.html'
- '*.css'
- '*.js'
- '*.txt'
- '*.ttf'
- '*.atom'
- '*.stl'
- '*.xml'
- '*.svg'
- '*.eot'
- '*.json'
brotli:
- '!*.min.xml'
json:
enable: true
include:
- '*.html'
- '*.css'
- '*.js'
- '*.txt'
- '*.ttf'
- '*.atom'
- '*.stl'
- '*.xml'
- '*.svg'
- '*.eot'
- '*.json'
xml:
json:
- '!*.min.json'
Loading

0 comments on commit 7352565

Please sign in to comment.