Introduction
Shared YAML metadata can be defined at both the project and directory level:
- project level: filename
_quarto.yml
- directory level: filename
_metadata.yml
For more information, see Project Basics – Quarto Shared Metadata
Project Level
On the project level, I will change only the provided URLs for my GitHub and Twitter accounts in this first step.
Before My Change
_quarto.yml
project:
type: website
website:
title: "Life Long Learning Lab"
navbar:
right:
- about.qmd
- icon: github
href: https://github.com/
- icon: twitter
href: https://twitter.com
format:
html:
theme: cosmo
css: styles.css
After My Change
_quarto.yml
project:
type: website
website:
title: "Life Long Learning Lab"
navbar:
right:
- about.qmd
- icon: github
href: https://github.com/petzi53/quarto-pb-blog
- icon: twitter
href: https://x.com/pbaumgartner
format:
html:
theme: cosmo
css: styles.css
Directory Level
We have seen in an previous post that there is a _metadata.yml
file in the posts
folder.
Before My Change
_metadata.yml
# options specified here will apply to all posts in this folder
# freeze computational output
# (see https://quarto.org/docs/projects/code-execution.html#freeze)
freeze: true
# Enable banner style title blocks
title-block-banner: true
After My Change
_metadata.yml
# options specified here will apply to all posts in this folder
# freeze computational output
# (see https://quarto.org/docs/projects/code-execution.html#freeze)
freeze: true
# Enable banner style title blocks
title-block-banner: false
# Author name of all blog posts
author: 'Peter Baumgartner'
# Table of content settings
toc: true
toc-depth: 4
page-layout: article
The changes are self-explanatory, so short comments will suffice:
title-block-banner
: I have already removed the title block banner from the home page listings and will disable it for blog posts as well. (I will revise this decision after I have written several posts. Maybe the title block banner is very useful for displaying a short description of the article.)author
: All articles in my blog will be written by me.toc
andtoc-depth
: I want a table of contents on the right side of the blog post, with a maximum of four levels. (I will revise this decision after I have written some longer articles. Maybe the TOC levels go too deep.)page-layout
: I have already explained thepage-layout: full
directive from the title home pageindex.qmd
. Now we want anarticle
layout, because it creates a content area with a page-based grid layout that provides margins, areas for sidebars, and a reading width-optimized body region.
Git and GitHub
I will commit these third bulk of changes to Git and my demonstration repository quarto-pb-blog
on GitHub.