Day 02
Personalizing your site
Alison Hill / 2019-06-11
Slides here
Homework
R Markdown users are usually familiar with YAML, a markup language designed to help you set a document’s metadata by specifying key/value pairs. Hugo theme developers, on the other hand, universally use TOML for configuration files. Here are some key differences you may notice:
- blocks wrapped by
+++
vs---
- key-value pairs are separated by a
=
vs:
In this homework, your high-level mission is to familiarize yourself with your .toml
files that configure your Hugo site.
Open and edit the
config.toml
in the root of your project directory. This one is actually pretty sparse- the main thing I would change here is your site title, and update your baseurl from/
to your current Netlify published url.- Open and edit
config/_default/params.toml
. This is the fun stuff! Here are some ideas for things to change:- change the color theme (don’t forget the day/night theme button!)1
- change the font2
- ensure that code is highlighted (check out the “Hello R Markdown” post to see these changes in action)
- change the highlight style from
github
to another option listed here (in general, styles are in lower case and spaces are replaced by dashes so “Shades of Purple” becomesshades-of-purple
) - add a site description and a sharing image (once you push and publish your site with these changes, you can verify your shiny new twitter card here)
Open and edit
config/_default/menus.toml
- each[[main]]
entry in this file is an element in your top navbar. Make it how you want it!
Review
Used version control via GitHub
Used continuous deployment via Netlify
Personalized your
about.md
page (social links, bio, interests, education)Practiced making changes, serving site, push to GitHub, + 💥 deploy
Learned a bit about Hugo
content/
➡️ sections ➡️ pagesLearned a bit about TOML vs YAML 🍠
Played with turning widgets on and off a la Mr. Potato Head 🥔
You could also make your own custom color theme; file placement here is critical↩
You could also make your own custom font theme; again, file placement is critical↩