Stream: website

Topic: <meta property="og:image"> for wiki-links


view this post on Zulip Shivaraj B H (Dec 22 2023 at 05:50):

The corresponding Pandoc AST for the wiki-link ![[emanote-logo.svg]] is: [Para [Link ("",[],[("data-wikilink-type","WikiLinkEmbed")]) [] ("emanote-logo.svg","")]]. We can just pattern match on Link and WikiLinkEmbed to get emanote-logo.svg (let's assume for simplicity that WikiLinkEmbed only refers to static image files), but the problem here is that the relative URL is _emanote-static/emanote-logo.svg which is obtained from siteRouteUrl function. I was considering to create a pandoc filter to fetch the siteRouteUrl-- if there is no way to fetch it by reusing the function linked above --, is that the correct approach? @Srid

view this post on Zulip Srid (Dec 27 2023 at 16:31):

There are functions to parse and resolve wikilinks, https://github.com/srid/emanote/blob/30d3d084ddf551e131523b2c41c5a5ab49592848/emanote/src/Emanote/Pandoc/Renderer/Url.hs#L31-L34


Last updated: Nov 15 2024 at 12:33 UTC