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.
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
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!
Looks like you're not the only one having a tough time with project pages with that theme — might be worth keeping an eye on this issue in the hugo-academic repo!
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 https://alison.rbind.io/post/up-and-running-with-blogdown/ (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.
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…
I can now reproduce the problem. If I put either of the permalinks settings
[permalinks]
post = "/:year/:month/:day/:title/"
[permalinks]
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 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:
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!
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).
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.