Closed c1au6i0 closed 3 years ago
Hi- if you use ?new_site
the theme argument help docs say:
A Hugo theme on Github (a character string of the form user/repo, and you can optionally specify a GIT branch or tag name after
@
, i.e. theme can be of the formuser/repo@branch
). You can also specify a full URL to the zip file or tarball of the theme.
So I just tried this and it "worked" (although the exampleSite results in a Hugo shortcode error):
blogdown::new_site(theme = "wowchemy/starter-research-group@main")
Got it, sorry not sure why I missed that in the documentation.
You can specify the branch after @
, e.g.,
blogdown::new_site(theme = "wowchemy/starter-research-group@main")
This is documented on the help page ?blogdown::new_site
.
That said, I agree it should do a better job to just figure out the default branch automatically. Thanks for the report!
Update: Oh I didn't realize @apreshill had already replied. Again, I'll improve this function so you don't have to specify @main
in the future.
Done. The development version should be able to figure out the default branch now:
remotes::install_github('rstudio/blogdown')
Also note that wowchemy/starter-research-group
is not really a theme (but a sample site instead), so it won't work with new_site()
at the moment. I might be able to figure out how to make it work with new_site()
in the future, after I know more about these "Hugo modules" (which is currently still a pain to me).
It should work now:
remotes::install_github('rstudio/blogdown')
blogdown::new_site(theme = "wowchemy/starter-research-group")
new_site
does't download themes if the name of default branch is notmaster
. People started to switch tomain
...It does if the main branch is called
master
, as in the repo that I forked herehttps://github.com/c1au6i0/starter-research-group
.Well I am not sure if that is the problem or not, but that is a possibility I guess
Checklist
When filing a bug report, please check the boxes below to confirm that you have provided us with the information we need. Have you:
[x] formatted your issue so it is easier for us to read?
[x] included a minimal, self-contained, and reproducible example?
[x] pasted the output from
xfun::session_info('blogdown')
in your issue?[x] upgraded all your packages to their latest versions (including your versions of R, the RStudio IDE, and relevant R packages)?
[x] installed and tested your bug with the development version of the blogdown package using
remotes::install_github('rstudio/blogdown')
?