In this tutorial, you'll learn how to start developing a theme for Obsidian. Themes let you customize how Obsidian looks and feels, using CSS.
After you've completed this tutorial, you'll be able to:
To complete this tutorial, you'll need:
In this step, you'll download a sample theme to the themes
directory in your vault's .obsidian
directory so that Obsidian can find it.
The sample theme you'll use in this tutorial is available in a GitHub repository.
Open a terminal window and change the project directory to the themes
directory.
cd path/to/vault/.obsidian/themes
Clone the sample theme using Git.
git clone https://github.com/obsidianmd/obsidian-sample-theme.git "Sample Theme"
The repository for the sample theme is a GitHub template repository, which means you can create your own repository from the sample theme. To learn how, refer to Creating a repository from a template.
Remember to use the URL to your own repository when cloning the sample theme.
You've enabled the sample theme. Next, we'll make some changes to it.
In this step, you'll rename the theme by updating the manifest, manifest.json
. The manifest contains information about your theme, such as its name and description.
Open manifest.json
in your code editor.
Change name
to a human-friendly name, such as "Disco Lights"
.
Rename the theme directory under themes
to the same name. The name of the theme directory must exactly match the name
property in manifest.json
.
mv "Sample Theme" "Disco Lights"
Restart Obsidian to load the new changes to the manifest.
Go back to Settings → Appearance → Themes and notice that the name of the theme has been changed.
Remember to restart Obsidian whenever you make changes to manifest.json
.