Link processing is built into Quartz (it used to be the crawl-links plugin). It rewrites links and embedded resources (images, videos, SVG embeds, …) so they point to the right place from any page, adds the internal / external / alias / broken classes, and records each page’s outgoing links in file.data.links — used by backlinks, the graph view, the content index and the has-backlinks layout condition. See Obsidian compatibility for more information.
Configure it under configuration.links in quartz.config.yaml:
configuration:
links:
markdownLinkResolution: shortestOptions:
markdownLinkResolution: Sets the strategy for resolving Markdown paths, can be"absolute","relative"or"shortest"(default; thecrawl-linksplugin defaulted to"absolute"). You should use the same setting here as in 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: Iftrue(default), simplifies links by removing folder paths, making them more user friendly (e.g.folder/deeply/nested/notebecomesnote).openLinksInNewTab: Iftrue, configures external links to open in a new tab. Defaults tofalse.lazyLoad: Iftrue, adds lazy loading to resource elements (img,video, etc.) to improve page load performance. Defaults tofalse.externalLinkIcon: Adds an icon next to external links whentrue(default) to visually distinguishing them from internal links.disableBrokenWikilinks: Iftrue, internal links whose resolved slug is not present in the site (i.e. no matching file undermarkdownLinkResolution) gain an additionalbrokenCSS class alongsideinternal, so they can be styled distinctly. Defaults totrue, as Obsidian marks unresolved links. Applies to both wikilinks and regular Markdown links, since both are indistinguishable<a>elements by the time links are processed. Only targets Quartz can check are marked: pages, and files of the types a vault holds (images, audio, video, PDFs, canvases, bases) that the content doesn’t have. Links to other files, which Quartz or a plugin may emit (index.xml,sitemap.xml,robots.txt, anything understatic/), are never marked. Links to pages that a filter removes (e.g. drafts or pages withoutpublish: trueunder ExplicitPublish) are markedbrokentoo, since they 404; they also getdata-filtered="<filter name>". A folder link stays unbroken when only the folder’sindex.mdis removed, because the folder still gets a generated folder page.enabled: set tofalseto turn link processing off (not recommended — links break on nested pages and backlinks/graph are empty).order: position among transformers. Defaults to60, after the Markdown flavour plugins (e.g. ObsidianFlavoredMarkdown at40) that turn wikilinks into links.
Note
An existing @quartz-community/crawl-links entry in quartz.config.yaml is applied to configuration.links automatically. Run npx quartz plugin doctor --fix to move it.
API
- Category: Transformer (built-in)
- Source:
quartz/plugins/builtins/links.ts - Can be replaced by a plugin that declares
quartz.capabilities.provides.data: ["links"](see built-in processing > Replacing a built-in).