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:

quartz.config.yaml
configuration:
  links:
    markdownLinkResolution: shortest

Options:

  • markdownLinkResolution: Sets the strategy for resolving Markdown paths, can be "absolute", "relative" or "shortest" (default; the crawl-links plugin 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: 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.
  • disableBrokenWikilinks: If true, internal links whose resolved slug is not present in the site (i.e. no matching file under markdownLinkResolution) gain an additional broken CSS class alongside internal, so they can be styled distinctly. Defaults to true, 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 under static/), are never marked. Links to pages that a filter removes (e.g. drafts or pages without publish: true under ExplicitPublish) are marked broken too, since they 404; they also get data-filtered="<filter name>". A folder link stays unbroken when only the folder’s index.md is removed, because the folder still gets a generated folder page.
  • enabled: set to false to turn link processing off (not recommended — links break on nested pages and backlinks/graph are empty).
  • order: position among transformers. Defaults to 60, after the Markdown flavour plugins (e.g. ObsidianFlavoredMarkdown at 40) 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