Closed lyctw closed 3 months ago
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
The image has to be in your vault, not the assets folder. Quartz will automatically link to it.
Please make sure the link settings in Obsidian (in Settings > Files and Links > New link format) and Quartz (in quartz.config.ts
) are identical. See below
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
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.
// In quartz.config.ts
Plugin.CrawlLinks({ markdownLinkResolution: "shortest" }), // or "absolute" or "relative", make sure to match Obsidian.
Hi @saberzero1
Somehow shortest
doesn't work and I changed it to relative
, now it shows on both website and vault.
Thank you! I'm closing the issue.
Hi, I'm still having difficulty with exactly this. I have tried both shortest
in Obsidian and Quartz as well as relative
to no avail. Here's exactly what I'm doing:
shortest
, relative
, and absolute
it doesn't work.When I check the public
folder, it looks like my image is not copied over. How should I fix this?
Hi, I'm still having difficulty with exactly this. I have tried both
shortest
in Obsidian and Quartz as well asrelative
to no avail. Here's exactly what I'm doing:
- I have a test page set up. I'm doing editing in Obsidian.
- I take a screenshot and paste it in the test page in Obsidian.
- Text updates render in localhost no problem, but i get a 404 link to the image
- For all choices of
shortest
,relative
, andabsolute
it doesn't work.When I check the
public
folder, it looks like my image is not copied over. How should I fix this?
Can you post a snippet of your test markdown file with the link to the image?
Absolutely:
---
title: Introduction to Python
draft: false
tags:
- tutorial
---
The rest of your content lives here. You can use **Markdown** here :)
![[brain.png]]
An image is above.
here's the webpage:
And here's the Obsidian screenshot:
And updated console log:
Okay I consulted a friend and figured out my error.
Image assets should be in the content/
folder. I even put them in a subfolder content/assets
and now it works just fine.
My final settings to make this work smoothly:
shortest
shortest
content/assets
; obsidian pasted links automatically go there nowcontent
should be the root of the vault not the quartz
top-level folder
Hi developers,
I don't want to rely on services like imgur to host my picture, I want these assets to be uploaded within the same repository. I've tried putting it under
quartz/static/assets/my_picture.png
and using link![[/static/assets/my_picture.png]]
in published website. It works while the local obsidian app cannot preview it.Please tell me how to add a picture in the note. Thanks.