-
How can I force a page always display the For example, I am embedding a 3rd party application that renders |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
If I understand correctly, you want to do this for a single page. You could add the following additional JavaScript to the Markdown file of the page, which will set light mode and hide the toggle: <script>
document.body.setAttribute("data-md-color-scheme", "default") // set to light scheme
var palette = document.querySelector("[data-md-component=palette]")
palette.style.display = "none" // hide palette switcher
</script> Not beautiful, but it should do the trick. Note that this doesn't work with instant loading. It's possible, but more work to pull off. |
Beta Was this translation helpful? Give feedback.
If I understand correctly, you want to do this for a single page. You could add the following additional JavaScript to the Markdown file of the page, which will set light mode and hide the toggle:
Not beautiful, but it should do the trick. Note that this doesn't work with instant loading. It's possible, but more work to pull off.