Closed HushWay closed 5 months ago
会不会是版本问题?我本地使用的hugo是 v0.124.1
,而 Netlify 使用的是 v0.85
,而且部署时有警告:
9:57:27 AM: ────────────────────────────────────────────────────────────────
9:57:27 AM:
9:57:27 AM: $ hugo
9:57:27 AM: WARN 2024/03/30 01:57:27 Module "meme" is not compatible with this Hugo version; run "hugo mod graph" for more information.
9:57:27 AM: Start building sites …
9:57:27 AM: hugo v0.85.0-724D5DB5+extended linux/amd64 BuildDate=2021-07-05T10:46:28Z VendorInfo=gohugoio
9:57:27 AM: | ZH-CN
9:57:27 AM: -------------------+--------
9:57:27 AM: Pages | 16
9:57:27 AM: Paginator pages | 0
9:57:27 AM: Non-page files | 0
9:57:27 AM: Static files | 11
9:57:27 AM: Processed images | 0
9:57:27 AM: Aliases | 1
9:57:27 AM: Sitemaps | 1
9:57:27 AM: Cleaned | 0
9:57:27 AM: Total in 132 ms
9:57:27 AM:
9:57:27 AM: (build.command completed in 164ms)
9:57:27 AM:
9:57:28 AM: (Netlify Build completed in 523ms)
9:57:28 AM: Section completed: building
9:57:30 AM: Finished processing build request in 23.921s
我已经解决了这个问题,就是因为netlify默认的版本太低导致的,添加netlify.toml
文件指定hugo版本即可解决
[build.environment]
HUGO_ENV = "production"
HUGO_VERSION = "0.124.1"
你好,谢谢你提供这么漂亮的主题。不过我遇到一个问题,是这样,我在本地配置与测试的网站一切正常。但是通过 github 导入 Netlify 部署后,导航栏点击没有反应。我查看了一下,导航栏链接的 href 属性是空。请问你知道原因吗?![image](https://github.com/reuixiy/hugo-theme-meme/assets/85348063/0a303d54-499c-4cea-8b79-98a42111474e)
附录1:部署配置:
![image](https://github.com/reuixiy/hugo-theme-meme/assets/85348063/3eb9551a-991e-4170-a558-899713ae08cf)
附录2:导航栏的配置是默认的,我没有修改过