A postcard

Write and send a single postcard.


First, make sure you have the latest version of the postcards package installed from CRAN:


Restart your R session. If you use RStudio, use the menu item Session > Restart R or the associated keyboard shortcut:

  • Ctrl + Shift + F10 (Windows and Linux) or
  • Command + Shift + F10 (Mac OS).
[1] ‘0.2.0’

Create GitHub repo


Clone GitHub repo


✨ Commit & Push! ✨

You should be committing these files:

  • *.Rproj

  • .gitignore

Create a postcard

Inside your current postcards project, use the R console:


Then you could run (wait- don’t do this yet!):


But you could also pick one of four templates:

  1. "jolla" ( https://seankross.com/postcards-templates/jolla/) [the default]

  2. "jolla-blue" ( https://seankross.com/postcards-templates/jolla-blue/)

  3. "trestles" ( https://seankross.com/postcards-templates/trestles/)

  4. "onofre" ( https://seankross.com/postcards-templates/onofre/)

create_postcard(template = "jolla") #default
create_postcard(template = "jolla-blue")
create_postcard(template = "trestles")
create_postcard(template = "onofre")

Anatomy of a postcard

YAML, body, name is index- this is special

✨ Commit & Push! ✨

You should be committing these files:

  • index.Rmd

  • *.jpg

But! There is no .html file (yet…)

Knit the postcard

Knit button or


What is new in your Git pane?

✨ Commit & Push! ✨

You should be committing this files:

  • index.html

(You may get a warning in RStudio IDE that this file is too big- go right ahead)

Publish a postcard



> use_github_pages(branch = "main", path = "/")
✓ Setting active project to '/Users/alison/rscratch/global-postcard'
✓ Activating GitHub Pages for 'apreshill/global-postcard'
✓ GitHub Pages is publishing from:
● URL: 'https://apreshill.github.io/global-postcard/'
● Branch: 'main'
● Path: '/'

Share your postcard!

Add it to your repository details