baseurl = "/"
relativeurls = false
languageCode = "en-us"
title = "A Hugo website"
theme = "hugo-lithium"
googleAnalytics = ""
disqusShortname = ""
ignoreFiles = ["\\.Rmd$", "\\.Rmarkdown", "_files$", "_cache$"]
[permalinks]
post = "/:year/:month/:day/:slug/"
[[menu.main]]
name = "Home"
url = "/"
weight = 1
[[menu.main]]
name = "About"
url = "/about/"
weight = 2
[[menu.main]]
name = "Blog"
url = "/blog/"
weight = 3
[params]
description = "A website built through Hugo and blogdown."
highlightjsVersion = "9.12.0"
highlightjsCDN = "//cdnjs.cloudflare.com/ajax/libs"
highlightjsLang = ["r", "yaml"]
highlightjsTheme = "github"
MathJaxCDN = "//cdnjs.cloudflare.com/ajax/libs"
MathJaxVersion = "2.7.5"
[params.logo]
url = "logo.png"
width = 50
height = 50
alt = "Logo"
我使用的主题为config.toml
的Blogdown默认值为hugo-lithium
。如上所示。如何将“主页”和“关于”页面设为静态?并将我所有的帖子转移到“博客”页面上?我在blogdown book中找不到任何解释的内容。
我做了discover this SO answer,它说明了如何更改文件存储目录。这不是我想要的(我认为)。我想知道如何实际指定post
所在的页面。
答案 0 :(得分:1)
在雨果(hugo)中,网站的布局与内容目录中文件的布局相对应。因此,如果您在content/blog/my-cool-post.md
中有一篇博客文章,它将显示为https://example.com/blog/my-cool-post.html
请参见hugo docs,了解更多信息。
因此,对于您的About文件,只需将其直接放置在内容中作为content/about.md