0
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 书中找不到任何解释这一点的东西。

我确实发现了这个 SO answer,它解释了如何更改存储文件的目录。这不是我想要的(我认为)。我想知道如何实际指定post's 将去的页面。

4

1 回答 1

1

在 hugo 中,网站的布局反映了内容目录中文件的布局。因此,如果您在 中有一篇博文content/blog/my-cool-post.md,它将显示为https://example.com/blog/my-cool-post.html

请参阅hugo 文档了解更多信息。

因此,对于您的 about 文件,只需将其直接放在内容中content/about.md

于 2018-12-14T00:13:29.987 回答