This is Jiayi Ji's personal website. It is built with blogdown and hugo, now hosted on netlify.
How to Build this site manually
-
If you are starting from scratch, clone the github repo into RStudio or first creating a project on your computer and then add the directory to your git client (and, optionally, create remote repository).
-
My preferred method of making new repos as RStuio Projects
- Start at Github.com > New Repo
- Clone [new & empty] Repo as new project into Rstudio IDE running on localhost
- git push -- README.md, license.md, and .gitignore
-
Check out Jeff Goldsmith's lecture material if you want to adopt the latter approach.
-
library(blogdown)
[Resources: github, Yihui's Book]-
Dependencies:
devtools::install_github('rstudio/blogdown')
blogdown::install_hugo()
- only need to do this once, but
- might need to, occasionally but not initially, run
blogdown::update_hugo()
blogdown::new_site(theme = "gcushen/hugo-academic")
- must be a completely empty directory except for .Rproj file
- view other theme options
- See Yihui's recommendation of selecting one of only a few workable themes for newbies
-
-
blogdown::serve_site()
-
Edit via Rmarkdown or markdown in the
content
directory and subdirs- Initially, you will have edited the
config.toml
, pluslayouts
, andstatic
directories (e.g. CSS, templates, etc. and such)
- Initially, you will have edited the
-
Make customizations and stylistic (i.e. non-content) changes (CSS, see "static") in the
static
directory, where the sub-hierarchy ofstatic
mirrors the sub-hierarchy intopublic
- Do not need to mirror the entire sub-hieary. Customize/mirror only as necessary and appropriate.
-
Override
layouts
by ghosting thethemes/../layouts/...
sub-hiearchy into thelayouts
directory. See custom-layours documentation -
Deployment on Netlify
-
For Manual Deployment, Optionally stop blogdown server. Drag
public
directory to netlify.com deploy -
For Continuous Depolyment, set up according to the Netlify Docs pointing to the
/public
of an appropriate github repository.- You need to set Command =
hugo_0.31
. Otherwise, Netlify won't let you set up your website. I found this through trial and error.
- You need to set Command =
-