Hello, Quarto

week 0
Author

Harlin

Published

December 23, 2022

In this post, we’ll get set up with Quarto.

Quarto is a static site converter, which you can use to turn plaintext documents into attractive webpages. You should have already installed Quarto and signed up for Quarto Pub when completing the activity in this post.

1. Make a blog

This should be very straightforward using the instructions at this link.

All you need to do is run the following code at the terminal.

quarto create-project myblog --type website:blog

Then once a folder appears, run this line.

quarto preview myblog

Feel free to replace myblog with a different name.

quarto preview should open up a link that looks like http://localhost:6832 in your web browser. The port number probably looks different.

2. Publish on Quarto Pub

Now, run this line on your terminal in the same directory.

quarto publish myblog

When prompted, select these options.

? Provider: › Quarto Pub
? Authorize (Y/n) › Yes

Finally, the terminal should print out something like this:

[✓] Creating quarto-pub site
[✓] Preparing to publish site
[✓] Uploading files (complete)
[✓] Deploying published site
[✓] Published site: https://quartopub.com/sites/[...]
[✓] Account site updated: https://[Quarto Pub username].quarto.pub

Go to the website on the last line, and if you see a webpage there, congrats! Your blog is up and running. At the moment, it’s just a copy of the template, so it’s not personalized in any way.

3. Edit a post

Preview your blog again:

quarto preview myblog

Then edit the welcome page in posts/welcome/index.qmd. Any sort of change will do.

Once you save the file, you’ll see that the preview page on the web browser is automatically updated.

You can also add a new page following instructions in this post.

4. Publish again

Once you’ve made all these additions, publish the result again using quarto publish. In a few minutes, you should see your new post on your website.