mirror of
https://github.com/discourse/discourse.git
synced 2025-02-20 11:48:26 -06:00
This plugin is only useful for developers, however, making it core allows us to centralize any component modification in one commit. This integration also adds a new site_setting: `styleguide_admin_only` which allows to enable a styleguide on a live site while restricting visibility to admins only. By default, styleguide is disabled.
16 lines
383 B
Ruby
16 lines
383 B
Ruby
# frozen_string_literal: true
|
|
|
|
# name: styleguide
|
|
# about: Preview how Widgets are Styled in Discourse
|
|
# version: 0.2
|
|
# author: Robin Ward
|
|
|
|
register_asset "stylesheets/styleguide.scss"
|
|
enabled_site_setting :styleguide_enabled
|
|
|
|
load File.expand_path('../lib/styleguide/engine.rb', __FILE__)
|
|
|
|
Discourse::Application.routes.append do
|
|
mount ::Styleguide::Engine, at: '/styleguide'
|
|
end
|