mirror of
https://github.com/quartz-community/crawl-links.git
synced 2026-11-16 23:53:52 +00:00
Quartz's default crawl links plugin.
- TypeScript 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
|
||
| .changeset | ||
| .github/workflows | ||
| src | ||
| test | ||
| types | ||
| .eslintrc.json | ||
| .gitignore | ||
| .prettierignore | ||
| .prettierrc | ||
| CHANGELOG.md | ||
| LICENSE | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| tsconfig.build.json | ||
| tsconfig.json | ||
| tsup.config.ts | ||
| vitest.config.ts | ||
@quartz-community/crawl-links
Processes and resolves internal and external links, tracks outgoing links, and optionally adds external link icons.
Important
Built into Quartz 5.1+. Link processing is part of Quartz core now, configured under
configuration.linksinquartz.config.yaml— you don't need this plugin anymore. Existing config entries for it keep working (Quartz applies their options to the built-in and doesn't load this package); runnpx quartz plugin doctor --fixto update your config. See Built-in processing. This package is kept for Quartz versions before 5.1.
Installation
npx quartz plugin add github:quartz-community/crawl-links
Usage
plugins:
- source: github:quartz-community/crawl-links
enabled: true
options:
markdownLinkResolution: shortest
For advanced use cases, you can override in TypeScript:
import * as ExternalPlugin from "./.quartz/plugins";
ExternalPlugin.CrawlLinks({
markdownLinkResolution: "shortest",
});
Configuration
| Option | Type | Default | Description |
|---|---|---|---|
markdownLinkResolution |
"absolute" | "relative" | "shortest" |
"absolute" |
How to resolve internal links. |
prettyLinks |
boolean |
true |
Whether to use pretty links. |
openLinksInNewTab |
boolean |
false |
Whether to open links in a new tab. |
lazyLoad |
boolean |
false |
Whether to lazy load links. |
externalLinkIcon |
boolean |
true |
Whether to add an external link icon. |
disableBrokenWikilinks |
boolean |
false |
When true, internal links whose resolved slug is not in ctx.allSlugs gain a broken CSS class (alongside internal) for styling. |
Documentation
See the Quartz documentation for more information.
License
MIT