It is now preferable to turn this into a kit, like this:
- Move the mini-app code from
custom.js
to a javascript code-block in a page of Logseq itself (e.g.MyMiniApp
). - Delete the observer
miniAppObserver
. - Rename the entry function (here
applyMiniAppCode
) to the page’s name (e.g.myminiapp
). - Wrap the macro’s html with an outer
<div class='kit' data-kit='myminiapp'>
- Ensure kits’ code is inside
custom.js
.