Skip to content

Commit d6c8789

Browse files
pseudoyuclaude
andcommitted
fix: configure Vercel build for Hugo with official hugo-book theme
- Add vercel.json with Hugo 0.146.0 and git submodules enabled - Switch to official hugo-book theme repo (alex-shpak/hugo-book) - Update deprecated Hugo functions for v0.146.0 compatibility 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
1 parent 673eb19 commit d6c8789

File tree

8 files changed

+18
-39
lines changed

8 files changed

+18
-39
lines changed

.github/workflows/deploy.yml

Lines changed: 0 additions & 32 deletions
This file was deleted.

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[submodule "themes/hugo-book"]
22
path = themes/hugo-book
3-
url = https://github.com/pseudoyu/hugo-book
3+
url = https://github.com/alex-shpak/hugo-book

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ The articles in 《区块链入门指南》 are licensed under a [Creative Commo
4141
</a>
4242
</td>
4343
<td align="center">
44-
<a href="https://github.com/deemoxuchao">
45-
<img src="https://avatars.githubusercontent.com/u/13073679?v=4" width="100;" alt="deemoxuchao"/>
44+
<a href="https://github.com/HsuQ">
45+
<img src="https://avatars.githubusercontent.com/u/13073679?v=4" width="100;" alt="HsuQ"/>
4646
<br />
4747
<sub><b>Hsurich</b></sub>
4848
</a>

layouts/partials/docs/brand.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<h2 class="book-brand">
2-
<a class="flex align-center" href="{{ cond (not .Site.Home.File) .Sites.First.Home.RelPermalink .Site.Home.RelPermalink }}">
2+
<a class="flex align-center" href="{{ cond (not .Site.Home.File) .Sites.Default.Home.RelPermalink .Site.Home.RelPermalink }}">
33
{{- with .Site.Params.BookLogo -}}
44
<img src="{{ . | relURL }}" alt="Logo" />
55
{{- end -}}

layouts/partials/docs/html-head.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
{{- end -}}
2222

2323
<!-- Theme stylesheet, you can customize scss by creating `assets/custom.scss` in your website -->
24-
{{- $styles := resources.Get "book.scss" | resources.ExecuteAsTemplate "book.scss" . | resources.ToCSS | resources.Minify | resources.Fingerprint }}
24+
{{- $styles := resources.Get "book.scss" | resources.ExecuteAsTemplate "book.scss" . | css.Sass | resources.Minify | resources.Fingerprint }}
2525
<link rel="stylesheet" href="{{ $styles.RelPermalink }}" {{ template "integrity" $styles }}>
2626

2727
{{- if default true .Site.Params.BookSearch -}}

layouts/partials/docs/menu.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<nav>
22
{{ partial "docs/brand" . }}
33
{{ partial "docs/search" . }}
4-
{{ if .Site.IsMultiLingual }}
4+
{{ if hugo.IsMultilingual }}
55
{{ partial "docs/languages" . }}
66
{{ end }}
77

themes/hugo-book

Submodule hugo-book updated 298 files

vercel.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"git": {
3+
"submodules": true
4+
},
5+
"build": {
6+
"env": {
7+
"HUGO_VERSION": "0.146.0"
8+
}
9+
},
10+
"buildCommand": "git submodule update --init --recursive && hugo --gc"
11+
}

0 commit comments

Comments
 (0)