mirror of
https://github.com/alrayyes/wiki.git
synced 2024-11-24 12:36:23 +00:00
docs: update plugin documentation (#888)
* docs: first few plugins documented * docs: move plugin info * docs: move plugin docs to tag based system * docs: update latex example code snippet * docs: fix spelling of latex in title * docs: add missing linebreak * docs: remove plugin tag from feature pages * docs: shorten titles * docs: refine wording * docs: move plugin details for frontmatter * docs: add features/* tags * docs: update latex example * docs: make references more explicit * docs: add stubs for the remaining plugins * docs: more descriptions * docs: fix feature tags * docs: descriptions * docs: new plugin pages * docs: update configuration page * docs: more plugin work * docs: run prettier * docs: remove comments in config file and add link to docs * docs: minor fixes * docs: run prettier * docs: spelling * docs: update docs/plugins/AliasRedirects.md Co-authored-by: Aaron Pham <29749331+aarnphm@users.noreply.github.com> * docs: update docs/plugins/Assets.md Co-authored-by: Aaron Pham <29749331+aarnphm@users.noreply.github.com> * docs: update docs/plugins/CNAME.md Co-authored-by: Aaron Pham <29749331+aarnphm@users.noreply.github.com> * docs: update docs/plugins/Static.md Co-authored-by: Aaron Pham <29749331+aarnphm@users.noreply.github.com> * docs: update docs * docs: update docs/features/Mermaid diagrams.md Co-authored-by: Aaron Pham <29749331+aarnphm@users.noreply.github.com> * docs: update docs/plugins/RemoveDrafts.md Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com> * docs: update docs/plugins/Assets.md Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com> * docs: update docs/configuration.md Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com> * docs: update docs/configuration.md Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com> * docs: update docs/configuration.md Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com> * docs: some updates * docs: work in review comments --------- Signed-off-by: Eiko Wagenknecht <git@eiko-wagenknecht.de> Co-authored-by: Aaron Pham <29749331+aarnphm@users.noreply.github.com> Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>
This commit is contained in:
parent
421718958f
commit
1929241a62
41 changed files with 641 additions and 108 deletions
|
@ -53,12 +53,12 @@ All transformer plugins must define at least a `name` field to register the plug
|
||||||
|
|
||||||
Normally for both `remark` and `rehype`, you can find existing plugins that you can use to . If you'd like to create your own `remark` or `rehype` plugin, checkout the [guide to creating a plugin](https://unifiedjs.com/learn/guide/create-a-plugin/) using `unified` (the underlying AST parser and transformer library).
|
Normally for both `remark` and `rehype`, you can find existing plugins that you can use to . If you'd like to create your own `remark` or `rehype` plugin, checkout the [guide to creating a plugin](https://unifiedjs.com/learn/guide/create-a-plugin/) using `unified` (the underlying AST parser and transformer library).
|
||||||
|
|
||||||
A good example of a transformer plugin that borrows from the `remark` and `rehype` ecosystems is the [[Latex]] plugin:
|
A good example of a transformer plugin that borrows from the `remark` and `rehype` ecosystems is the [[plugins/Latex|Latex]] plugin:
|
||||||
|
|
||||||
```ts title="quartz/plugins/transformers/latex.ts"
|
```ts title="quartz/plugins/transformers/latex.ts"
|
||||||
import remarkMath from "remark-math"
|
import remarkMath from "remark-math"
|
||||||
import rehypeKatex from "rehype-katex"
|
import rehypeKatex from "rehype-katex"
|
||||||
import rehypeMathjax from "rehype-mathjax/svg.js"
|
import rehypeMathjax from "rehype-mathjax/svg"
|
||||||
import { QuartzTransformerPlugin } from "../types"
|
import { QuartzTransformerPlugin } from "../types"
|
||||||
|
|
||||||
interface Options {
|
interface Options {
|
||||||
|
@ -84,10 +84,14 @@ export const Latex: QuartzTransformerPlugin<Options> = (opts?: Options) => {
|
||||||
externalResources() {
|
externalResources() {
|
||||||
if (engine === "katex") {
|
if (engine === "katex") {
|
||||||
return {
|
return {
|
||||||
css: ["https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.9/katex.min.css"],
|
css: [
|
||||||
|
// base css
|
||||||
|
"https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.9/katex.min.css",
|
||||||
|
],
|
||||||
js: [
|
js: [
|
||||||
{
|
{
|
||||||
src: "https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.7/contrib/copy-tex.min.js",
|
// fix copy behaviour: https://github.com/KaTeX/KaTeX/blob/main/contrib/copy-tex/README.md
|
||||||
|
src: "https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.9/contrib/copy-tex.min.js",
|
||||||
loadTime: "afterDOMReady",
|
loadTime: "afterDOMReady",
|
||||||
contentType: "external",
|
contentType: "external",
|
||||||
},
|
},
|
||||||
|
|
|
@ -38,3 +38,7 @@ Some common frontmatter fields that are natively supported by Quartz:
|
||||||
|
|
||||||
When your Quartz is at a point you're happy with, you can save your changes to GitHub.
|
When your Quartz is at a point you're happy with, you can save your changes to GitHub.
|
||||||
First, make sure you've [[setting up your GitHub repository|already setup your GitHub repository]] and then do `npx quartz sync`.
|
First, make sure you've [[setting up your GitHub repository|already setup your GitHub repository]] and then do `npx quartz sync`.
|
||||||
|
|
||||||
|
## Customization
|
||||||
|
|
||||||
|
Frontmatter parsing for `title`, `tags`, `aliases` and `cssclasses` is a functionality of the [[Frontmatter]] plugin, `date` is handled by the [[CreatedModifiedDate]] plugin and `description` by the [[Description]] plugin. See the plugin pages for customization options.
|
||||||
|
|
|
@ -30,12 +30,12 @@ This part of the configuration concerns anything that can affect the whole site.
|
||||||
- `{ provider: 'umami', host: '<your-umami-host>', websiteId: '<your-umami-website-id>' }`: use [Umami](https://umami.is/);
|
- `{ provider: 'umami', host: '<your-umami-host>', websiteId: '<your-umami-website-id>' }`: use [Umami](https://umami.is/);
|
||||||
- `locale`: used for [[i18n]] and date formatting
|
- `locale`: used for [[i18n]] and date formatting
|
||||||
- `baseUrl`: this is used for sitemaps and RSS feeds that require an absolute URL to know where the canonical 'home' of your site lives. This is normally the deployed URL of your site (e.g. `quartz.jzhao.xyz` for this site). Do not include the protocol (i.e. `https://`) or any leading or trailing slashes.
|
- `baseUrl`: this is used for sitemaps and RSS feeds that require an absolute URL to know where the canonical 'home' of your site lives. This is normally the deployed URL of your site (e.g. `quartz.jzhao.xyz` for this site). Do not include the protocol (i.e. `https://`) or any leading or trailing slashes.
|
||||||
- This should also include the subpath if you are [[hosting]] on GitHub pages without a custom domain. For example, if my repository is `jackyzha0/quartz`, GitHub pages would deploy to `https://jackyzha0.github.io/quartz` and the `baseUrl` would be `jackyzha0.github.io/quartz`
|
- This should also include the subpath if you are [[hosting]] on GitHub pages without a custom domain. For example, if my repository is `jackyzha0/quartz`, GitHub pages would deploy to `https://jackyzha0.github.io/quartz` and the `baseUrl` would be `jackyzha0.github.io/quartz`.
|
||||||
- Note that Quartz 4 will avoid using this as much as possible and use relative URLs whenever it can to make sure your site works no matter _where_ you end up actually deploying it.
|
- Note that Quartz 4 will avoid using this as much as possible and use relative URLs whenever it can to make sure your site works no matter _where_ you end up actually deploying it.
|
||||||
- `ignorePatterns`: a list of [glob](<https://en.wikipedia.org/wiki/Glob_(programming)>) patterns that Quartz should ignore and not search through when looking for files inside the `content` folder. See [[private pages]] for more details.
|
- `ignorePatterns`: a list of [glob](<https://en.wikipedia.org/wiki/Glob_(programming)>) patterns that Quartz should ignore and not search through when looking for files inside the `content` folder. See [[private pages]] for more details.
|
||||||
- `defaultDateType`: whether to use created, modified, or published as the default date to display on pages and page listings.
|
- `defaultDateType`: whether to use created, modified, or published as the default date to display on pages and page listings.
|
||||||
- `theme`: configure how the site looks.
|
- `theme`: configure how the site looks.
|
||||||
- `cdnCaching`: Whether to use Google CDN to cache the fonts (generally will be faster). Disable this if you want Quartz to be self-contained. Default to `true`
|
- `cdnCaching`: If `true` (default), use Google CDN to cache the fonts. This will generally will be faster. Disable (`false`) this if you want Quartz to download the fonts to be self-contained.
|
||||||
- `typography`: what fonts to use. Any font available on [Google Fonts](https://fonts.google.com/) works here.
|
- `typography`: what fonts to use. Any font available on [Google Fonts](https://fonts.google.com/) works here.
|
||||||
- `header`: Font to use for headers
|
- `header`: Font to use for headers
|
||||||
- `code`: Font for inline and block quotes.
|
- `code`: Font for inline and block quotes.
|
||||||
|
@ -56,7 +56,7 @@ You can think of Quartz plugins as a series of transformations over content.
|
||||||
|
|
||||||
![[quartz transform pipeline.png]]
|
![[quartz transform pipeline.png]]
|
||||||
|
|
||||||
```ts
|
```ts title="quartz.config.ts"
|
||||||
plugins: {
|
plugins: {
|
||||||
transformers: [...],
|
transformers: [...],
|
||||||
filters: [...],
|
filters: [...],
|
||||||
|
@ -64,22 +64,40 @@ plugins: {
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
- [[making plugins#Transformers|Transformers]] **map** over content (e.g. parsing frontmatter, generating a description)
|
- [[tags/plugin/transformer|Transformers]] **map** over content (e.g. parsing frontmatter, generating a description)
|
||||||
- [[making plugins#Filters|Filters]] **filter** content (e.g. filtering out drafts)
|
- [[tags/plugin/filter|Filters]] **filter** content (e.g. filtering out drafts)
|
||||||
- [[making plugins#Emitters|Emitters]] **reduce** over content (e.g. creating an RSS feed or pages that list all files with a specific tag)
|
- [[tags/plugin/emitter|Emitters]] **reduce** over content (e.g. creating an RSS feed or pages that list all files with a specific tag)
|
||||||
|
|
||||||
By adding, removing, and reordering plugins from the `tranformers`, `filters`, and `emitters` fields, you can customize the behaviour of Quartz.
|
You can customize the behaviour of Quartz by adding, removing and reordering plugins in the `transformers`, `filters` and `emitters` fields.
|
||||||
|
|
||||||
> [!note]
|
> [!note]
|
||||||
> Each node is modified by every transformer _in order_. Some transformers are position-sensitive so you may need to take special note of whether it needs come before or after any other particular plugins.
|
> Each node is modified by every transformer _in order_. Some transformers are position sensitive, so you may need to pay particular attention to whether they need to come before or after certain other plugins.
|
||||||
|
|
||||||
Additionally, plugins may also have their own configuration settings that you can pass in. For example, the [[Latex]] plugin allows you to pass in a field specifying the `renderEngine` to choose between Katex and MathJax.
|
You should take care to add the plugin to the right entry corresponding to its plugin type. For example, to add the [[ExplicitPublish]] plugin (a [[tags/plugin/transformer|Transformer]], you would add the following line:
|
||||||
|
|
||||||
```ts
|
```ts title="quartz.config.ts"
|
||||||
transformers: [
|
transformers: [
|
||||||
Plugin.FrontMatter(), // uses default options
|
...
|
||||||
Plugin.Latex({ renderEngine: "katex" }), // specify some options
|
Plugin.ExplicitPublish(),
|
||||||
|
...
|
||||||
|
],
|
||||||
|
```
|
||||||
|
|
||||||
|
To remove a plugin, you should remove all occurrences of it in the `quartz.config.ts`.
|
||||||
|
|
||||||
|
To customize plugins further, some plugins may also have their own configuration settings that you can pass in. If you do not pass in a configuration, the plugin will use its default settings.
|
||||||
|
|
||||||
|
For example, the [[plugins/Latex|Latex]] plugin allows you to pass in a field specifying the `renderEngine` to choose between Katex and MathJax.
|
||||||
|
|
||||||
|
```ts title="quartz.config.ts"
|
||||||
|
transformers: [
|
||||||
|
Plugin.FrontMatter(), // use default options
|
||||||
|
Plugin.Latex({ renderEngine: "katex" }), // set some custom options
|
||||||
]
|
]
|
||||||
```
|
```
|
||||||
|
|
||||||
If you'd like to make your own plugins, read the guide on [[making plugins]] for more information.
|
Some plugins are included by default in the[ `quartz.config.ts`](https://github.com/jackyzha0/quartz/blob/v4/quartz.config.ts), but there are more available.
|
||||||
|
|
||||||
|
You can see a list of all plugins and their configuration options [[tags/plugin|here]].
|
||||||
|
|
||||||
|
If you'd like to make your own plugins, see the [[making plugins|making custom plugins]] guide.
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
---
|
---
|
||||||
|
title: LaTeX
|
||||||
tags:
|
tags:
|
||||||
- plugin/transformer
|
- feature/transformer
|
||||||
---
|
---
|
||||||
|
|
||||||
Quartz uses [Katex](https://katex.org/) by default to typeset both inline and block math expressions at build time.
|
Quartz uses [Katex](https://katex.org/) by default to typeset both inline and block math expressions at build time.
|
||||||
|
@ -38,6 +39,9 @@ a & b & c
|
||||||
\end{bmatrix}
|
\end{bmatrix}
|
||||||
$$
|
$$
|
||||||
|
|
||||||
|
> [!warn]
|
||||||
|
> Due to limitations in the [underlying parsing library](https://github.com/remarkjs/remark-math), block math in Quartz requires the `$$` delimiters to be on newlines like above.
|
||||||
|
|
||||||
### Inline Math
|
### Inline Math
|
||||||
|
|
||||||
Similarly, inline math can be rendered by delimiting math expression with a single `$`. For example, `$e^{i\pi} = -1$` produces $e^{i\pi} = -1$
|
Similarly, inline math can be rendered by delimiting math expression with a single `$`. For example, `$e^{i\pi} = -1$` produces $e^{i\pi} = -1$
|
||||||
|
@ -53,11 +57,6 @@ For example:
|
||||||
- Incorrect: `I have $1 and you have $2` produces I have $1 and you have $2
|
- Incorrect: `I have $1 and you have $2` produces I have $1 and you have $2
|
||||||
- Correct: `I have \$1 and you have \$2` produces I have \$1 and you have \$2
|
- Correct: `I have \$1 and you have \$2` produces I have \$1 and you have \$2
|
||||||
|
|
||||||
## MathJax
|
|
||||||
|
|
||||||
In `quartz.config.ts`, you can configure Quartz to use [MathJax SVG rendering](https://docs.mathjax.org/en/latest/output/svg.html) by replacing `Plugin.Latex({ renderEngine: 'katex' })` with `Plugin.Latex({ renderEngine: 'mathjax' })`
|
|
||||||
|
|
||||||
## Customization
|
## Customization
|
||||||
|
|
||||||
- Removing Latex support: remove all instances of `Plugin.Latex()` from `quartz.config.ts`.
|
Latex parsing is a functionality of the [[plugins/Latex|Latex]] plugin. See the plugin page for customization options.
|
||||||
- Plugin: `quartz/plugins/transformers/latex.ts`
|
|
||||||
|
|
|
@ -1,9 +1,15 @@
|
||||||
|
---
|
||||||
|
title: "Mermaid Diagrams"
|
||||||
|
tags:
|
||||||
|
- feature/transformer
|
||||||
|
---
|
||||||
|
|
||||||
Quartz supports Mermaid which allows you to add diagrams and charts to your notes. Mermaid supports a range of diagrams, such as [flow charts](https://mermaid.js.org/syntax/flowchart.html), [sequence diagrams](https://mermaid.js.org/syntax/sequenceDiagram.html), and [timelines](https://mermaid.js.org/syntax/timeline.html). This is enabled as a part of [[Obsidian compatibility]] and can be configured and enabled/disabled from that plugin.
|
Quartz supports Mermaid which allows you to add diagrams and charts to your notes. Mermaid supports a range of diagrams, such as [flow charts](https://mermaid.js.org/syntax/flowchart.html), [sequence diagrams](https://mermaid.js.org/syntax/sequenceDiagram.html), and [timelines](https://mermaid.js.org/syntax/timeline.html). This is enabled as a part of [[Obsidian compatibility]] and can be configured and enabled/disabled from that plugin.
|
||||||
|
|
||||||
By default, Quartz will render Mermaid diagrams to match the site theme.
|
By default, Quartz will render Mermaid diagrams to match the site theme.
|
||||||
|
|
||||||
> [!warning]
|
> [!warning]
|
||||||
> Wondering why Mermaid diagrams may not be showing up even if you have them enabled? You may need to reorder your plugins so that `Plugin.ObsidianFlavoredMarkdown()` is _after_ `Plugin.SyntaxHighlighting()`.
|
> Wondering why Mermaid diagrams may not be showing up even if you have them enabled? You may need to reorder your plugins so that [[ObsidianFlavoredMarkdown]] is _after_ [[SyntaxHighlighting]].
|
||||||
|
|
||||||
## Syntax
|
## Syntax
|
||||||
|
|
||||||
|
|
|
@ -1,33 +1,17 @@
|
||||||
---
|
---
|
||||||
|
title: "Obsidian Compatibility"
|
||||||
tags:
|
tags:
|
||||||
- plugin/transformer
|
- feature/transformer
|
||||||
---
|
---
|
||||||
|
|
||||||
Quartz was originally designed as a tool to publish Obsidian vaults as websites. Even as the scope of Quartz has widened over time, it hasn't lost the ability to seamlessly interoperate with Obsidian.
|
Quartz was originally designed as a tool to publish Obsidian vaults as websites. Even as the scope of Quartz has widened over time, it hasn't lost the ability to seamlessly interoperate with Obsidian.
|
||||||
|
|
||||||
By default, Quartz ships with `Plugin.ObsidianFlavoredMarkdown` which is a transformer plugin that adds support for [Obsidian Flavored Markdown](https://help.obsidian.md/Editing+and+formatting/Obsidian+Flavored+Markdown). This includes support for features like [[wikilinks]] and [[Mermaid diagrams]].
|
By default, Quartz ships with the [[ObsidianFlavoredMarkdown]] plugin, which is a transformer plugin that adds support for [Obsidian Flavored Markdown](https://help.obsidian.md/Editing+and+formatting/Obsidian+Flavored+Markdown). This includes support for features like [[wikilinks]] and [[Mermaid diagrams]].
|
||||||
|
|
||||||
It also ships with support for [frontmatter parsing](https://help.obsidian.md/Editing+and+formatting/Properties) with the same fields that Obsidian uses through the `Plugin.FrontMatter` transformer plugin.
|
It also ships with support for [frontmatter parsing](https://help.obsidian.md/Editing+and+formatting/Properties) with the same fields that Obsidian uses through the [[Frontmatter]] transformer plugin.
|
||||||
|
|
||||||
Finally, Quartz also provides `Plugin.CrawlLinks` which allows you to customize Quartz's link resolution behaviour to match Obsidian.
|
Finally, Quartz also provides [[CrawlLinks]] plugin, which allows you to customize Quartz's link resolution behaviour to match Obsidian.
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
- Frontmatter parsing:
|
This functionality is provided by the [[ObsidianFlavoredMarkdown]], [[Frontmatter]] and [[CrawlLinks]] plugins. See the plugin pages for customization options.
|
||||||
- Disabling: remove all instances of `Plugin.FrontMatter()` from `quartz.config.ts`.
|
|
||||||
- Customize default values for frontmatter: edit `quartz/plugins/transformers/frontmatter.ts`
|
|
||||||
- Obsidian Flavored Markdown:
|
|
||||||
- Disabling: remove all instances of `Plugin.ObsidianFlavoredMarkdown()` from `quartz.config.ts`
|
|
||||||
- Customizing features: `Plugin.ObsidianFlavoredMarkdown` has several other options to toggle on and off:
|
|
||||||
- `comments`: whether to enable `%%` style Obsidian comments. Defaults to `true`
|
|
||||||
- `highlight`: whether to enable `==` style highlights. Defaults to `true`
|
|
||||||
- `wikilinks`: whether to enable turning [[wikilinks]] into regular links. Defaults to `true`
|
|
||||||
- `callouts`: whether to enable [[callouts]]. Defaults to `true`
|
|
||||||
- `mermaid`: whether to enable [[Mermaid diagrams]]. Defaults to `true`
|
|
||||||
- `parseTags`: whether to try and parse tags in the content body. Defaults to `true`
|
|
||||||
- `parseArrows`: whether to try and parse arrows in the content body. Defaults to `true`.
|
|
||||||
- `enableInHtmlEmbed`: whether to try and parse Obsidian flavoured markdown in raw HTML. Defaults to `false`
|
|
||||||
- `enableYouTubeEmbed`: whether to enable embedded YouTube videos using external image Markdown syntax. Defaults to `false`
|
|
||||||
- Link resolution behaviour:
|
|
||||||
- Disabling: remove all instances of `Plugin.CrawlLinks()` from `quartz.config.ts`
|
|
||||||
- Changing link resolution preference: set `markdownLinkResolution` to one of `absolute`, `relative` or `shortest`
|
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
---
|
---
|
||||||
|
title: "OxHugo Compatibility"
|
||||||
tags:
|
tags:
|
||||||
- plugin/transformer
|
- 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.
|
[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.
|
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.
|
||||||
|
|
||||||
```typescript title="quartz.config.ts"
|
```typescript title="quartz.config.ts"
|
||||||
plugins: {
|
plugins: {
|
||||||
|
@ -25,15 +26,4 @@ Quartz by default doesn't understand `org-roam` files as they aren't Markdown. Y
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
- Link resolution
|
This functionality is provided by the [[OxHugoFlavoredMarkdown]] plugin. See the plugin page for customization options.
|
||||||
- `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 (`{{}}`)
|
|
||||||
- `replaceOrgLatex`: Whether to replace org-mode formatting for latex fragments with what `Plugin.Latex` supports.
|
|
||||||
|
|
||||||
> [!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.
|
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
Quartz creates an RSS feed for all the content on your site by generating an `index.xml` file that RSS readers can subscribe to. Because of the RSS spec, this requires the `baseUrl` property in your [[configuration]] to be set properly for RSS readers to pick it up properly.
|
Quartz emits an RSS feed for all the content on your site by generating an `index.xml` file that RSS readers can subscribe to. Because of the RSS spec, this requires the `baseUrl` property in your [[configuration]] to be set properly for RSS readers to pick it up properly.
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
- Remove RSS feed: set the `enableRSS` field of `Plugin.ContentIndex` in `quartz.config.ts` to be `false`.
|
This functionality is provided by the [[ContentIndex]] plugin. See the plugin page for customization options.
|
||||||
- Change number of entries: set the `rssLimit` field of `Plugin.ContentIndex` to be the desired value. It defaults to latest 10 items.
|
|
||||||
- Use rich HTML output in RSS: set `rssFullHtml` field of `Plugin.ContentIndex` to be `true`.
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
---
|
---
|
||||||
title: Callouts
|
title: Callouts
|
||||||
tags:
|
tags:
|
||||||
- plugin/transformer
|
- feature/transformer
|
||||||
---
|
---
|
||||||
|
|
||||||
Quartz supports the same Admonition-callout syntax as Obsidian.
|
Quartz supports the same Admonition-callout syntax as Obsidian.
|
||||||
|
@ -19,12 +19,13 @@ This includes
|
||||||
See [documentation on supported types and syntax here](https://help.obsidian.md/Editing+and+formatting/Callouts).
|
See [documentation on supported types and syntax here](https://help.obsidian.md/Editing+and+formatting/Callouts).
|
||||||
|
|
||||||
> [!warning]
|
> [!warning]
|
||||||
> Wondering why callouts may not be showing up even if you have them enabled? You may need to reorder your plugins so that `Plugin.ObsidianFlavoredMarkdown()` is _after_ `Plugin.SyntaxHighlighting()`.
|
> Wondering why callouts may not be showing up even if you have them enabled? You may need to reorder your plugins so that [[ObsidianFlavoredMarkdown]] is _after_ [[SyntaxHighlighting]].
|
||||||
|
|
||||||
## Customization
|
## Customization
|
||||||
|
|
||||||
- Disable callouts: simply pass `callouts: false` to the plugin: `Plugin.ObsidianFlavoredMarkdown({ callouts: false })`
|
The callouts are a functionality of the [[ObsidianFlavoredMarkdown]] plugin. See the plugin page for how to enable or disable them.
|
||||||
- Editing icons: `quartz/styles/callouts.scss`
|
|
||||||
|
You can edit the icons by customizing `quartz/styles/callouts.scss`.
|
||||||
|
|
||||||
### Add custom callouts
|
### Add custom callouts
|
||||||
|
|
||||||
|
|
|
@ -1,18 +1,20 @@
|
||||||
---
|
---
|
||||||
title: Folder and Tag Listings
|
title: Folder and Tag Listings
|
||||||
tags:
|
tags:
|
||||||
- plugin/emitter
|
- feature/emitter
|
||||||
---
|
---
|
||||||
|
|
||||||
Quartz creates listing pages for any folders and tags you have.
|
Quartz emits listing pages for any folders and tags you have.
|
||||||
|
|
||||||
## Folder Listings
|
## Folder Listings
|
||||||
|
|
||||||
Quartz will generate an index page for all the pages under that folder. This includes any content that is multiple levels deep.
|
Quartz will generate an index page for all the pages under that folder. This includes any content that is multiple levels deep.
|
||||||
|
|
||||||
Additionally, Quartz will also generate pages for subfolders. Say you have a note in a nested folder `content/abc/def/note.md`. Then, Quartz would generate a page for all the notes under `abc` _and_ a page for all the notes under `abc/def`.
|
Additionally, Quartz will also generate pages for subfolders. Say you have a note in a nested folder `content/abc/def/note.md`. Then Quartz would generate a page for all the notes under `abc` _and_ a page for all the notes under `abc/def`.
|
||||||
|
|
||||||
By default, Quartz will title the page `Folder: <name of folder>` and no description. You can override this by creating an `index.md` file in the folder with the `title` [[authoring content#Syntax|frontmatter]] field. Any content you write in this file will also be used in the description of the folder.
|
You can link to the folder listing by referencing its name, plus a trailing slash, like this: `[[advanced/]]` (results in [[advanced/]]).
|
||||||
|
|
||||||
|
By default, Quartz will title the page `Folder: <folder name>` and no description. You can override this by creating an `index.md` file in the folder with the `title` [[authoring content#Syntax|frontmatter]] field. Any content you write in this file will also be used in the folder description.
|
||||||
|
|
||||||
For example, for the folder `content/posts`, you can add another file `content/posts/index.md` to add a specific description for it.
|
For example, for the folder `content/posts`, you can add another file `content/posts/index.md` to add a specific description for it.
|
||||||
|
|
||||||
|
@ -20,13 +22,12 @@ For example, for the folder `content/posts`, you can add another file `content/p
|
||||||
|
|
||||||
Quartz will also create an index page for each unique tag in your vault and render a list of all notes with that tag.
|
Quartz will also create an index page for each unique tag in your vault and render a list of all notes with that tag.
|
||||||
|
|
||||||
Quartz also supports tag hierarchies as well (e.g. `plugin/emitter`) and will also render a separate tag page for each layer of the tag hierarchy. It will also create a default global tag index page at `/tags` that displays a list of all the tags in your Quartz.
|
Quartz also supports tag hierarchies as well (e.g. `plugin/emitter`) and will also render a separate tag page for each level of the tag hierarchy. It will also create a default global tag index page at `/tags` that displays a list of all the tags in your Quartz.
|
||||||
|
|
||||||
Like folder listings, you can also provide a description and title for a tag page by creating a file for each tag. For example, if you wanted to create a custom description for the #component tag, you would create a file at `content/tags/component.md` with a title and description.
|
You can link to the tag listing by referencing its name with a `tag/` prefix, like this: `[[tags/plugin]]` (results in [[tags/plugin]]).
|
||||||
|
|
||||||
|
As with folder listings, you can also provide a description and title for a tag page by creating a file for each tag. For example, if you wanted to create a custom description for the #component tag, you would create a file at `content/tags/component.md` with a title and description.
|
||||||
|
|
||||||
## Customization
|
## Customization
|
||||||
|
|
||||||
The layout for both the folder and content pages can be customized. By default, they use the `defaultListPageLayout` in `quartz.layouts.ts`. If you'd like to make more involved changes to the layout and don't mind editing some [[creating components|Quartz components]], you can take a look at `quartz/components/pages/FolderContent.tsx` and `quartz/components/pages/TagContent.tsx` respectively.
|
The folder listings are a functionality of the [[FolderPage]] plugin, the tag listings of the [[TagPage]] plugin. See the plugin pages for customization options.
|
||||||
|
|
||||||
- Removing folder listings: remove `Plugin.FolderPage()` from `emitters` in `quartz.config.ts`
|
|
||||||
- Removing tag listings: remove `Plugin.TagPage()` from `emitters` in `quartz.config.ts`
|
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
---
|
---
|
||||||
title: Private Pages
|
title: Private Pages
|
||||||
tags:
|
tags:
|
||||||
- plugin/filter
|
- feature/filter
|
||||||
---
|
---
|
||||||
|
|
||||||
There may be some notes you want to avoid publishing as a website. Quartz supports this through two mechanisms which can be used in conjunction:
|
There may be some notes you want to avoid publishing as a website. Quartz supports this through two mechanisms which can be used in conjunction:
|
||||||
|
|
||||||
## Filter Plugins
|
## Filter Plugins
|
||||||
|
|
||||||
[[making plugins#Filters|Filter plugins]] are plugins that filter out content based off of certain criteria. By default, Quartz uses the `Plugin.RemoveDrafts` plugin which filters out any note that has `draft: true` in the frontmatter.
|
[[making plugins#Filters|Filter plugins]] are plugins that filter out content based off of certain criteria. By default, Quartz uses the [[RemoveDrafts]] plugin which filters out any note that has `draft: true` in the frontmatter.
|
||||||
|
|
||||||
If you'd like to only publish a select number of notes, you can instead use `Plugin.ExplicitPublish` which will filter out all notes except for any that have `publish: true` in the frontmatter.
|
If you'd like to only publish a select number of notes, you can instead use [[ExplicitPublish]] which will filter out all notes except for any that have `publish: true` in the frontmatter.
|
||||||
|
|
||||||
> [!warning]
|
> [!warning]
|
||||||
> Regardless of the filter plugin used, **all non-markdown files will be emitted and available publically in the final build.** This includes files such as images, voice recordings, PDFs, etc. One way to prevent this and still be able to embed local images is to create a folder specifically for public media and add the following two patterns to the ignorePatterns array.
|
> Regardless of the filter plugin used, **all non-markdown files will be emitted and available publically in the final build.** This includes files such as images, voice recordings, PDFs, etc. One way to prevent this and still be able to embed local images is to create a folder specifically for public media and add the following two patterns to the ignorePatterns array.
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
---
|
---
|
||||||
title: Syntax Highlighting
|
title: Syntax Highlighting
|
||||||
tags:
|
tags:
|
||||||
- plugin/transformer
|
- feature/transformer
|
||||||
---
|
---
|
||||||
|
|
||||||
Syntax highlighting in Quartz is completely done at build-time. This means that Quartz only ships pre-calculated CSS to highlight the right words so there is no heavy client-side bundle that does the syntax highlighting.
|
Syntax highlighting in Quartz is completely done at build-time. This means that Quartz only ships pre-calculated CSS to highlight the right words so there is no heavy client-side bundle that does the syntax highlighting.
|
||||||
|
@ -130,6 +130,4 @@ const [name, setName] = useState('Taylor');
|
||||||
|
|
||||||
## Customization
|
## Customization
|
||||||
|
|
||||||
- Removing syntax highlighting: delete all usages of `Plugin.SyntaxHighlighting()` from `quartz.config.ts`.
|
Syntax highlighting is a functionality of the [[SyntaxHighlighting]] plugin. See the plugin page for customization options.
|
||||||
- Style: By default, Quartz uses derivatives of the GitHub light and dark themes. You can customize the colours in the `quartz/styles/syntax.scss` file.
|
|
||||||
- Plugin: `quartz/plugins/transformers/syntax.ts`
|
|
||||||
|
|
|
@ -2,25 +2,17 @@
|
||||||
title: "Table of Contents"
|
title: "Table of Contents"
|
||||||
tags:
|
tags:
|
||||||
- component
|
- component
|
||||||
- plugin/transformer
|
- feature/transformer
|
||||||
---
|
---
|
||||||
|
|
||||||
Quartz can automatically generate a table of contents from a list of headings on each page. It will also show you your current scroll position on the site by marking headings you've scrolled through with a different colour.
|
Quartz can automatically generate a table of contents (TOC) from a list of headings on each page. It will also show you your current scrolling position on the page by highlighting headings you've scrolled through with a different color.
|
||||||
|
|
||||||
By default, it will show all headers from H1 (`# Title`) all the way to H3 (`### Title`) and will only show the table of contents if there is more than 1 header on the page.
|
You can hide the TOC on a page by adding `enableToc: false` to the frontmatter for that page.
|
||||||
You can also hide the table of contents on a page by adding `enableToc: false` to the frontmatter for that page.
|
|
||||||
|
|
||||||
> [!info]
|
By default, the TOC shows all headings from H1 (`# Title`) to H3 (`### Title`) and is only displayed if there is more than one heading on the page.
|
||||||
> This feature requires both `Plugin.TableOfContents` in your `quartz.config.ts` and `Component.TableOfContents` in your `quartz.layout.ts` to function correctly.
|
|
||||||
|
|
||||||
## Customization
|
## Customization
|
||||||
|
|
||||||
- Removing table of contents: remove all instances of `Plugin.TableOfContents()` from `quartz.config.ts`. and `Component.TableOfContents()` from `quartz.layout.ts`
|
The table of contents is a functionality of the [[TableOfContents]] plugin. See the plugin page for more customization options.
|
||||||
- Changing the max depth: pass in a parameter to `Plugin.TableOfContents({ maxDepth: 4 })`
|
|
||||||
- Changing the minimum number of entries in the Table of Contents before it renders: pass in a parameter to `Plugin.TableOfContents({ minEntries: 3 })`
|
It also needs the `TableOfContents` component, which is displayed in the right sidebar by default. You can change this by customizing the [[layout]]. The TOC component can be configured with the `layout` parameter, which can either be `modern` (default) or `legacy`.
|
||||||
- Collapse the table of content by default: pass in a parameter to `Plugin.TableOfContents({ collapseByDefault: true })`
|
|
||||||
- Component: `quartz/components/TableOfContents.tsx`
|
|
||||||
- Style:
|
|
||||||
- Modern (default): `quartz/components/styles/toc.scss`
|
|
||||||
- Legacy Quartz 3 style: `quartz/components/styles/legacyToc.scss`
|
|
||||||
- Script: `quartz/components/scripts/toc.inline.ts`
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ title: Wikilinks
|
||||||
|
|
||||||
Wikilinks were pioneered by earlier internet wikis to make it easier to write links across pages without needing to write Markdown or HTML links each time.
|
Wikilinks were pioneered by earlier internet wikis to make it easier to write links across pages without needing to write Markdown or HTML links each time.
|
||||||
|
|
||||||
Quartz supports Wikilinks by default and these links are resolved by Quartz using `Plugin.CrawlLinks`. See the [Obsidian Help page on Internal Links](https://help.obsidian.md/Linking+notes+and+files/Internal+links) for more information on Wikilink syntax.
|
Quartz supports Wikilinks by default and these links are resolved by Quartz using the [[CrawlLinks]] plugin. See the [Obsidian Help page on Internal Links](https://help.obsidian.md/Linking+notes+and+files/Internal+links) for more information on Wikilink syntax.
|
||||||
|
|
||||||
This is enabled as a part of [[Obsidian compatibility]] and can be configured and enabled/disabled from that plugin.
|
This is enabled as a part of [[Obsidian compatibility]] and can be configured and enabled/disabled from that plugin.
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ If you prefer instructions in a video format you can try following Nicole van de
|
||||||
|
|
||||||
## 🔧 Features
|
## 🔧 Features
|
||||||
|
|
||||||
- [[Obsidian compatibility]], [[full-text search]], [[graph view]], note transclusion, [[wikilinks]], [[backlinks]], [[Latex]], [[syntax highlighting]], [[popover previews]], [[Docker Support]], [[i18n|internationalization]] and [many more](./features) right out of the box
|
- [[Obsidian compatibility]], [[full-text search]], [[graph view]], note transclusion, [[wikilinks]], [[backlinks]], [[features/Latex|Latex]], [[syntax highlighting]], [[popover previews]], [[Docker Support]], [[i18n|internationalization]] and [many more](./features) right out of the box
|
||||||
- Hot-reload for both configuration and content
|
- Hot-reload for both configuration and content
|
||||||
- Simple JSX layouts and [[creating components|page components]]
|
- Simple JSX layouts and [[creating components|page components]]
|
||||||
- [[SPA Routing|Ridiculously fast page loads]] and tiny bundle sizes
|
- [[SPA Routing|Ridiculously fast page loads]] and tiny bundle sizes
|
||||||
|
|
37
docs/plugins/AliasRedirects.md
Normal file
37
docs/plugins/AliasRedirects.md
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
---
|
||||||
|
title: AliasRedirects
|
||||||
|
tags:
|
||||||
|
- plugin/emitter
|
||||||
|
---
|
||||||
|
|
||||||
|
This plugin emits HTML redirect pages for aliases and permalinks defined in the frontmatter of content files.
|
||||||
|
|
||||||
|
For example, A `foo.md` has the following frontmatter
|
||||||
|
|
||||||
|
```md title="foo.md"
|
||||||
|
---
|
||||||
|
title: "Foo"
|
||||||
|
alias:
|
||||||
|
- "bar"
|
||||||
|
---
|
||||||
|
```
|
||||||
|
|
||||||
|
The target `host.me/bar` will be redirected to `host.me/foo`
|
||||||
|
|
||||||
|
Note that these are permanent redirect.
|
||||||
|
|
||||||
|
The emitter supports the following aliases:
|
||||||
|
|
||||||
|
- `aliases`
|
||||||
|
- `alias`
|
||||||
|
|
||||||
|
> [!note]
|
||||||
|
> For information on how to add, remove or configure plugins, see the [[Configuration#Plugins|Configuration]] page.
|
||||||
|
|
||||||
|
This plugin has no configuration options.
|
||||||
|
|
||||||
|
## API
|
||||||
|
|
||||||
|
- Category: Emitter
|
||||||
|
- Function name: `Plugin.AliasRedirects()`.
|
||||||
|
- Source: [`quartz/plugins/emitters/aliases.ts`](https://github.com/jackyzha0/quartz/blob/v4/quartz/plugins/emitters/aliases.ts).
|
20
docs/plugins/Assets.md
Normal file
20
docs/plugins/Assets.md
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
---
|
||||||
|
title: Assets
|
||||||
|
tags:
|
||||||
|
- plugin/emitter
|
||||||
|
---
|
||||||
|
|
||||||
|
This plugin emits all non-Markdown static assets in your content folder (like images, videos, HTML, etc). The plugin respects the `ignorePatterns` in the global [[configuration]].
|
||||||
|
|
||||||
|
Note that all static assets will then be accessible through its path on your generated site, i.e: `host.me/path/to/static.pdf`
|
||||||
|
|
||||||
|
> [!note]
|
||||||
|
> For information on how to add, remove or configure plugins, see the [[Configuration#Plugins|Configuration]] page.
|
||||||
|
|
||||||
|
This plugin has no configuration options.
|
||||||
|
|
||||||
|
## API
|
||||||
|
|
||||||
|
- Category: Emitter
|
||||||
|
- Function name: `Plugin.Assets()`.
|
||||||
|
- Source: [`quartz/plugins/emitters/assets.ts`](https://github.com/jackyzha0/quartz/blob/v4/quartz/plugins/emitters/assets.ts).
|
22
docs/plugins/CNAME.md
Normal file
22
docs/plugins/CNAME.md
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
---
|
||||||
|
title: CNAME
|
||||||
|
tags:
|
||||||
|
- plugin/emitter
|
||||||
|
---
|
||||||
|
|
||||||
|
This plugin emits a `CNAME` record that points your subdomain to the default domain of your site.
|
||||||
|
|
||||||
|
If you want to use a custom domain name like `quartz.example.com` for the site, then this is needed.
|
||||||
|
|
||||||
|
See [[Hosting]] for more information.
|
||||||
|
|
||||||
|
> [!note]
|
||||||
|
> For information on how to add, remove or configure plugins, see the [[Configuration#Plugins|Configuration]] page.
|
||||||
|
|
||||||
|
This plugin has no configuration options.
|
||||||
|
|
||||||
|
## API
|
||||||
|
|
||||||
|
- Category: Emitter
|
||||||
|
- Function name: `Plugin.CNAME()`.
|
||||||
|
- Source: [`quartz/plugins/emitters/cname.ts`](https://github.com/jackyzha0/quartz/blob/v4/quartz/plugins/emitters/cname.ts).
|
18
docs/plugins/ComponentResources.md
Normal file
18
docs/plugins/ComponentResources.md
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
---
|
||||||
|
title: ComponentResources
|
||||||
|
tags:
|
||||||
|
- plugin/emitter
|
||||||
|
---
|
||||||
|
|
||||||
|
This plugin manages and emits the static resources required for the Quartz framework. This includes CSS stylesheets and JavaScript scripts that enhance the functionality and aesthetics of the generated site. See also the `cdnCaching` option in the `theme` section of the [[configuration]].
|
||||||
|
|
||||||
|
> [!note]
|
||||||
|
> For information on how to add, remove or configure plugins, see the [[Configuration#Plugins|Configuration]] page.
|
||||||
|
|
||||||
|
This plugin has no configuration options.
|
||||||
|
|
||||||
|
## API
|
||||||
|
|
||||||
|
- Category: Emitter
|
||||||
|
- Function name: `Plugin.ComponentResources()`.
|
||||||
|
- Source: [`quartz/plugins/emitters/componentResources.ts`](https://github.com/jackyzha0/quartz/blob/v4/quartz/plugins/emitters/componentResources.ts).
|
26
docs/plugins/ContentIndex.md
Normal file
26
docs/plugins/ContentIndex.md
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
---
|
||||||
|
title: ContentIndex
|
||||||
|
tags:
|
||||||
|
- plugin/emitter
|
||||||
|
---
|
||||||
|
|
||||||
|
This plugin emits both RSS and an XML sitemap for your site. The [[RSS Feed]] allows users to subscribe to content on your site and the sitemap allows search engines to better index your site. The plugin also emits a `contentIndex.json` file which is used by dynamic frontend components like search and graph.
|
||||||
|
|
||||||
|
This plugin emits a comprehensive index of the site's content, generating additional resources such as a sitemap, an RSS feed, and a
|
||||||
|
|
||||||
|
> [!note]
|
||||||
|
> For information on how to add, remove or configure plugins, see the [[Configuration#Plugins|Configuration]] page.
|
||||||
|
|
||||||
|
This plugin accepts the following configuration options:
|
||||||
|
|
||||||
|
- `enableSiteMap`: If `true` (default), generates a sitemap XML file (`sitemap.xml`) listing all site URLs for search engines in content discovery.
|
||||||
|
- `enableRSS`: If `true` (default), produces an RSS feed (`index.xml`) with recent content updates.
|
||||||
|
- `rssLimit`: Defines the maximum number of entries to include in the RSS feed, helping to focus on the most recent or relevant content. Defaults to `10`.
|
||||||
|
- `rssFullHtml`: If `true`, the RSS feed includes full HTML content. Otherwise it includes just summaries.
|
||||||
|
- `includeEmptyFiles`: If `true` (default), content files with no body text are included in the generated index and resources.
|
||||||
|
|
||||||
|
## API
|
||||||
|
|
||||||
|
- Category: Emitter
|
||||||
|
- Function name: `Plugin.ContentIndex()`.
|
||||||
|
- Source: [`quartz/plugins/emitters/contentIndex.ts`](https://github.com/jackyzha0/quartz/blob/v4/quartz/plugins/emitters/contentIndex.ts).
|
18
docs/plugins/ContentPage.md
Normal file
18
docs/plugins/ContentPage.md
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
---
|
||||||
|
title: ContentPage
|
||||||
|
tags:
|
||||||
|
- plugin/emitter
|
||||||
|
---
|
||||||
|
|
||||||
|
This plugin is a core component of the Quartz framework. It generates the HTML pages for each piece of Markdown content. It emits the full-page [[layout]], including headers, footers, and body content, among others.
|
||||||
|
|
||||||
|
> [!note]
|
||||||
|
> For information on how to add, remove or configure plugins, see the [[Configuration#Plugins|Configuration]] page.
|
||||||
|
|
||||||
|
This plugin has no configuration options.
|
||||||
|
|
||||||
|
## API
|
||||||
|
|
||||||
|
- Category: Emitter
|
||||||
|
- Function name: `Plugin.ContentPage()`.
|
||||||
|
- Source: [`quartz/plugins/emitters/contentPage.tsx`](https://github.com/jackyzha0/quartz/blob/v4/quartz/plugins/emitters/contentPage.tsx).
|
30
docs/plugins/CrawlLinks.md
Normal file
30
docs/plugins/CrawlLinks.md
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
---
|
||||||
|
title: CrawlLinks
|
||||||
|
tags:
|
||||||
|
- plugin/transformer
|
||||||
|
---
|
||||||
|
|
||||||
|
This plugin parses links and processes them to point to the right places. It is also needed for embedded links (like images). See [[Obsidian compatibility]] for more information.
|
||||||
|
|
||||||
|
> [!note]
|
||||||
|
> For information on how to add, remove or configure plugins, see the [[Configuration#Plugins|Configuration]] page.
|
||||||
|
|
||||||
|
This plugin accepts the following configuration options:
|
||||||
|
|
||||||
|
- `markdownLinkResolution`: Sets the strategy for resolving Markdown paths, can be `"absolute"` (default), `"relative"` or `"shortest"`. You should use the same setting here as in [[Obsidian compatibility|Obsidian]].
|
||||||
|
- `absolute`: Path relative to the root of the content folder.
|
||||||
|
- `relative`: Path relative to the file you are linking from.
|
||||||
|
- `shortest`: Name of the file. If this isn't enough to identify the file, use the full absolute path.
|
||||||
|
- `prettyLinks`: If `true` (default), simplifies links by removing folder paths, making them more user friendly (e.g. `folder/deeply/nested/note` becomes `note`).
|
||||||
|
- `openLinksInNewTab`: If `true`, configures external links to open in a new tab. Defaults to `false`.
|
||||||
|
- `lazyLoad`: If `true`, adds lazy loading to resource elements (`img`, `video`, etc.) to improve page load performance. Defaults to `false`.
|
||||||
|
- `externalLinkIcon`: Adds an icon next to external links when `true` (default) to visually distinguishing them from internal links.
|
||||||
|
|
||||||
|
> [!warning]
|
||||||
|
> Removing this plugin is _not_ recommended and will likely break the page.
|
||||||
|
|
||||||
|
## API
|
||||||
|
|
||||||
|
- Category: Transformer
|
||||||
|
- Function name: `Plugin.CrawlLinks()`.
|
||||||
|
- Source: [`quartz/plugins/transformers/links.ts`](https://github.com/jackyzha0/quartz/blob/v4/quartz/plugins/transformers/links.ts).
|
25
docs/plugins/CreatedModifiedDate.md
Normal file
25
docs/plugins/CreatedModifiedDate.md
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
---
|
||||||
|
title: "CreatedModifiedDate"
|
||||||
|
tags:
|
||||||
|
- plugin/transformer
|
||||||
|
---
|
||||||
|
|
||||||
|
This plugin determines the created, modified, and published dates for a document using three potential data sources: frontmatter metadata, Git history, and the filesystem. See [[authoring content#Syntax]] for more information.
|
||||||
|
|
||||||
|
> [!note]
|
||||||
|
> For information on how to add, remove or configure plugins, see the [[Configuration#Plugins|Configuration]] page.
|
||||||
|
|
||||||
|
This plugin accepts the following configuration options:
|
||||||
|
|
||||||
|
- `priority`: The data sources to consult for date information. Highest priority first. Possible values are `"frontmatter"`, `"git"`, and `"filesystem"`. Defaults to `"frontmatter", "git", "filesystem"]`.
|
||||||
|
|
||||||
|
> [!warning]
|
||||||
|
> If you rely on `git` for dates, make sure `defaultDateType` is set to `modified` in `quartz.config.ts`.
|
||||||
|
>
|
||||||
|
> Depending on how you [[hosting|host]] your Quartz, the `filesystem` dates of your local files may not match the final dates. In these cases, it may be better to use `git` or `frontmatter` to guarantee correct dates.
|
||||||
|
|
||||||
|
## API
|
||||||
|
|
||||||
|
- Category: Transformer
|
||||||
|
- Function name: `Plugin.CreatedModifiedDate()`.
|
||||||
|
- Source: [`quartz/plugins/transformers/lastmod.ts`](https://github.com/jackyzha0/quartz/blob/v4/quartz/plugins/transformers/lastmod.ts).
|
22
docs/plugins/Description.md
Normal file
22
docs/plugins/Description.md
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
---
|
||||||
|
title: Description
|
||||||
|
tags:
|
||||||
|
- plugin/transformer
|
||||||
|
---
|
||||||
|
|
||||||
|
This plugin generates descriptions that are used as metadata for the HTML `head`, the [[RSS Feed]] and in [[folder and tag listings]] if there is no main body content, the description is used as the text between the title and the listing.
|
||||||
|
|
||||||
|
If the frontmatter contains a `description` property, it is used (see [[authoring content#Syntax]]). Otherwise, the plugin will do its best to use the first few sentences of the content to reach the target description length.
|
||||||
|
|
||||||
|
> [!note]
|
||||||
|
> For information on how to add, remove or configure plugins, see the [[Configuration#Plugins|Configuration]] page.
|
||||||
|
|
||||||
|
This plugin accepts the following configuration options:
|
||||||
|
|
||||||
|
- `descriptionLength`: the maximum length of the generated description. Default is 150 characters. The cut off happens after the first _sentence_ that ends after the given length.
|
||||||
|
|
||||||
|
## API
|
||||||
|
|
||||||
|
- Category: Transformer
|
||||||
|
- Function name: `Plugin.Description()`.
|
||||||
|
- Source: [`quartz/plugins/transformers/description.ts`](https://github.com/jackyzha0/quartz/blob/v4/quartz/plugins/transformers/description.ts).
|
18
docs/plugins/ExplicitPublish.md
Normal file
18
docs/plugins/ExplicitPublish.md
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
---
|
||||||
|
title: ExplicitPublish
|
||||||
|
tags:
|
||||||
|
- plugin/filter
|
||||||
|
---
|
||||||
|
|
||||||
|
This plugin filters content based on an explicit `publish` flag in the frontmatter, allowing only content that is explicitly marked for publication to pass through. It's the opt-in version of [[RemoveDrafts]]. See [[private pages]] for more information.
|
||||||
|
|
||||||
|
> [!note]
|
||||||
|
> For information on how to add, remove or configure plugins, see the [[Configuration#Plugins|Configuration]] page.
|
||||||
|
|
||||||
|
This plugin has no configuration options.
|
||||||
|
|
||||||
|
## API
|
||||||
|
|
||||||
|
- Category: Emitter
|
||||||
|
- Function name: `Plugin.ExplicitPublish()`.
|
||||||
|
- Source: [`quartz/plugins/filters/explicit.ts`](https://github.com/jackyzha0/quartz/blob/v4/quartz/plugins/filters/explicit.ts).
|
22
docs/plugins/FolderPage.md
Normal file
22
docs/plugins/FolderPage.md
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
---
|
||||||
|
title: FolderPage
|
||||||
|
tags:
|
||||||
|
- plugin/emitter
|
||||||
|
---
|
||||||
|
|
||||||
|
This plugin generates index pages for folders, creating a listing page for each folder that contains multiple content files. See [[folder and tag listings]] for more information.
|
||||||
|
|
||||||
|
Example: [[advanced/|Advanced]]
|
||||||
|
|
||||||
|
> [!note]
|
||||||
|
> For information on how to add, remove or configure plugins, see the [[Configuration#Plugins|Configuration]] page.
|
||||||
|
|
||||||
|
This plugin has no configuration options.
|
||||||
|
|
||||||
|
The pages are displayed using the `defaultListPageLayout` in `quartz.layouts.ts`. For the content, the `FolderContent` component is used. If you want to modify the layout, you must edit it directly (`quartz/components/pages/FolderContent.tsx`).
|
||||||
|
|
||||||
|
## API
|
||||||
|
|
||||||
|
- Category: Emitter
|
||||||
|
- Function name: `Plugin.FolderPage()`.
|
||||||
|
- Source: [`quartz/plugins/emitters/folderPage.tsx`](https://github.com/jackyzha0/quartz/blob/v4/quartz/plugins/emitters/folderPage.tsx).
|
24
docs/plugins/Frontmatter.md
Normal file
24
docs/plugins/Frontmatter.md
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
---
|
||||||
|
title: "Frontmatter"
|
||||||
|
tags:
|
||||||
|
- plugin/transformer
|
||||||
|
---
|
||||||
|
|
||||||
|
This plugin parses the frontmatter of the page using the [gray-matter](https://github.com/jonschlinkert/gray-matter) library. See [[authoring content#Syntax]], [[Obsidian compatibility]] and [[OxHugo compatibility]] for more information.
|
||||||
|
|
||||||
|
> [!note]
|
||||||
|
> For information on how to add, remove or configure plugins, see the [[Configuration#Plugins|Configuration]] page.
|
||||||
|
|
||||||
|
This plugin accepts the following configuration options:
|
||||||
|
|
||||||
|
- `delimiters`: the delimiters to use for the frontmatter. Can have one value (e.g. `"---"`) or separate values for opening and closing delimiters (e.g. `["---", "~~~"]`). Defaults to `"---"`.
|
||||||
|
- `language`: the language to use for parsing the frontmatter. Can be `yaml` (default) or `toml`.
|
||||||
|
|
||||||
|
> [!warning]
|
||||||
|
> This plugin must not be removed, otherwise Quartz will break.
|
||||||
|
|
||||||
|
## API
|
||||||
|
|
||||||
|
- Category: Transformer
|
||||||
|
- Function name: `Plugin.Frontmatter()`.
|
||||||
|
- Source: [`quartz/plugins/transformers/frontmatter.ts`](https://github.com/jackyzha0/quartz/blob/v4/quartz/plugins/transformers/frontmatter.ts).
|
23
docs/plugins/GitHubFlavoredMarkdown.md
Normal file
23
docs/plugins/GitHubFlavoredMarkdown.md
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
---
|
||||||
|
title: GitHubFlavoredMarkdown
|
||||||
|
tags:
|
||||||
|
- plugin/transformer
|
||||||
|
---
|
||||||
|
|
||||||
|
This plugin enhances Markdown processing to support GitHub Flavored Markdown (GFM) which adds features like autolink literals, footnotes, strikethrough, tables and tasklists.
|
||||||
|
|
||||||
|
In addition, this plugin adds optional features for typographic refinement (such as converting straight quotes to curly quotes, dashes to en-dashes/em-dashes, and ellipses) and automatic heading links as a symbol that appears next to the heading on hover.
|
||||||
|
|
||||||
|
> [!note]
|
||||||
|
> For information on how to add, remove or configure plugins, see the [[Configuration#Plugins|Configuration]] page.
|
||||||
|
|
||||||
|
This plugin accepts the following configuration options:
|
||||||
|
|
||||||
|
- `enableSmartyPants`: When true, enables typographic enhancements. Default is true.
|
||||||
|
- `linkHeadings`: When true, automatically adds links to headings. Default is true.
|
||||||
|
|
||||||
|
## API
|
||||||
|
|
||||||
|
- Category: Transformer
|
||||||
|
- Function name: `Plugin.GitHubFlavoredMarkdown()`.
|
||||||
|
- Source: [`quartz/plugins/transformers/gfm.ts`](https://github.com/jackyzha0/quartz/blob/v4/quartz/plugins/transformers/gfm.ts).
|
18
docs/plugins/HardLineBreaks.md
Normal file
18
docs/plugins/HardLineBreaks.md
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
---
|
||||||
|
title: HardLineBreaks
|
||||||
|
tags:
|
||||||
|
- plugin/transformer
|
||||||
|
---
|
||||||
|
|
||||||
|
This plugin automatically converts single line breaks in Markdown text into hard line breaks in the HTML output. This plugin is not enabled by default as this doesn't follow the semantics of actual Markdown but you may enable it if you'd like parity with [[Obsidian compatibility|Obsidian]].
|
||||||
|
|
||||||
|
> [!note]
|
||||||
|
> For information on how to add, remove or configure plugins, see the [[Configuration#Plugins|Configuration]] page.
|
||||||
|
|
||||||
|
This plugin has no configuration options.
|
||||||
|
|
||||||
|
## API
|
||||||
|
|
||||||
|
- Category: Transformer
|
||||||
|
- Function name: `Plugin.HardLineBreaks()`.
|
||||||
|
- Source: [`quartz/plugins/transformers/linebreaks.ts`](https://github.com/jackyzha0/quartz/blob/v4/quartz/plugins/transformers/linebreaks.ts).
|
20
docs/plugins/Latex.md
Normal file
20
docs/plugins/Latex.md
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
---
|
||||||
|
title: "Latex"
|
||||||
|
tags:
|
||||||
|
- plugin/transformer
|
||||||
|
---
|
||||||
|
|
||||||
|
This plugin adds LaTeX support to Quartz. See [[features/Latex|Latex]] for more information.
|
||||||
|
|
||||||
|
> [!note]
|
||||||
|
> For information on how to add, remove or configure plugins, see the [[Configuration#Plugins|Configuration]] page.
|
||||||
|
|
||||||
|
This plugin accepts the following configuration options:
|
||||||
|
|
||||||
|
- `renderEngine`: the engine to use to render LaTeX equations. Can be `"katex"` for [KaTeX](https://katex.org/) or `"mathjax"` for [MathJax](https://www.mathjax.org/) [SVG rendering](https://docs.mathjax.org/en/latest/output/svg.html). Defaults to KaTeX.
|
||||||
|
|
||||||
|
## API
|
||||||
|
|
||||||
|
- Category: Transformer
|
||||||
|
- Function name: `Plugin.Latex()`.
|
||||||
|
- Source: [`quartz/plugins/transformers/latex.ts`](https://github.com/jackyzha0/quartz/blob/v4/quartz/plugins/transformers/latex.ts).
|
18
docs/plugins/NotFoundPage.md
Normal file
18
docs/plugins/NotFoundPage.md
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
---
|
||||||
|
title: NotFoundPage
|
||||||
|
tags:
|
||||||
|
- plugin/emitter
|
||||||
|
---
|
||||||
|
|
||||||
|
This plugin emits a 404 (Not Found) page for broken or non-existent URLs.
|
||||||
|
|
||||||
|
> [!note]
|
||||||
|
> For information on how to add, remove or configure plugins, see the [[Configuration#Plugins|Configuration]] page.
|
||||||
|
|
||||||
|
This plugin has no configuration options.
|
||||||
|
|
||||||
|
## API
|
||||||
|
|
||||||
|
- Category: Emitter
|
||||||
|
- Function name: `Plugin.NotFoundPage()`.
|
||||||
|
- Source: [`quartz/plugins/emitters/404.tsx`](https://github.com/jackyzha0/quartz/blob/v4/quartz/plugins/emitters/404.tsx).
|
34
docs/plugins/ObsidianFlavoredMarkdown.md
Normal file
34
docs/plugins/ObsidianFlavoredMarkdown.md
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
---
|
||||||
|
title: ObsidianFlavoredMarkdown
|
||||||
|
tags:
|
||||||
|
- plugin/transformer
|
||||||
|
---
|
||||||
|
|
||||||
|
This plugin provides support for [[Obsidian compatibility]].
|
||||||
|
|
||||||
|
> [!note]
|
||||||
|
> For information on how to add, remove or configure plugins, see the [[Configuration#Plugins|Configuration]] page.
|
||||||
|
|
||||||
|
This plugin accepts the following configuration options:
|
||||||
|
|
||||||
|
- `comments`: If `true` (default), enables parsing of `%%` style Obsidian comment blocks.
|
||||||
|
- `highlight`: If `true` (default), enables parsing of `==` style highlights within content.
|
||||||
|
- `wikilinks`:If `true` (default), turns [[wikilinks]] into regular links.
|
||||||
|
- `callouts`: If `true` (default), adds support for [[callouts|callout]] blocks for emphasizing content.
|
||||||
|
- `mermaid`: If `true` (default), enables [[Mermaid diagrams|Mermaid diagram]] rendering within Markdown files.
|
||||||
|
- `parseTags`: If `true` (default), parses and links tags within the content.
|
||||||
|
- `parseArrows`: If `true` (default), transforms arrow symbols into their HTML character equivalents.
|
||||||
|
- `parseBlockReferences`: If `true` (default), handles block references, linking to specific content blocks.
|
||||||
|
- `enableInHtmlEmbed`: If `true`, allows embedding of content directly within HTML. Defaults to `false`.
|
||||||
|
- `enableYouTubeEmbed`: If `true` (default), enables the embedding of YouTube videos using external image Markdown syntax.
|
||||||
|
- `enableVideoEmbed`: If `true` (default), enables the embedding of video files.
|
||||||
|
- `enableCheckbox`: If `true`, adds support for interactive checkboxes in content. Defaults to `false`.
|
||||||
|
|
||||||
|
> [!warning]
|
||||||
|
> Don't remove this plugin if you're using [[Obsidian compatibility|Obsidian]] to author the content!
|
||||||
|
|
||||||
|
## API
|
||||||
|
|
||||||
|
- Category: Transformer
|
||||||
|
- Function name: `Plugin.ObsidianFlavoredMarkdown()`.
|
||||||
|
- Source: [`quartz/plugins/transformers/toc.ts`](https://github.com/jackyzha0/quartz/blob/v4/quartz/plugins/transformers/toc.ts).
|
29
docs/plugins/OxHugoFlavoredMarkdown.md
Normal file
29
docs/plugins/OxHugoFlavoredMarkdown.md
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
---
|
||||||
|
title: OxHugoFlavoredMarkdown
|
||||||
|
tags:
|
||||||
|
- plugin/transformer
|
||||||
|
---
|
||||||
|
|
||||||
|
This plugin provides support for [ox-hugo](https://github.com/kaushalmodi/ox-hugo) compatibility. See [[OxHugo compatibility]] for more information.
|
||||||
|
|
||||||
|
> [!note]
|
||||||
|
> For information on how to add, remove or configure plugins, see the [[Configuration#Plugins|Configuration]] page.
|
||||||
|
|
||||||
|
This plugin accepts the following configuration options:
|
||||||
|
|
||||||
|
- `wikilinks`: If `true` (default), converts Hugo `{{ relref }}` shortcodes to Quartz [[wikilinks]].
|
||||||
|
- `removePredefinedAnchor`: If `true` (default), strips predefined anchors from headings.
|
||||||
|
- `removeHugoShortcode`: If `true` (default), removes Hugo shortcode syntax (`{{}}`) from the content.
|
||||||
|
- `replaceFigureWithMdImg`: If `true` (default), replaces `<figure/>` with `![]()`.
|
||||||
|
- `replaceOrgLatex`: If `true` (default), converts Org-mode [[features/Latex|Latex]] fragments to Quartz-compatible LaTeX wrapped in `$` (for inline) and `$$` (for block equations).
|
||||||
|
|
||||||
|
> [!warning]
|
||||||
|
> While you can use this together with [[ObsidianFlavoredMarkdown]], it's not recommended because it might mutate the file in unexpected ways. Use with caution.
|
||||||
|
>
|
||||||
|
> If you use `toml` frontmatter, make sure to configure the [[Frontmatter]] plugin accordingly. See [[OxHugo compatibility]] for an example.
|
||||||
|
|
||||||
|
## API
|
||||||
|
|
||||||
|
- Category: Transformer
|
||||||
|
- Function name: `Plugin.OxHugoFlavoredMarkdown()`.
|
||||||
|
- Source: [`quartz/plugins/transformers/oxhugofm.ts`](https://github.com/jackyzha0/quartz/blob/v4/quartz/plugins/transformers/oxhugofm.ts).
|
18
docs/plugins/RemoveDrafts.md
Normal file
18
docs/plugins/RemoveDrafts.md
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
---
|
||||||
|
title: RemoveDrafts
|
||||||
|
tags:
|
||||||
|
- plugin/filter
|
||||||
|
---
|
||||||
|
|
||||||
|
This plugin filters out content from your vault, so that only finalized content is made available. This prevents [[private pages]] from being published. By default, it filters out all pages with `draft: true` in the frontmatter and leaves all other pages intact.
|
||||||
|
|
||||||
|
> [!note]
|
||||||
|
> For information on how to add, remove or configure plugins, see the [[Configuration#Plugins|Configuration]] page.
|
||||||
|
|
||||||
|
This plugin has no configuration options.
|
||||||
|
|
||||||
|
## API
|
||||||
|
|
||||||
|
- Category: Filter
|
||||||
|
- Function name: `Plugin.RemoveDrafts()`.
|
||||||
|
- Source: [`quartz/plugins/filters/draft.ts`](https://github.com/jackyzha0/quartz/blob/v4/quartz/plugins/filters/draft.ts).
|
21
docs/plugins/Static.md
Normal file
21
docs/plugins/Static.md
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
---
|
||||||
|
title: Static
|
||||||
|
tags:
|
||||||
|
- plugin/emitter
|
||||||
|
---
|
||||||
|
|
||||||
|
This plugin emits all static resources needed by Quartz. This is used, for example, for fonts and images that need a stable position, such as banners and icons. The plugin respects the `ignorePatterns` in the global [[configuration]].
|
||||||
|
|
||||||
|
> [!important]
|
||||||
|
> This is different from [[Assets]]. The resources from the [[Static]] plugin are located under `quartz/static`, whereas [[Assets]] renders all static resources under `content` and is used for images, videos, audio, etc. that are directly referenced by your markdown content.
|
||||||
|
|
||||||
|
> [!note]
|
||||||
|
> For information on how to add, remove or configure plugins, see the [[Configuration#Plugins|Configuration]] page.
|
||||||
|
|
||||||
|
This plugin has no configuration options.
|
||||||
|
|
||||||
|
## API
|
||||||
|
|
||||||
|
- Category: Emitter
|
||||||
|
- Function name: `Plugin.Static()`.
|
||||||
|
- Source: [`quartz/plugins/emitters/static.ts`](https://github.com/jackyzha0/quartz/blob/v4/quartz/plugins/emitters/static.ts).
|
23
docs/plugins/SyntaxHighlighting.md
Normal file
23
docs/plugins/SyntaxHighlighting.md
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
---
|
||||||
|
title: "SyntaxHighlighting"
|
||||||
|
tags:
|
||||||
|
- plugin/transformer
|
||||||
|
---
|
||||||
|
|
||||||
|
This plugin is used to add syntax highlighting to code blocks in Quartz. See [[syntax highlighting]] for more information.
|
||||||
|
|
||||||
|
> [!note]
|
||||||
|
> For information on how to add, remove or configure plugins, see the [[Configuration#Plugins|Configuration]] page.
|
||||||
|
|
||||||
|
This plugin accepts the following configuration options:
|
||||||
|
|
||||||
|
- `theme`: a separate id of one of the [themes bundled with Shikiji](https://shikiji.netlify.app/themes). One for light mode and one for dark mode. Defaults to `theme: { light: "github-light", dark: "github-dark" }`.
|
||||||
|
- `keepBackground`: If set to `true`, the background of the Shikiji theme will be used. With `false` (default) the Quartz theme color for background will be used instead.
|
||||||
|
|
||||||
|
In addition, you can further override the colours in the `quartz/styles/syntax.scss` file.
|
||||||
|
|
||||||
|
## API
|
||||||
|
|
||||||
|
- Category: Transformer
|
||||||
|
- Function name: `Plugin.SyntaxHighlighting()`.
|
||||||
|
- Source: [`quartz/plugins/transformers/syntax.ts`](https://github.com/jackyzha0/quartz/blob/v4/quartz/plugins/transformers/syntax.ts).
|
26
docs/plugins/TableOfContents.md
Normal file
26
docs/plugins/TableOfContents.md
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
---
|
||||||
|
title: TableOfContents
|
||||||
|
tags:
|
||||||
|
- plugin/transformer
|
||||||
|
---
|
||||||
|
|
||||||
|
This plugin generates a table of contents (TOC) for Markdown documents. See [[table of contents]] for more information.
|
||||||
|
|
||||||
|
> [!note]
|
||||||
|
> For information on how to add, remove or configure plugins, see the [[Configuration#Plugins|Configuration]] page.
|
||||||
|
|
||||||
|
This plugin accepts the following configuration options:
|
||||||
|
|
||||||
|
- `maxDepth`: Limits the depth of headings included in the TOC, ranging from `1` (top level headings only) to `6` (all heading levels). Default is `3`.
|
||||||
|
- `minEntries`: The minimum number of heading entries required for the TOC to be displayed. Default is `1`.
|
||||||
|
- `showByDefault`: If `true` (default), the TOC should be displayed by default. Can be overridden by frontmatter settings.
|
||||||
|
- `collapseByDefault`: If `true`, the TOC will start in a collapsed state. Default is `false`.
|
||||||
|
|
||||||
|
> [!warning]
|
||||||
|
> This plugin needs the `Component.TableOfContents` component in `quartz.layout.ts` to determine where to display the TOC. Without it, nothing will be displayed. They should always be added or removed together.
|
||||||
|
|
||||||
|
## API
|
||||||
|
|
||||||
|
- Category: Transformer
|
||||||
|
- Function name: `Plugin.TableOfContents()`.
|
||||||
|
- Source: [`quartz/plugins/transformers/toc.ts`](https://github.com/jackyzha0/quartz/blob/v4/quartz/plugins/transformers/toc.ts).
|
20
docs/plugins/TagPage.md
Normal file
20
docs/plugins/TagPage.md
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
---
|
||||||
|
title: TagPage
|
||||||
|
tags:
|
||||||
|
- plugin/emitter
|
||||||
|
---
|
||||||
|
|
||||||
|
This plugin emits dedicated pages for each tag used in the content. See [[folder and tag listings]] for more information.
|
||||||
|
|
||||||
|
> [!note]
|
||||||
|
> For information on how to add, remove or configure plugins, see the [[Configuration#Plugins|Configuration]] page.
|
||||||
|
|
||||||
|
This plugin has no configuration options.
|
||||||
|
|
||||||
|
The pages are displayed using the `defaultListPageLayout` in `quartz.layouts.ts`. For the content, the `TagContent` component is used. If you want to modify the layout, you must edit it directly (`quartz/components/pages/TagContent.tsx`).
|
||||||
|
|
||||||
|
## API
|
||||||
|
|
||||||
|
- Category: Emitter
|
||||||
|
- Function name: `Plugin.AliasRedirects()`.
|
||||||
|
- Source: [`quartz/plugins/emitters/tagPage.tsx`](https://github.com/jackyzha0/quartz/blob/v4/quartz/plugins/emitters/tagPage.tsx).
|
3
docs/plugins/index.md
Normal file
3
docs/plugins/index.md
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
---
|
||||||
|
title: Plugins
|
||||||
|
---
|
3
docs/tags/plugin.md
Normal file
3
docs/tags/plugin.md
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
---
|
||||||
|
title: Plugins
|
||||||
|
---
|
|
@ -1,6 +1,11 @@
|
||||||
import { QuartzConfig } from "./quartz/cfg"
|
import { QuartzConfig } from "./quartz/cfg"
|
||||||
import * as Plugin from "./quartz/plugins"
|
import * as Plugin from "./quartz/plugins"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Quartz 4.0 Configuration
|
||||||
|
*
|
||||||
|
* See https://quartz.jzhao.xyz/configuration for more information.
|
||||||
|
*/
|
||||||
const config: QuartzConfig = {
|
const config: QuartzConfig = {
|
||||||
configuration: {
|
configuration: {
|
||||||
pageTitle: "🪴 Quartz 4.0",
|
pageTitle: "🪴 Quartz 4.0",
|
||||||
|
@ -48,19 +53,14 @@ const config: QuartzConfig = {
|
||||||
transformers: [
|
transformers: [
|
||||||
Plugin.FrontMatter(),
|
Plugin.FrontMatter(),
|
||||||
Plugin.CreatedModifiedDate({
|
Plugin.CreatedModifiedDate({
|
||||||
// you can add 'git' here for last modified from Git
|
|
||||||
// if you do rely on git for dates, ensure defaultDateType is 'modified'
|
|
||||||
priority: ["frontmatter", "filesystem"],
|
priority: ["frontmatter", "filesystem"],
|
||||||
}),
|
}),
|
||||||
Plugin.Latex({ renderEngine: "katex" }),
|
Plugin.Latex({ renderEngine: "katex" }),
|
||||||
Plugin.SyntaxHighlighting({
|
Plugin.SyntaxHighlighting({
|
||||||
// uses themes bundled with Shikiji, see https://shikiji.netlify.app/themes
|
|
||||||
theme: {
|
theme: {
|
||||||
light: "github-light",
|
light: "github-light",
|
||||||
dark: "github-dark",
|
dark: "github-dark",
|
||||||
},
|
},
|
||||||
// set this to 'true' to use the background color of the Shikiji theme
|
|
||||||
// if set to 'false', will use Quartz theme colors for background
|
|
||||||
keepBackground: false,
|
keepBackground: false,
|
||||||
}),
|
}),
|
||||||
Plugin.ObsidianFlavoredMarkdown({ enableInHtmlEmbed: false }),
|
Plugin.ObsidianFlavoredMarkdown({ enableInHtmlEmbed: false }),
|
||||||
|
|
Loading…
Reference in a new issue