Currently, we can enable a sitenotice banner via adding a sitenotice entry to application.yml and then restarting Rails. If there's a syntax error (like unbalanced quote marks) then this brings the site down.
It would be much nicer if the sitenotice could be handled completely from the frontend, via the Settings page (/settings), and implemented in a way such that it's never going to bring the site down if there's mistake in the input. It needs to support HTML, as we often include a link in a sitenotice message. It should also be done in a way that uses efficient caching and cache breaking, likely following the pattern we are now using for the stats shown in on the logged-out home page in wiki_education mode via HomeController and updated via Settings.
Currently, we can enable a sitenotice banner via adding a
sitenotice
entry to application.yml and then restarting Rails. If there's a syntax error (like unbalanced quote marks) then this brings the site down.It would be much nicer if the sitenotice could be handled completely from the frontend, via the Settings page (/settings), and implemented in a way such that it's never going to bring the site down if there's mistake in the input. It needs to support HTML, as we often include a link in a sitenotice message. It should also be done in a way that uses efficient caching and cache breaking, likely following the pattern we are now using for the stats shown in on the logged-out home page in wiki_education mode via HomeController and updated via Settings.