Skip to content

quickskilling/blogs_quarto

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Getting a Python Quarto Blog Running

Install uv

On Mac OS:

curl -LsSf https://astral.sh/uv/install.sh | sh

On Windows (PowerShell):

powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

Install Quarto

  1. Download Quarto for your OS specific CLI using a version >=1.9.
  2. Install the CLI
  3. Check that your CLI installation worked with quarto check

Use uv and quarto to build structure

  1. uv init --lib .
  2. uv venv --python 3.13 to make a different version installed.
  3. source .venv/bin/activate to activate the shell
  4. uv add "polars[numpy, pyarrow, excel, database, fsspec, async, graph, plot, style, timezone]" lets-plot
  5. uv add --dev ipykernel pyyaml nbformat nbclient "marimo>=0.19.11"
  6. Add the following text to your pyproject.toml that was created and save the file.
[tool.uv]
package = false
  1. quarto create project blog . and the terminal will ask you for a title of your blog. Read more about Quarto blogs
  2. quarto add marimo-team/quarto-marimo
  3. Edit your _quarto.yml to have the following text (see the _quarto.yml guidance for more). The primary change is output-dir: docs.
project:
  type: website
  output-dir: docs
  1. This repo has a new_post.sh that can be run to create a new post with marimo chunks. A. Run chmod +x new_post.sh so that the file will run (only needs to be run once). B. Now ./new_post.sh test "Test Marimo Post" "J. Hathaway" will create a new folder in the posts folder with the folder name test that has an index.qmd file created with the title of test marimo and the author J. Hathaway.
  2. Now run QUARTO_MARIMO_VERSION=0.14.6 quarto preview to build your site in the docs folder and serve it to your default web browser (Note: at some point we should be able to remove QUARTO_MARIMO_VERSION=0.14.6).
  3. You can explore your website and make any other needed changes.
  4. Now push your changes to Github and then go to settings > pages to fix how our site is rendered using Github pages. We want to use the docs folder method.