This is my third attempt at building a website, including an (overly?) ambitious idea to document all of the #Rcats and #Rdogs (and #Rchickens Lucy!) on twitter. After two false starts caused by a combination of teaching responsibilities, making time to snuggle my doggos, and some general anxiety, I think this time is my proverbial charm.
First a shoutout to the excellent tutorials by Yihui Xie, Amber Thomas, and Alison Presmanes Hill. I first used the blogdown book as a guide, then discovered this RStudio video tutorial which I also loved. I won’t recreate a tutorial here, just add some commentary on the mistakes I made and the tips I learned.
Starting from scratch
First, I took the excellent advice of keeping my theme simple in order to spend my time on content at first. Because you can take the girl out of academia but not the hugo-academic theme out of the girl, I chose to stick with one of the simpler themes.
Please don’t underestimate the amount of time I will spend on making any type of visualization look exactly, specifically the way I see it in my head. I would have spent all day choosing and modifying a theme and had no website at the end.
I started by modifying the existing
about.md file in the home directory, as much as I wished I could be Lena Smith. I do feel bad for all of the actual Lena Smith’s who are now impossible to google thanks to all of the default About sections left on half-finished blogdown websites. I also modified the
config.toml file with my own info and I changed the order of the pages in the navigation using the weight option in each
[[menu.main]] item. I also chose to delete the
Contact option since literally every way to get in touch with me is right at the top, underneath my face :)
From there I worked my way on from replacing Lena with myself, in order down the page. So as not to be overwhelemed, I just added one item to each section; for Publications I added one paper, for Talks, just the most recent talk, etc. Once I finish I can go back and fill in the rest. To add anything new to any of the sections I used
Then I followed the example
.md files, added my new content, and deleted the old files. So now the structure of my website is complete and I’ve replaced all of the default content with my specific content. This brings us to minute 41 of the tutorial video. I said shit, I am going to forget how I did all of this better start the blog post now. Making a new blog post is very easy using
Addins > New Post.
Ready to publish, I created a repo on github and pushed all of my files to the new repo. Then I simply signed up for an account on netlify linked to my github and chose this new repo for my site, following the excellent blogdown book linked above. I needed to add the environmental variable HUGO_VERSION ‘0.40.2’ which was the version of hugo used to build the site locally on my machine (use
blogdown::hugo_version() to find the correct version). I have a custom domain that I manage through google domains, so I had to point it to the random domain name assigned by netlify.
I love the workflow mentioned at 46:00 in Yihui’s RStudio video tutorial
- A typical workflow
- Open your website project, click the “Serve Site” addin
- Revise old pages/posts, or click the “New Post” addin
- Write and save (take a look at the automatic preview)
- Push everything to Github
AND NOW I’M LIVE! www.katiescranton.com
I want you all to know that I have not abandoned my quest to document the R community’s fur and feather family. That will be another post “blogdown: the squeakquel.”