# How to easily edit my site remotely?

**URL:** https://meta.discourse.org/t/how-to-easily-edit-my-site-remotely/300940
**Category:** Development
**Created:** [March 26, 2024, 3:35am UTC](https://meta.discourse.org/t/how-to-easily-edit-my-site-remotely/300940 "2024-03-26T03:35:46Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![45thj5ej](https://avatars.discourse-cdn.com/v4/letter/4/34f0e0/32.png) [@45thj5ej](https://meta.discourse.org/u/45thj5ej)
#### Post date: [March 26, 2024, 3:35am UTC](https://meta.discourse.org/t/how-to-easily-edit-my-site-remotely/300940/1 "2024-03-26T03:35:46Z")

</div>

So, mostly asking about themes here. When I made a custom local theme, I simply went in and changed CSS/HTML and clicked save. Well, now I host my custom theme on GitHub, but it is beyond annoying for any tiny little change I want to make, I have to make the change, push it to GitHub, then update my theme in Admin panel just to see the tiniest changes I’m making. Is there any easier way?

---

<div class="post-metadata">

### Author: ![bryce](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bryce/32/377822_2.png) [@bryce](https://meta.discourse.org/u/bryce)
#### Post date: [March 26, 2024, 4:06am UTC](https://meta.discourse.org/t/how-to-easily-edit-my-site-remotely/300940/2 "2024-03-26T04:06:18Z")

</div>

Check out the Discourse Theme CLI. It lets you ‘watch’ a directory for changes and automatically apply them.

> [@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 …

---

<div class="post-metadata">

### Author: ![45thj5ej](https://avatars.discourse-cdn.com/v4/letter/4/34f0e0/32.png) [@45thj5ej](https://meta.discourse.org/u/45thj5ej)
#### Post date: [March 26, 2024, 4:45am UTC](https://meta.discourse.org/t/how-to-easily-edit-my-site-remotely/300940/4 "2024-03-26T04:45:08Z")

</div>

Ok, I ran all the commands and my PowerShell is telling me:

```plaintext
» Watching for changes in C:/Users/User/Documents/SiteStuff/discourse-air-theme...
  Please add the following to your Gemfile to avoid polling for changes:
    gem 'wdm', '>= 0.1.0' if Gem.win_platform?

```

So I guess I did it, right? So, my main question now is: Do I _have to_ keep PowerShell open for it to monitor those changes? If so, can I somehow make a Docker container for this to run in on my Windows PC? Also, where even is my gem file so I can add that `gem 'wdm', '>= 0.1.0' if Gem.win_platform?` line to it?

Ok, so I found some Gemspec source files at:  
C:\Users\User.local\share\gem\specs\index.rubygems.org%443\quick\Marshal.4.8  
But when I open them in Notepad or Visual Studio Code, they’re foreign characters (gibberish). Maybe these aren’t the right files?

EDIT: Ok, found some more here:  
`C:\Ruby33-x64\lib\ruby\gems\3.3.0\gems\discourse_theme-2.1.0`  
I do see a Gemfile that says:

```plaintext
# frozen_string_literal: true
source "https://rubygems.org"

git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }

# Specify your gem's dependencies in discourse_theme.gemspec
gemspec

```

Do I put it here somewhere? There’s also a “discourse\_theme.gemspec” file that isn’t gibberish, that has this in it:

```plaintext
# frozen_string_literal: true

lib = File.expand_path("../lib", __FILE__ )
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require "discourse_theme/version"

Gem::Specification.new do |spec|
  spec.name = "discourse_theme"
  spec.version = DiscourseTheme::VERSION
  spec.authors = ["Sam Saffron"]
  spec.email = ["sam.saffron@gmail.com"]

  spec.summary = "CLI helper for creating Discourse themes"
  spec.description = "CLI helper for creating Discourse themes"
  spec.homepage = "https://github.com/discourse/discourse_theme"
  spec.license = "MIT"

  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }

  spec.bindir = "bin"
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
  spec.require_paths = ["lib"]

  spec.required_ruby_version = ">= 3.0.0"

  spec.add_runtime_dependency "minitar", "~> 0.6"
  spec.add_runtime_dependency "listen", "~> 3.1"
  spec.add_runtime_dependency "multipart-post", "~> 2.0"
  spec.add_runtime_dependency "tty-prompt", "~> 0.18"
  spec.add_runtime_dependency "rubyzip", "~> 2.3"
  spec.add_runtime_dependency "selenium-webdriver", "> 4.11"

  spec.add_development_dependency "bundler"
  spec.add_development_dependency "rake"
  spec.add_development_dependency "minitest"
  spec.add_development_dependency "guard"
  spec.add_development_dependency "guard-minitest"
  spec.add_development_dependency "webmock"
  spec.add_development_dependency "rubocop-discourse", "~> 3.6.0"
  spec.add_development_dependency "m"
  spec.add_development_dependency "syntax_tree"
  spec.add_development_dependency "mocha"
end

```

Is it this? I just need to know where to put `gem 'wdm', '>= 0.1.0' if Gem.win_platform?`
