mirror of
https://github.com/jackyzha0/quartz.git
synced 2026-03-22 14:05:43 -05:00
54 lines
2.0 KiB
Markdown
54 lines
2.0 KiB
Markdown
---
|
|
title: "OxHugo Compatibility"
|
|
tags:
|
|
- feature/transformer
|
|
---
|
|
|
|
[org-roam](https://www.orgroam.com/) is a plain-text personal knowledge management system for [emacs](https://en.wikipedia.org/wiki/Emacs). [ox-hugo](https://github.com/kaushalmodi/ox-hugo) is org exporter backend that exports `org-mode` files to [Hugo](https://gohugo.io/) 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.
|
|
|
|
```yaml title="quartz.config.yaml"
|
|
plugins:
|
|
- source: github:quartz-community/obsidian-flavored-markdown
|
|
enabled: true
|
|
order: 30
|
|
- source: github:quartz-community/ox-hugo
|
|
enabled: true
|
|
order: 25 # must come before obsidian-flavored-markdown
|
|
- source: github:quartz-community/github-flavored-markdown
|
|
enabled: true
|
|
order: 40
|
|
- source: github:quartz-community/note-properties
|
|
enabled: true
|
|
options:
|
|
delimiters: "+++"
|
|
language: toml # if using toml frontmatter
|
|
order: 5
|
|
```
|
|
|
|
For the TS override approach:
|
|
|
|
```ts title="quartz.ts (override)"
|
|
plugins: {
|
|
transformers: [
|
|
Plugin.FrontMatter({ delims: "+++", language: "toml" }),
|
|
// ...
|
|
Plugin.OxHugoFlavouredMarkdown(),
|
|
Plugin.GitHubFlavoredMarkdown(),
|
|
// ...
|
|
],
|
|
}
|
|
```
|
|
|
|
> [!note]
|
|
> In YAML, plugin execution order is controlled by the `order` field. Lower numbers execute first. Ensure `ox-hugo` has a lower `order` than `obsidian-flavored-markdown`.
|
|
|
|
## 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.
|