Appendix A — Using posit.cloud

If you are using the online version of RStudio called posit.cloud then there are some things that work differently than with the desktop version. This chapter is to designed to help with that.

A.1 Create a web project from our template

Since posit.cloud does not have an option to create a “Quarto Website” project, we have put together a template for you to start from.

  1. Start posit.cloud if you haven’t already

  2. Click on this link: RWD PositCloud Template

  3. At the top of the browser window, there is a button to save the template as your own project called Save a Permanent Copy.

    Save your copy

  4. Rename your project right away so you don’t forget.

    Rename your project

  5. Update the index.qmd file with information about your project.

  6. Update your _quarto.yml file as you wish.

The base packages should already be installed, so you should be good to add new Quarto Documents and Render them.

A.2 Exporting a project

You can export your project as a .zip file to turn in to an assignment or share with others.

  1. In the Files pane, click the box next to the Cloud icon to select all your files.
  2. Under the More gear there is a dropdown. Click on that.
  3. Choose Export from the More menu.

Exporting a project

This should download all your files as a .zip file, which you can upload to Canvas.

A.3 Share your project

It is possible to share your posit.cloud project with another user on the service (like your instructor) and they will get a copy of it.

You can find directions for that here.

A.4 Building a web project from scratch

If you can’t or don’t want to start with the template above (like you already have a project started), you can build your own Quarto Website.

A.4.1 Create your project

  1. Start posit.cloud if you haven’t already

  2. If you aren’t in a project already, create one. Use the New Project button and choose New RStudio project.

  3. In your Console, copy and paste this command and run it.

    install.packages(c("quarto", "rmarkdown", "tidyverse", "janitor"))

    It will take some time to run. Your internet connection will have an impact on the speed.

A.4.2 Create the Quarto file

  1. Use the new document toolbar button to create a Text file.
  2. Paste in the code below.
  3. Save the file and name it _quarto.yml.

The name must be exact.

_quarto.yml
project:
  type: website

website:
  title: "Site name"
  navbar:
    left:
      - href: index.qmd
        text: Home
      #- filename.qmd

format:
  html:
    theme: cosmo
    toc: true
    df-print: paged
    code-overflow: wrap

A.4.3 Create your index file

  1. Use the new document toolbar button to create a new Quarto Document
  2. For the Title field, use your project name, like “Billboard project”
  3. Uncheck the visual editor button.
  4. Immediately save the file and name it index.qmd

At some point you’ll likely add a new file and want to replace filename.qmd with your filename and remove the # comment. You’ll can add other files there as you create them. This adds them to the website navigation. You can learn about website navigation in the Quarto Guide.

You should be good to go with a new project at this point. You can Render your index to see what the site looks like at this point.