Antigravity suggested Quarto for this blog.
This is the antigravity guide to getting this up and running on my Mac.
Step 1: Install Quarto
The easiest way to install Quarto on a Mac is using Homebrew (since you’ve worked with Python and Pelican before, you likely already have Homebrew installed). Open your terminal and run:
brew install --cask quarto
Step 2: Create Your Blog Project
Once Quarto is installed, use your terminal to navigate to wherever you want your blog folder to live (for example, your Documents folder):
cd ~/Documents
Then, tell Quarto to generate a brand new blog structure for you. Let’s call the folder my-quarto-blog:
quarto create-project my-quarto-blog --type website --template blog
Creating project at /Users/pmcc/Documents/my_quarto_blog:
- Created _quarto.yml
- Created index.qmd
- Created posts/welcome/index.qmd
- Created posts/post-with-code/index.qmd
- Created about.qmd
- Created styles.css
- Created posts/_metadata.yml
Step 3: See Your Blog in Action!
Navigate into your newly created folder:
cd my-quarto-blog
Now, start the local development server to preview your site:
quarto preview
This will automatically open your default web browser and show you your new blog. It comes pre-styled with a beautiful, clean theme, a working search bar, a dark/light mode toggle, and an RSS feed set up for you.
Step 4: Write Your First Post
- Leave the
quarto previewcommand running in your terminal. - Open the
my-quarto-blogfolder in your favorite code editor (like VS Code) or JupyterLab. - You will see a
posts/directory. You can create a new folder inside there, add anindex.ipynbfile, write some markdown and python code, and save it. - Quarto will instantly detect the save, render the notebook, and refresh your browser so you can see your post immediately!
Try running those commands, and let me know if you run into any issues or if you want me to explain how to customize the look and feel!
Addendum : How to write a post in Markdown
When you look inside a Quarto blog’s posts/ folder, you will see that each post usually has its own directory. Inside that directory, you simply create a file ending in .qmd (Quarto Markdown).
A .qmd file is just a regular Markdown file with a small YAML header at the very top to tell Quarto the title, author, and date.
It looks exactly like this:
markdown
title: “My First Markdown Post”
author: “Your Name”
date: “2024-03-08”
categories: [news, updates]
Welcome to my blog!
This is a standard markdown file. I can write bold text, create lists, and even add links just like normal.
Item 1
Item 2
Because I am using Quarto, this raw markdown file will automatically be converted into a beautiful HTML page on my blog. I didn’t even have to open Jupyter!
Why use .qmd instead of .md?
Quarto uses the .qmd extension to signify that it can execute code. If you decide later that you want to include a snippet of Python or R code and actually have it run and show the output in your post, a .qmd file allows you to do that (using a standard Markdown code block syntax).
If you are 100% sure the post will only ever be text and you will never want Quarto to try and execute any code inside it, you can just use index.md, and it will render perfectly as well!