Can't get rendered blogdown local website using hugo-academic theme to reflect changes

I am creating my first attempt at a blogdown website using the hugo-academic theme. I am doing this from within RStudio and was editing the example hugo-academic website and using the 'serve site' addin.

This was all going well until I tried to change the project information. I was able to change the project widget from cards to list layout and added a new project as an edited copy of one of the example projects. Then something (I have no idea what) happened so that further changes were not rendered. Editing the content of the example projects didn't result in any change in the rendered output. Change the project widget output back to cards layout - nope. Delete the example projects from the content/project folder - nope.

This is all on the locally rendered website. I haven't git committed these changes or even attempted to deploy to Netlify.

So I tried nuking the entire website and starting from scratch again. Everything was fine until I got to editing the projects and the same thing happened again. I have started from scratch multiple times and keep getting to the same problem.

There are no error messages in the console.

I have spent half a day on this and have absolutely no clue what is happening. Any suggestions would be greatly appreciated.


1 Like

It sounds like the issue you're running into is, at least, reproducible. Would you be willing to boil down the steps you're taking into a easily replicable set of steps, so that we might reproduce the issue on our side as well?

It'd be useful to have your R session info + RStudio version, in case that's relevant to the issues you're encountering.

I can provide the R session info immediately, how do you want it sent?

Even in the absence of a reprex this might suggest something or be useful in the future if someone else runs into similar problems.

I will look at creating a reprex. At the moment the problem arises after a fair amount of fiddling around with content documents. I hope most of that is irrelevant to the problem. I think I should nuke everything and try deleting projects as the very first content modification step. If the problem persists I will have a reprex. If the problem doesn't reappear, then I am happy (but worried) but don't have a reprex

RStudio version and session info, as requested:

> devtools::session_info()
Session info --------------------------------------------------------------------------------------------------------------
 setting  value                       
 version  R version 3.4.4 (2018-03-15)
 system   x86_64, linux-gnu           
 ui       RStudio (1.1.446)           
 language en_AU:en                    
 collate  en_AU.UTF-8                 
 tz       Australia/Melbourne         
 date     2018-05-09                  

Packages ------------------------------------------------------------------------------------------------------------------
 package    * version date       source        
 backports    1.1.2   2017-12-13 CRAN (R 3.4.3)
 base       * 3.4.4   2018-04-21 local         
 blogdown     0.6     2018-04-18 CRAN (R 3.4.4)
 bookdown     0.7     2018-02-18 CRAN (R 3.4.3)
 compiler     3.4.4   2018-04-21 local         
 datasets   * 3.4.4   2018-04-21 local         
 devtools     1.13.5  2018-02-18 CRAN (R 3.4.3)
 digest       0.6.15  2018-01-28 CRAN (R 3.4.3)
 evaluate     0.10.1  2017-06-24 CRAN (R 3.4.2)
 graphics   * 3.4.4   2018-04-21 local         
 grDevices  * 3.4.4   2018-04-21 local         
 htmltools    0.3.6   2017-04-28 CRAN (R 3.4.2)
 httpuv       1.4.2   2018-05-03 CRAN (R 3.4.4)
 knitr        1.20    2018-02-20 CRAN (R 3.4.3)
 later        0.7.2   2018-05-01 CRAN (R 3.4.4)
 magrittr     1.5     2014-11-22 CRAN (R 3.4.2)
 memoise      1.1.0   2017-04-21 CRAN (R 3.4.2)
 methods    * 3.4.4   2018-04-21 local         
 promises     1.0.1   2018-04-13 CRAN (R 3.4.4)
 R6           2.2.2   2017-06-17 CRAN (R 3.4.2)
 Rcpp         0.12.16 2018-03-13 CRAN (R 3.4.3)
 rlang        0.2.0   2018-02-20 CRAN (R 3.4.3)
 rmarkdown    1.9     2018-03-01 CRAN (R 3.4.3)
 rprojroot    1.3-2   2018-01-03 CRAN (R 3.4.3)
 rstudioapi   0.7     2017-09-07 CRAN (R 3.4.2)
 servr        0.9     2018-03-25 CRAN (R 3.4.4)
 stats      * 3.4.4   2018-04-21 local         
 stringi      1.2.2   2018-05-02 CRAN (R 3.4.4)
 stringr      1.3.0   2018-02-19 CRAN (R 3.4.3)
 tools        3.4.4   2018-04-21 local         
 utils      * 3.4.4   2018-04-21 local         
 withr        2.1.2   2018-03-15 CRAN (R 3.4.3)
 xfun         0.1     2018-01-22 CRAN (R 3.4.3)
 yaml         2.1.19  2018-05-01 CRAN (R 3.4.4)

I think there might be a "namespace collision" of sorts here between you and @kevinushey — you (Ross) are referring to "projects" as they are defined in the hugo-academic theme , not as in .Rproj, right?

Maybe this is all super clear and I'm just mara-splaining, but it occurred to me that this might be a point of confusion!

Edit: FYI, I noticed they linked to the Hugo community forum at the bottom of the Academic Theme Getting Started guide. Also (and this is where I bet someone else using the theme might be helpful), it looks like the projects go in a different dir, but (I think) are still in content…

1 Like

Looks like you're not the only one having a tough time with project pages with that theme :blush: — might be worth keeping an eye on this issue in the hugo-academic repo!

you (Ross) are referring to "projects" as they are defined in the hugo-academic theme , not as in .Rproj, right?


it looks like the projects go in a different dir, but (I think) are still in content…

Correct (as I understand it). Project descriptions are *.md files in content/project. That's where I have been working.

In the course of trying to make a reprex I have started with a completely new GitHub repository and been following (as I thought I did last time). So far I haven't been able to recreate the problem. If I can get the website finished I'll declare the problem to be closed and a mystery.

@mara there was a blogdown issue which looked to be the same symptoms:

Yihui tracked that problem down to the version of Hugo having been updated after the blogdown site was started:

However, that doesn't seem to be the case for me. I grep'ed all my html files and they were all generated with the only version of hugo I have installed.

Hmm…I wonder if there's a compatibility issue with the theme (since it looks like it was updated quite recently). What Hugo version are you running?
Also, a couple other projects issues in hug-academic that might be relevant:

Reopened by the maintainer, though

This one points out that the same bug is likely to occur in projects…

My Hugo version is 0.37.1

Thanks for the pointers to the other hugo-academic issues. I am no longer at my desk and will look at them tomorrow.

I can now reproduce the problem. If I put either of the permalinks settings

    post = "/:year/:month/:day/:title/"

    post = "/:year/:month/:day/:slug/"

from the blogdown book into config.toml the system stops rendering (i.e. rendered locally with blogdown::serve_site()) and there is no error output visible in RStudio.

I suspect that this is related to hugo-academic issue #534 suggested by @mara.

I don't have a reprex yet because I only associated this problem with permalinks after I had entered a pile of my own content - so it is possible that there is some interaction of permalinks with my content. I will try to reproduce the problem with the academic theme example website.

I am giving up on this problem. I'll just live without permalinks.

Having spent half a day I can't reliably reproduce the problem starting from scratch to build a blogdown website with the academic theme using Rstudio. I got the problem a couple of times when I turned on permalinks, but couldn't recreate it.

However, I can reliably create the problem from my half-built website:

  1. Take commit #22 (SHA = 00791b2)
  2. Execute the "Serve site" addin
  3. Edit (the biography widget). Just make a visible change to be rendered. Save
  4. Renders OK
  5. Edit config.toml. Add [permalinks] \n post = "/:year/:month/:day/:slug/" above theme="hugo-academic". Save
  6. Edit (the biography widget). Just make a visible change to be rendered. Save
  7. Fails to render. No message in the console.

Yeah, regardless of where you specify the permalinks param in the config file, I believe it's the theme that's mishandling them (as in the issue linked to above), so I'm not sure it's solvable from the blogdown side of things.

That said, if anyone here has used hugo-academic, they might have a workaround!

1 Like

I posted this on the hugo-academic git repo in issue #534. The owner was unable to replicate the issue using plain hugo and academic, so he suggested that it was a blogdown issue. Also in the following reply to someone else on issue #534 he noted that it was only affecting blogdown users - so, once again, he thinks it's a blogdown issue.

I have posted a question on stack overflow (following blogdown's new-issue instructions).

This issue is finally fixed. There were three simultaneous unrelated problems. I have posted the solution to stack overflow.


If your question's been answered (even if by you, in this case!), would you mind choosing a solution? (see FAQ below for how) It just makes it a bit easier to visually navigate the site and see which questions still need help.


1 Like