"Specific" guide to transitioning from Web Development to Obsidian Mods, Publish, Themes, Custom CSS and Custom JS

  1. Publish doesn’t support environment variables.
  2. I don’t understand what you’re trying to do, but you can follow this guide to create a Publish theme and learn about Obsidian’s CSS variables. You can also use Obsidian dev tools and your browser’s dev tools to understand the DOM structure if you want to target specific elements.
  3. You can only have one CSS file for your site (publish.css) so you’d need to compile CSS using something like Sass or Less if you want to keep it modular. Snippets and publish.css can target some of the same elements since Publish has a similar DOM structure to the app, but snippets apply only to the app, whereas publish.css applies only to your site.
  4. Same as publish.css you can only have one publish.js file so you’ll have to compile that file if you want to build it up from several files.
2 Likes