2

我试图通过这个文档用 RStudio blogdown 制作一个网站。

我期望以下列表:

2017

  • 博文 2
  • 博文 1

但我得到了这个:

2017

  • 帖子(链接到 /posts/)
  • 博文 2
  • 博文 1

即使我没有编辑文档中的配置或内容,我也遇到了同样的问题。

我不知道为什么空的“帖子”项目总是出现在博客帖子列表的顶部。我怎样才能删除该项目?

配置文件config.toml(保持默认):

baseurl = "/"
relativeurls = true
languageCode = "en-us"
title = "A Hugo website"
theme = "hugo-lithium-theme"
googleAnalytics = ""
disqusShortname = ""
ignoreFiles = ["\\.Rmd$", "_files$", "_cache$"]

[permalinks]
    post = "/:year/:month/:day/:slug/"

[[menu.main]]
    name = "About"
    url = "/about/"
[[menu.main]]
    name = "GitHub"
    url = "https://github.com/rstudio/blogdown"
[[menu.main]]
    name = "Twitter"
    url = "https://twitter.com/rstudio"

[params]
    description = "A website built through Hugo and blogdown."

    # options for highlight.js (version, additional languages, and theme)
    highlightjsVersion = "9.9.0"
    highlightjsLang = ["r", "yaml"]
    highlightjsTheme = "github"

    [params.logo]
    url = "logo.png"
    width = 50
    height = 50
    alt = "Logo"

devtools::session_info('blogdown')

Session info --------------------------------------------------------------
 setting  value                       
 version  R version 3.3.3 (2017-03-06)
 system   x86_64, darwin13.4.0        
 ui       RStudio (1.0.136)           
 language (EN)                        
 collate  ja_JP.UTF-8                 
 tz       Asia/Tokyo                  
 date     2017-04-06                  

Packages ------------------------------------------------------------------
 package   * version date       source                           
 backports   1.0.5   2017-01-18 CRAN (R 3.3.2)                   
 base64enc   0.1-3   2015-07-28 CRAN (R 3.3.0)                   
 bitops      1.0-6   2013-08-17 CRAN (R 3.3.0)                   
 blogdown    0.0.25  2017-04-05 Github (rstudio/blogdown@1c10d16)
 bookdown    0.3.16  2017-04-05 Github (rstudio/bookdown@9ea8ffa)
 caTools     1.17.1  2014-09-10 CRAN (R 3.3.0)                   
 digest      0.6.12  2017-01-27 CRAN (R 3.3.2)                   
 evaluate    0.10    2016-10-11 CRAN (R 3.3.0)                   
 highr       0.6     2016-05-09 CRAN (R 3.3.0)                   
 htmltools   0.3.5   2016-03-21 CRAN (R 3.3.0)                   
 httpuv      1.3.3   2015-08-04 CRAN (R 3.3.0)                   
 jsonlite    1.3     2017-02-28 CRAN (R 3.3.2)                   
 knitr       1.15.18 2017-04-05 Github (yihui/knitr@2cd8ca3)     
 magrittr    1.5     2014-11-22 CRAN (R 3.3.0)                   
 markdown    0.7.7   2015-04-22 CRAN (R 3.3.0)                   
 mime        0.5     2016-07-07 CRAN (R 3.3.0)                   
 Rcpp        0.12.10 2017-03-19 CRAN (R 3.3.2)                   
 rmarkdown   1.4     2017-03-24 cran (@1.4)                      
 rprojroot   1.2     2017-01-16 CRAN (R 3.3.2)                   
 servr       0.5     2016-12-10 cran (@0.5)                      
 stringi     1.1.3   2017-03-21 CRAN (R 3.3.2)                   
 stringr     1.2.0   2017-02-18 CRAN (R 3.3.2)                   
 yaml        2.1.14  2016-11-12 CRAN (R 3.3.2) 
4

2 回答 2

3

Hugo 0.19 中的一个变化引入了这个问题。我在我的 hugo-lithium-theme 中提供了一个修复。基本上你需要删除你的主题,然后重新安装它:

blogdown::install_theme('yihui/hugo-lithium-theme')
于 2017-04-19T20:55:55.297 回答
0

我不确定,但我会尝试在此文件的类似位置更改某些内容,您可以在您的项目中找到,尝试删除它并查看它是否有效!

我希望它有效!

于 2017-04-05T04:42:43.870 回答