Cant get xref to image to work with markdown #195
-
I've just got a vanilla setup with Statiq.web and the cleanblog theme I'm trying to add an image to a blogpost using xref:
This doesn't seem to work, the xref does not get translated. It comes through as:
Is there some way to peek into the xref collection and see whats in there? Or is this happening because xref only applies to content files and not to assets? - in which case whats the best way to stick an image into a markdown blog post? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
That's exactly it. The idea behind xrefs is that it's a way for the generator to build a dictionary of pages keyed by a simple ID (the xref, which is normally constructed from the page title, but can also be customized per-page in front-matter). That way when a page moves around to a different path, the pages linking to it don't have to do anything to be generated with the new URL. They're really handy in content heavy sites with lots of cross-references to ensure you don't have to go around and change 100 other pages with inbound links every time you move a page. Images in Markdown are fairly straightforward and don't require special xref handling at all. Assume you've put an image |
Beta Was this translation helpful? Give feedback.
That's exactly it. The idea behind xrefs is that it's a way for the generator to build a dictionary of pages keyed by a simple ID (the xref, which is normally constructed from the page title, but can also be customized per-page in front-matter). That way when a page moves around to a different path, the pages linking to it don't have to do anything to be generated with the new URL. They're really handy in content heavy sites with lots of cross-references to ensure you don't have to go around and change 100 other pages with inbound links every time you move a page.
Images in Markdown are fairly straightfor…