mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 07:23:40 +08:00
4ad77f3382
Still supported in plugins though.
23 lines
557 B
Ruby
23 lines
557 B
Ruby
# frozen_string_literal: true
|
|
|
|
# name: styleguide
|
|
# about: Preview how Widgets are Styled in Discourse
|
|
# version: 0.2
|
|
# author: Robin Ward
|
|
# transpile_js: true
|
|
|
|
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
|
|
|
|
after_initialize do
|
|
register_asset_filter do |type, request, opts|
|
|
(opts[:path] || '').start_with?("#{Discourse.base_path}/styleguide")
|
|
end
|
|
end
|