I’m running insider build v0.11.10 the release notes say
Option to run JavaScript on your site, by uploading a file named publish.js in the root of your vault. Note that this is only available for sites under a custom domain.
My site is set up on a custom domain (https://longpressed.com) and is also redirected from Long Pressed. I was able to set up the GA ID and get that working.
I’m trying to get custom JavaScript to run on my site now.
Things I have tried
I have a JavaScript file called publish.js
in the root of my Vault, similar to obsidian.css. It has a few lines of JavaScript in it. When I click publish, I see the obsidian.css file but not the publish.js file. I originally created the file in Obsidian which called it publish.js.md
but I renamed it and edited it in WebStorm instead.
I’ve searched the Help vault that comes with the insider build as well as the forum. I’ve even tried renaming it to obsidian.js in case that was a typo. I’ve restarted Obsidian and I’ve looked under both unchanged and new menus. I’ve also checked to see if something needed to be enabled in my vault settings and in my site options.