Rendering/embedding code files

Obsidian is already capable of properly highlighting code in code blocks. So I would imagine that supporting entire xxx.py files for example shouldn’t be a huge step from there. It would allow for documenting code quite effectively!

As of now, there has been a mention of a plugin which did that, though so far it only support very few languages, and I don’t know what the plans are for it.

Thoughts?

1 Like

Check out the Quoth plugin.

path: [[example-top-level-manifest.json]]
# ranges: "Hello " to "world.", "Foobar" to "Bizzbaz"
# join: " -- "
display: inline
#show: author, title

I use the above to inline some JSON into a document and the code is highlighted. A more generic “include” plugin would be nice where we could do something like below would be nice but I couldn’t find one.

```include
path: [[my-example.c]]

Check out my plugin Code Styler which does exactly this: GitHub - mayurankv/Obsidian-Code-Styler: A plugin for Obsidian.md for styling codeblocks and inline code