Closed pensivedog closed 2 years ago
I don't understand this error, but you can follow this theme's guide to create a new site instead of using blogdown::new_site()
(e.g., git clone https://github.com/h-enk/doks.git
). Then npm install
. In the end, create a .Rprofile
in the site root and set the Hugo version/path there, e.g.,
options(blogdown.hugo.version = "0.101.0", blogdown.hugo.dir = "node_modules/.bin/hugo")
Restart R, and you should be able to blogdown::serve_site()
.
Works like a charm!
Great! Thanks for letting me know!
Separate issue but also related to this theme: blogdown's "New post" addin is not generating correct paths for Doks, similar to this recently fixed issue:
https://github.com/rstudio/blogdown/issues/712#issuecomment-1181223445
I'm still trying to figure out how to use this as a theme imported by blogdown when initiating a new blogdown project. This way is preferable because it places the relevant theme files in a themes/doks/
directory, which is in keeping with standard Hugo setups, allowing for easy overriding of some theme files via Theme Components.
The above error mentioned in the original post is related to flexSearch
, so I tried setting flexSearch = false
in params.toml
. That resulted in a similar error for lazySizes
, so I set lazySizes = false
in params.toml
. This continued with clipBoard
, instantPage
, bootStrapJs
, and highLight
. After setting each of these to false
in params.toml
, the site is successfully served, although with limited functionality due to those features being disabled. So it seems the site is having trouble finding those libraries with doks
now living in a themes/
directory.
Any suggestions for how to get this working properly?
FWIW, Doks is based on Hyas, which is the starter kit now recommended by Netlify to replace its deprecated Victor Hugo template, so it seems it might be worthwhile finding a way to get these both working smoothly with blogdown as Hugo themes.
blogdown's "New post" addin is not generating correct paths for Doks
I just fixed this problem in the dev version of blogdown. Thanks for the report!
Any suggestions for how to get this working properly?
I suggest you follow the instructions of this theme, instead of using blogdown::new_site()
to put the theme under the theme/
directory. This theme seems to be quite different with other themes.
If you want to override anything, I think you can just modify the relevant files directly. I understand that you may be concerned that you may need to update the theme in future, but from my experience, once you have a working site, you probably don't want to pull upstream updates any more (which could break your site).
Here are the steps to reproduce:
themes/doks
and runnpm install
to get dependencies, as per the Doks quick start guideThe following error occurs:
Any ideas what could be the problem?
Here are the results of
xfun::session_info()
: