A week of blogdown for RStudio's summer 2019 interns.

Day 03

Keeping up with your content

Alison Hill / 2019-06-12


Slides here

Link to our discussion doc

Homework

  1. Follow instructions in this blog post to activate page bundles in your blogdown project using a project .Rprofile file (2 gotchas: new empty line at the end of the file, and restart R for changes to take effect).

  2. In your config.toml file, update your permalinks as follows (also more advice on permalinks in this great post on a “new post workflow” by Garrick Aden-Buie):

    [permalinks]
    # for optimists who plan to blog a lot
        post = "/post/:year/:month/:day/:slug/" 
    # for realists who know that you won't have multiple posts per day (or maybe even month)
        post = "/post/:year/:slug/" 
  3. Use the new post add-in (see figure 1) to create a new .Rmd post bundle and run with it! (carefully 😉 make triple-sure it is, in fact, bundled)

    The new post add-in

    Figure 1: The new post add-in

  4. Add some R code to your post. Using a built-in dataset (bore us here: iris works just fine), make a simple plot using your favorite plotting package (for tidyverse team members, bonus points for using ggplot2 + gganimate!)

  5. Now, to that new post, embed a bundled image using relative links. Here are some good ones, if you need a quick download. Try including an image using:
    • markdown syntax, and
    • in a code chunk using knitr::include_graphics().
  6. In your new post, add a link to another section of your website (i.e., another section in your content/), using relative links.

  7. Finally, in your new post, read in a data file (also considered part of the “bundle”!) and do something with it simple (plot, dplyr::glimpse, use an HTML widget like DT).

Extra

Try out any bookdown components within blogdown like:

Review