Setting up a minimal Quarto blog

Published

June 1, 2024

quarto

1 Introduction

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 and blogging.

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

This post will describe some of the most useful and interesting quarto tools presented in the context of a Palmer Penguins data set analysis. We’ll start with a minimal setup and add additional components for navigation and aesthetic purposes.

The recommended method in the Quarto documents to initiate a blog, call it qblog, is to run the command quarto create-project in your ~/prj development directory.

 quarto create-project qblog --type website:blog

Quarto types include blogs, websites, manuscripts, books, etc.

This generates a project folder ~/prj/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

Next steps:

  • cd to ~/prj/qblog/posts/
  • for the first post, create a new directory, say sample_post
  • cd to ~/prj/qblog/posts/sample_post
  • edit the index.qmd file and add content. 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 to start a useful blog:


minimal_blog
|-- _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 interesting data science technologies.
posts/index.qmd
---
title: "Blog"
listing: default
---
posts/post1.qmd
---
title: "Setting up R, vimtex and Ultisnips in vim on a Mac"
description: "Detailed configuration for optimal interaction and efficiency"
categories: [vim, R, Tex, Ultisnips]
date: last-modified
---

# Introduction


Start by installing vim (neovim),
[R]( https://cran.r-project.org/bin/macosx/ )
[tex](https://www.tug.org/mactex/mactex-download.html)
[ vimtex ]( https://github.com/lervag/vimtex.git )
[ultisnips]( https://github.com/SirVer/ultisnips.git )

See post "Setting up a minimal neovim... "
for details on installing plugins with Neovim.

Minimal blog presents as the following:

2 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-06-01},
  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.” June 1, 2024. https://focusonr.org/posts/setupquarto.