Setting up a minimal Quarto blog

Published

August 19, 2024

quarto

1 Introduction

Review this post:

2024-06-12 Adding a blog to your existing Quarto website https://samanthacsik.github.io/posts/2022-10-24-quarto-blogs/

Quarto is an extension of the Rmarkdown ecosystem. It leverages the power of knitr and pandoc, providing a number of useful additional tools for literate programming, report generation and blogging.

I’m using quarto for my lab’s home page with an embedded blog. (focusonR.org).

This post will describe some of the core components We’ll start with a minimal setup to provide some orientation.

The recommended method from the Quarto documentation initiate a blog, say qblog, is to run the command quarto create-project in your ~/shr blog development directory. Note: Quarto types include blogs, websites, manuscripts, books, etc.

 quarto create-project qblog --type website:blog

This command generates a project folder ~/shr/qblog with the following structure:

qblog/
|-- _quarto.yml
|-- about.qmd
|-- index.qmd
|-- posts/
|   |-- _metadata.yml
|   |-- post-with-code/
|   |   |-- image.jpg
|   |   `-- index.qmd
|   `-- welcome/
|       |-- index.qmd
|       `-- thumbnail.jpg
|-- profile.jpg
`-- styles.css

Note: A quarto blog can be much more elaborate than this template, but it can also be further minimized

To start blogging the next steps are:

  • cd to ~/shr/qblog/posts/
  • for the post, create a new directory, say sample_post
  • cd to ~/shr/qblog/posts/sample_post
  • create and edit a index.qmd file adding content, e.g. using vim. vim index.qmd

Before we go any further let’s examine the basic elements of the site. The framework for a quarto blog can be quite minimal. For example the following subset of files is sufficient for a useful blog:


minimal_qblog
|-- _quarto.yml
|-- index.qmd
`-- posts
    |-- index.qmd
    `-- sample_post.qmd

with file contents:

_quarto.yml
project:
  type: website
website:
  title: "Thomas Lab home page"
  navbar:
    left:
      - href: posts/index.qmd
        text: Blog
format:
  html:
    theme: cosmo
index.qmd
---
title: "Thomas lab"
---

**Director: Professor Ronald G. Thomas**<br>
School of Public Health<br>
UC, San Diego<br>
La Jolla, California

Focused on new and useful data science technologies.
posts/index.qmd
---
title: "Blog"
listing: default
---
posts/post1.qmd
---
title: "First post"
---

# Introduction

    Minimal text for first post. 

2 Results

Minimal blog presents as the following:

When run the first time the quarto engine generates a web site in the directory _site. This site contains CSS code as defined by the theme command in the _quarto.yml file.

3 Appendix

mcanouil/awesome-quarto: A curated list of Quarto talks, tools, examples & articles

Consider some ideas from

Reuse

Citation

BibTeX citation:
@online{(ryy)_glenn_thomas2024,
  author = {(Ryy) Glenn Thomas, Ronald},
  title = {Setting up a Minimal {Quarto} Blog},
  date = {2024-08-19},
  url = {https://focusonr.org/posts/setupquarto},
  langid = {en}
}
For attribution, please cite this work as:
(Ryy) Glenn Thomas, Ronald. 2024. “Setting up a Minimal Quarto Blog.” August 19, 2024. https://focusonr.org/posts/setupquarto.