# Feedback on "on-discourse" javascript for setting up custom JS for each page?

**URL:** https://meta.discourse.org/t/feedback-on-on-discourse-javascript-for-setting-up-custom-js-for-each-page/285647
**Category:** Development
**Created:** [November 16, 2023, 3:48am UTC](https://meta.discourse.org/t/feedback-on-on-discourse-javascript-for-setting-up-custom-js-for-each-page/285647 "2023-11-16T03:48:54Z")
**Posts on this page:** 1
**Showing post:** 10

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [November 18, 2023, 1:47pm UTC](https://meta.discourse.org/t/feedback-on-on-discourse-javascript-for-setting-up-custom-js-for-each-page/285647/10 "2023-11-18T13:47:22Z")

</div>

In this case, you would make it a Theme Component and add that Component to all Themes. (I’ll admit this is an additional complexity).

If you want to run the site professionally, making sure all your code is on Github is a very good idea indeed.

However, initially when you are just trying some ideas, for sure, you can mess with it “locally” if you so please.

When code changes have settled down, you should probably stick it in source control, but I’d argue the earlier the better.

A way of combining quick evolution with GitHub is to combine it with this:

> [@Install the Discourse Theme CLI console app to help you build themes](https://meta.discourse.org/t/install-the-discourse-theme-cli-console-app-to-help-you-build-themes/82950):
>
> The [[discourse] Discourse Theme CLI](https://github.com/discourse/discourse_theme) is a ruby gem that allows you to use your editor of choice when developing Discourse themes and theme components. As you save files the CLI will update the remote theme or component and changes to it will appear live! Installing To play with it, make sure you have Ruby 2.5 or up installed. If you are on Windows, you have 2 options: Option 1: [Windows Subsystem for Linux](https://en.wikipedia.org/wiki/Windows_Subsystem_for_Linux). Windows 10 has access to a full Linux environment, you can use it to install …

And deploy to a test Theme Component in a Test Theme … but now we are really getting funky …

Which allows you to deploy on the fly, then you can secure your changes to a git repo once happy.

---

_[View the full topic](https://meta.discourse.org/t/feedback-on-on-discourse-javascript-for-setting-up-custom-js-for-each-page/285647)._
