install the remotes package, install.packages("remotes)
install the hugodown package, remotes::install_github("r-lib/hugodown")
new RStudio empty project.
hugo new site . --force
from the command line in that new folder.
Download https://github.com/yihui/hugo-xmin and put into themes, remove “-master” from the folder name, delete example site.
Copy paste https://github.com/yihui/hugo-xmin/blob/master/exampleSite/config.toml
Create _hugodown.yaml
with hugo_version: 0.73.0
add about.md
copy-paste from hugodown setup vignette
create static/css/code.css from and create layouts/partial/head_custom.html (one should read theme docs!)
for mathjax create layouts/partial/foot_custom.html
create post in content/post/2020-06-25-cool/index.Rmd and copy-paste from snippets page. knit, preview.
add citations.
hugodown::hugo_stop()
, hugodown::hugo_start(render_to_disk = TRUE)
Netlify drag and drop
add URL to config
then something easier from the code point of view but more overwhelming!
create empty RStudio project (with git if it’s available)
hugodown::create_site_academic()
. Be happy to see everything happening automatically ✨
hugodown::hugo_start(render_to_disk = TRUE)
, open localhost in the browser.
Change site title and theme in config/_default/params.toml. Yes a theme for a theme!
Mention academic docs, all the things one can change.
hugodown::use_post("post/new-rmd-post")
, knit, see post.
say there will probably be other themes later. show Hugo theme gallery and how I would choose themes.
usethis::use_github()
, hugodown::use_netlify_toml()
, go to Netlify interface.
add URL to config