From 88a2714bbe89a473639d75eeb4e536cb5468c6a0 Mon Sep 17 00:00:00 2001 From: weyu <985695055@qq.com> Date: Sat, 29 Mar 2025 14:18:09 +0800 Subject: [PATCH] hugo default output --- README.md | 15 +++++++++++++++ libs/common.sh | 2 +- webs/fluxcd/toto.sh | 5 +++-- 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 6fe4405..e6cdbc4 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,17 @@ # websitetoto +# 常见问题 + +## Hugo 版本不匹配 + +**现象:** + +- 缺少以来模板。如 + +``` +ERROR render of "section" failed: "/home/runner/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/google/docsy@v0.6.0/layouts/_default/baseof.html:4:7": execute of template failed: template: adopters/list.html:4:7: executing "adopters/list.html" at : error calling partial: execute of template failed: html/template:partials/head.html:52:16: no such template "_internal/google_analytics_async.html" +``` + +**解决方案:** + +一般情况下可以通过 `netlify.toml` 或 `Makefile` 文件查找 hugo 版本信息。 \ No newline at end of file diff --git a/libs/common.sh b/libs/common.sh index 547ce2d..13b1708 100755 --- a/libs/common.sh +++ b/libs/common.sh @@ -94,5 +94,5 @@ find_and_sed_v2(){ done check_cdn_change - check_not_change + #check_not_change } diff --git a/webs/fluxcd/toto.sh b/webs/fluxcd/toto.sh index 726e734..92cd402 100644 --- a/webs/fluxcd/toto.sh +++ b/webs/fluxcd/toto.sh @@ -35,7 +35,8 @@ after_flux_website(){ } save_return(){ - echo "${workdir}/output&oss://cncfstack-flux" > ${workdir}/ret-data + ls -lha + echo "${workdir}/app&oss://cncfstack-flux" > ${workdir}/ret-data } @@ -44,6 +45,6 @@ if cat .git/config |grep '/fluxcd/website.git' ;then echo "=============================================> 匹配到 flux" before_flux_website after_flux_website - find_and_sed_v2 "output" + find_and_sed_v2 "app" save_return fi