blogdown - 如何指定 post 将出现在哪个页面
blogdown - how do I specify which page a post will appear on
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"
我使用的是稍微修改过的 blogdown 默认 config.toml
和 hugo-lithium
主题。如上所示。如何使 'Home' 和 'About' 页面静态化?并将我所有的帖子转移到我的 'Blog' 页面上?我在 blogdown book 中找不到任何解释这一点的内容。
我做了 解释了如何更改存储文件的目录。这不是我想要的(我认为)。我想知道如何实际指定 post
的页面。
在 hugo 中,网站的布局反映了内容目录中文件的布局。因此,如果您在 content/blog/my-cool-post.md
中有博客 post,它将显示为 https://example.com/blog/my-cool-post.html
更多信息请参阅 hugo docs。
因此,对于您的 about 文件,只需将其直接放在内容中,如 content/about.md
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"
我使用的是稍微修改过的 blogdown 默认 config.toml
和 hugo-lithium
主题。如上所示。如何使 'Home' 和 'About' 页面静态化?并将我所有的帖子转移到我的 'Blog' 页面上?我在 blogdown book 中找不到任何解释这一点的内容。
我做了 post
的页面。
在 hugo 中,网站的布局反映了内容目录中文件的布局。因此,如果您在 content/blog/my-cool-post.md
中有博客 post,它将显示为 https://example.com/blog/my-cool-post.html
更多信息请参阅 hugo docs。
因此,对于您的 about 文件,只需将其直接放在内容中,如 content/about.md