org-roam is a plain-text personal knowledge management system for emacs. ox-hugo is org exporter backend that exports org-mode files to Hugo compatible Markdown.

Because the Markdown generated by ox-hugo is not pure Markdown but Hugo specific, we need to transform it to fit into Quartz. This is done by the OxHugoFlavoredMarkdown plugin. Even though this plugin was written with ox-hugo in mind, it should work for any Hugo specific Markdown.

The plugin is in the default quartz.config.yaml but disabled; set enabled: true on its entry. ox-hugo usually writes TOML frontmatter (+++), which Quartz’s built-in frontmatter parsing reads when configured under configuration.frontmatter. ObsidianFlavoredMarkdown’s default legacy preset only recognizes YAML frontmatter, so switch it to preset: strict too:

quartz.config.yaml
configuration:
  frontmatter:
    delimiters: "+++"
    language: toml # if using toml frontmatter
plugins:
  - source: "@quartz-community/github-flavored-markdown"
    enabled: true
    order: 30
  - source: "@quartz-community/obsidian-flavored-markdown"
    enabled: true
    options:
      preset: strict # needed for TOML (+++) frontmatter
    order: 40
  - source: "@quartz-community/ox-hugo"
    enabled: true
    order: 91

OxHugoFlavoredMarkdown rewrites the Markdown source before it is parsed, so its order relative to the other Markdown plugins doesn’t matter.

For options that need code, place overrides before loadQuartzConfig() in quartz.ts:

quartz.ts (override)
import * as ExternalPlugin from "./.quartz/plugins"
 
ExternalPlugin.OxHugoFlavouredMarkdown({ replaceOrgLatex: false })

Usage

Quartz by default doesn’t understand org-roam files as they aren’t Markdown. You’re responsible for using an external tool like ox-hugo to export the org-roam files as Markdown content to Quartz and managing the static assets so that they’re available in the final output.

Configuration

This functionality is provided by the OxHugoFlavoredMarkdown plugin. See the plugin page for customization options.