hugo-blog-9dk.pages.dev
Open in
urlscan Pro
2606:4700:3030::6815:2001
Public Scan
URL:
https://hugo-blog-9dk.pages.dev/posts/cloudflare_hugo_version/
Submission Tags: @ecarlesi possiblethreat phishing Search All
Submission: On December 13 via api from IT — Scanned from IT
Submission Tags: @ecarlesi possiblethreat phishing Search All
Submission: On December 13 via api from IT — Scanned from IT
Form analysis
0 forms found in the DOMText Content
* index * Posts * TravelNotes -------------------------------------------------------------------------------- CLOUDFLARE_HUGO_VERSION 2024/07/29 起因 <p class="small {{ if eq .url $currentPage.Path }} header_flex bold {{end}}"> <a href="{{.url}}"> /{{.name }} </a> </p> {{ if not (.Param "hideBackToTop") }} <div class="back-to-top"> <a href="#top"> back to top </a> </div> {{ end }} 我在主题中自定义了一个选中菜单的class,但是发现在Cloudflare部署后,class没有生效,包括这个to-top也无法正常渲染,查阅文档得知这种语法的hugo版本比较高,这就是本地正常,后来发现是Cloudflare的hugo版本和本地的不一致,使用Cloudflare部署后,无法正常渲染的原因。 1. 查看本地版本 2. 设置环境变量 3. 查看Cloudflare版本 修改之前: 修改之后: -------------------------------------------------------------------------------- changpeng94@gmail.com