A Hugo site hosted by GitHub at https://rchaeology.github.io, using the awesome Hello Friend NG theme.
To work on the site locally before submitting a pull request, fork this repository and clone your fork with the --recursive
flag:
git clone --recursive https://github.com/<username>/rchaeology.github.io.git
Important: The --recursive
flag ensures that you also get the git submodule containing the site's theme. Without the theme, the site won't render properly.
If you already have a clone, but without the submodule you can run
git pull && git submodule init && git submodule update && git submodule status
You will need to have hugo
installed to build the site and preview changes with hugo server
. Use the -D
flag
to preview the site with drafts (pages with draft: true
).
You can also use the blogdown package to make changes to the website. When dealing with .Rmd pages, blogdown is required.
If you haven't already, install blogdown:
install.packages("blogdown")
Then use blogdown to install hugo:
blogdown::install_hugo()
You can now serve the site. To do this you must set your working directory as the root of the site. This will preview the site in the Viewer pane of RStudio.
blogdown::serve_site()
When you are done, use:
blogdown::stop_server()
When you are finished, commit your changes and submit a pull request.
The site is automatically rebuilt when a pull request is accepted, so there is no need to use hugo build
manually.