【发布时间】:2021-01-17 21:27:37
【问题描述】:
我正在构建一个 Hugo 博客网站,我有一些要在布局中呈现的前沿问题。当我在我的 localhost:1313 上查看结果时,我可以看到前面的内容正在填充,但是当我在 Netlify 上托管网站时,前面的内容和部分文件不会呈现。
我不知道还能做什么。我已清除控制台中的所有错误,确保我的内容文件与布局文件等匹配。
有什么帮助吗?
这里是实时 netlify 网站的链接:https://stoic-meninsky-a5758a.netlify.app/
这是我的目录结构:
-content
-about
-_index.md
-blog
-_index.md
-post-1.md
-_index.md
-layouts
-_default
-baseOf.html
-about
-section.html
-blog
-section.html
-single.html
_index.html
这是从我的一个内容降价文件中提取的示例文件:
---
title: "The Herman Show | Blog"
linktitle: "Blog"
draft: true
newsletter: "This is the newsletter"
---
这就是我所说的正面问题:<p>{{ .Params.newsletter }}</p>
这就是我循环部分页面以获取导航栏的方式
{{ range .Site.Sections }}
<li><a href="{{ .Permalink }}">{{ .LinkTitle }}</a></li>
{{ end }}
【问题讨论】:
标签: html templates blogs hugo yaml-front-matter