This is my note for installing code snippets for the Obsidian note-taking app.
There are bits and pieces of information scattered through the Internet, so it took a little while to find how to do this properly. This post consolidates this information that may help others as well.
Each vault can be customized independently. To find where your vault is stored, press the “open another vault” button at the bottom left section of the app screen.
notion image
Press the three vertical dot button for the vault you want to tailor (this should say “more options”:
notion image
You should see an option to reveal the location in the Finder app:
notion image
It will open up Finder and take you to that location.
notion image
If this is your first time creating snippets, there won’t be a snippet folder, so you’ll need to create the snippets folder in the .obisidian folder.
notion image
You can then create your snippet file with the .css extension and place your CSS code into that file. In the example above, I created the line_wrap.css file.
The last step is to enable the CSS in the settings. Open the settings, select “Appearance,” and switch on the switch for the CSS file you created.
notion image
Hopefully, this makes it easier for you.
Please consider joining Medium as a paying member. It’s $5 for unlimited access. And if you use the following link, it will go a long way in supporting me as a writer.
Share this article

Join the newsletter

Join thousands of satisfied readers.