Skip to content

Instantly share code, notes, and snippets.

@radekkozak
Last active September 2, 2022 21:58
Show Gist options
  • Save radekkozak/9b07af0ff3c90d4dc51d3a4ab41b5b8f to your computer and use it in GitHub Desktop.
Save radekkozak/9b07af0ff3c90d4dc51d3a4ab41b5b8f to your computer and use it in GitHub Desktop.
Obsidian [[WikiLinks|with aliases]] preprocessor for Marked app
@radekkozak
Copy link
Author

radekkozak commented Feb 20, 2021

This simple preprocessor will make Obsidian [[WikiLinks]] clickable within Marked2 app.
Links will open appropriate file in Obsidian via its URL scheme.

Instructions:

  1. Clone the script to you local computer
  2. Inside the script change the VAULT_NAME constant to the vault of your choice and save the changes
  3. Open Marked2 and go to app Preferences
  4. In the "Advanced" tab select "Preprocessor" and provide your local path to the script

That's it.

Script should take care of your WikiLinks along with aliases if there are some

marked2-instructions

@radekkozak
Copy link
Author

Side note

I'm using this along with Marked2 Custom Preprocessor option and pandoc for rendering my Obsidian notes for the output, be it PDF, ODT, DOCX, RTF or HTML. Marked2 is very powerfull in that regard, allowing me to have References rendered from Zotero via autoupdated .bib file. I use that capabilities mostly for bigger Outlines, essays or papers where such case is a must.

marked2-pandoc

full Args are (change your paths of course, and pick up style of your liking)

--citeproc -f markdown -M lang=pl-PL -t html5 --csl=/your/path/to/chicago.csl --bibliography=/your/path/to/Library.bib

With those in place sth like below is possible. The note is in Polish so sorry for that but you can see references - in Chicago style - rendered at the bottom

marked2-example

@hollina
Copy link

hollina commented May 12, 2021

This is fantastic. Thank you for sharing!

@radekkozak
Copy link
Author

This is fantastic. Thank you for sharing!

Hi Alex, sorry for belated reply but of course you're very welcome. I'm glad you find this helpful / cc @hollina

All best

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment