DocC Support
Marked understands Apple DocC documentation catalogs (.docc bundles). When you preview Markdown that lives inside or beside a catalog, Marked can resolve extensionless image references to files in the catalog’s Resources folder — including ~dark and @2x variants.
For normal Markdown documents that use paths with file extensions (images/icon.png), see Image Variants. That feature works everywhere; DocC resolution is catalog-specific.
Contents
Enabling DocC resolution
In , enable Resolve DocC image references (on by default).
DocC detection runs when Marked finds a .docc catalog ancestor of the open document. No special URL scheme or Xcode integration is required — open the catalog’s Markdown the same way you would any other file.
Extensionless references
Inside a DocC catalog, authors typically reference images without a path or extension:

Marked resolves OrderStateTransitions to Resources/OrderStateTransitions.png (or another supported type) when that file exists in the catalog.
References that already include a path and extension — images/chart.png — are left to Image Variants instead and are not rewritten by DocC resolution.
Dark mode and Retina variants
DocC catalogs often ship multiple files per image:
| Role |
Example in Resources/
|
|---|---|
| Light (1x) |
diagram.png
|
| Dark (1x) |
diagram~dark.png
|
| Light (2x) |
diagram@2x.png
|
| Dark (2x) |
diagram~dark@2x.png
|
When more than one variant exists, Marked emits the same responsive <picture> markup described in Image Variants. A single-file reference still resolves to a normal <img> or  path.
HTML and Markdown
DocC resolution applies during Marked’s include pass:
-
Markdown sources —
references -
HTML sources —
<img src="ImageName">without extension
Both are updated before preview rendering.
File watching
Resolved images under the catalog Resources folder are added to Marked’s watch list. Editing a variant file externally updates the preview without a manual refresh.
Related topics
-
Image Variants —
~darkand@2xdetection for extension-based paths in any project - Xcode Playgrounds — preview Swift playground commentary
- Settings: Apps — DocC and image variant preferences
Next up: Additional app integrations ▶
Search | Support Site | Knowledgebase | Legal | Privacy | Twitter