mirror of
https://gitlab.com/MisterBiggs/brain-quartz.git
synced 2025-08-21 21:04:54 +00:00
.github
content
docs
advanced
features
Latex.md
Mermaid diagrams.md
Obsidian compatibility.md
OxHugo compatibility.md
RSS Feed.md
SPA Routing.md
backlinks.md
callouts.md
darkmode.md
folder and tag listings.md
full-text search.md
graph view.md
index.md
popover previews.md
private pages.md
recent notes.md
syntax highlighting.md
table of contents.md
upcoming features.md
wikilinks.md
images
tags
authoring content.md
build.md
configuration.md
hosting.md
index.md
layout.md
migrating from Quartz 3.md
philosophy.md
showcase.md
upgrading.md
quartz
.gitattributes
.gitignore
.npmrc
.prettierignore
.prettierrc
CODE_OF_CONDUCT.md
LICENSE.txt
README.md
globals.d.ts
index.d.ts
package-lock.json
package.json
quartz.config.ts
quartz.layout.ts
tsconfig.json
39 lines
1.8 KiB
Markdown
39 lines
1.8 KiB
Markdown
---
|
|
tags:
|
|
- plugin/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 `Plugin.OxHugoFlavouredMarkdown`. Even though this [[making plugins|plugin]] was written with `ox-hugo` in mind, it should work for any Hugo specific Markdown.
|
|
|
|
```typescript title="quartz.config.ts"
|
|
plugins: {
|
|
transformers: [
|
|
Plugin.FrontMatter({ delims: "+++", language: "toml" }), // if toml frontmatter
|
|
// ...
|
|
Plugin.OxHugoFlavouredMarkdown(),
|
|
Plugin.GitHubFlavoredMarkdown(),
|
|
// ...
|
|
],
|
|
},
|
|
```
|
|
|
|
## 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
|
|
|
|
- Link resolution
|
|
- `wikilinks`: Whether to replace `{{ relref }}` with Quartz [[wikilinks]]
|
|
- `removePredefinedAnchor`: Whether to remove [pre-defined anchor set by ox-hugo](https://ox-hugo.scripter.co/doc/anchors/).
|
|
- Image handling
|
|
- `replaceFigureWithMdImg`: Whether to replace `<figure/>` with `![]()`
|
|
- Formatting
|
|
- `removeHugoShortcode`: Whether to remove hugo shortcode syntax (`{{}}`)
|
|
|
|
> [!warning]
|
|
>
|
|
> While you can use `Plugin.OxHugoFlavoredMarkdown` and `Plugin.ObsidianFlavoredMarkdown` together, it's not recommended because it might mutate the file in unexpected ways. Use with caution.
|