I just submitted a PR: skip display if title matches by pfaffman · Pull Request #1 · megothss/discourse-watermark · GitHub
This adds a theme setting include_if_title_matches
, which is empty by default. If the setting is empty, then nothing is changed.
If the setting has a value, SiteSetting.title
must match in order for the watermark to display.
Use case is to have the watermark display on a staging site, but not production without requiring changes to the database. Setting include_if_title_matches
to “staging” and having “staging” in SiteSetting.title
of the staging site (set in an ENV variable so it persists when the production database is restored to it), the watermark displays on staging site but not on production.
With this change, I’ll install this on every site that has a staging site.