class: title-slide, top, left background-image: url(../assets/sasha-stories-259980-unsplash.jpg) background-size: cover <div class="module mid"> <h4>day 04</h2> </div> # Summer of Blogdown ### Alison Hill .footnote[ <img src="../assets/RStudio-Logo-White.png" alt="rstudio" style="float:left;width:150px;"/> ] --- name: hello class: inverse, right, middle <img style="border-radius: 50%;" src="https://github.com/apreshill.png" width="150px"/> # Find me at... [
@apreshill](http://twitter.com/apreshill) [
@apreshill](http://github.com/apreshill) [
alison.rbind.io](https://alison.rbind.io) [
alison@rstudio.com](mailto:alison@rstudio.com) --- class: middle, inverse # Day 01 review + Discussed `blogdown` selling points 💡 + Got to know our Hugo installation 👋 + Used Hugo to build a website in RStudio 💪 + Deployed a website using Netlify 🚀 + Learned that all Hugo themes are GitHub repositories 🤷♀ + Learned that when you serve site, R + Hugo = 💫 -> `public/` (❌ TOUCH!) + Alison mused about the false lure of Hugo theme "simplicity" 🧘 --- class: middle, inverse # Day 02 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 ➡️ pages + Learned a bit about TOML vs YAML 🍠 + Played with turning widgets on and off a la Mr. Potato Head 🥔 --- class: middle, inverse # Day 03 review -- + Linked from within your site to other parts of your site using *relative links* -- + Embedded images into content using *relative links* -- + Setup blogdown project options via an `.Rprofile` file 💅 -- + Created new bundled content 🍱 -- + Configured site `permalinks` ([docs](https://gohugo.io/content-management/urls/#permalinks-configuration-example)) 🔗 -- + Used data and R (finally!) 📈 --- background-image: url(../assets/damian-patkowski-1295838-unsplash.jpg) background-size: cover --- background-image: url(../assets/hugo/1.png) background-size: cover --- background-image: url(../assets/hugo/2.png) background-size: cover --- background-image: url(../assets/hugo/3.png) background-size: cover --- background-image: url(../assets/hugo/4.png) background-size: cover --- background-image: url(../assets/hugo/5.png) background-size: cover --- background-image: url(../assets/hugo/6.png) background-size: cover --- background-image: url(../assets/hugo/7.png) background-size: cover --- background-image: url(../assets/hugo/8.png) background-size: cover --- background-image: url(../assets/hugo/9.png) background-size: cover --- background-image: url(../assets/hugo/10.png) background-size: cover --- background-image: url(../assets/hugo/11.png) background-size: cover --- background-image: url(../assets/hugo/12.png) background-size: cover --- background-image: url(../assets/hugo/13.png) background-size: cover class: inverse, middle, center # Your home page --- class: bottom, center, inverse background-image: url(../assets/house-number-446044_1920.jpg) background-size: cover # Now let's update our home's address --- # Update our URL 1. On Netlify 1. Next (if you want) on [rbind.io](https://github.com/rbind/support/issues) (use the issue template) 1. Update `baseurl` in your `config.toml` 1. Commit/push ➡️ deploy! --- # Enforce HTTPS We'll follow [Yihui's advice](https://yihui.name/en/2017/11/301-redirect/#an-application-redirect-http-links-to-to-https) with Netlify redirects. + Put a file named `_redirects` into `static/` + Content: ``` http://alison.rbind.io/* https://alison.rbind.io/:splat 301! ``` + Commit/push ➡️ deploy! --- # A few more Hugo tidbits + Overriding versus editing (example: [view source in metadata](https://github.com/rbind/apreshill/commit/8933c35cee33d03597b310d6db75474837af1261)) + What not to touch + Dates (get to know: `publishdate`) + Drafts + [Alias urls](https://gohugo.io/content-management/urls/#aliases) + [General troubleshooting advice](https://alison.rbind.io/post/2019-03-04-hugo-troubleshooting/) --- # What to touch Green means go! .pull-left[ ``` /Users/alison/rscratch/kellykapowski ├── .DS_Store *├── .Rprofile ├── .Rproj.user ├── .git *├── .gitignore *├── archetypes *├── config *├── config.toml *├── content *├── data ├── index.Rmd ├── kellykapowski.Rproj *├── layouts *├── netlify.toml ├── public ├── resources *├── static └── themes ``` ] .pull-right[ All of your `themes` folder can be overriden by files in your project root: [read more here](https://zwbetz.com/override-a-hugo-theme/) ]