discourse/plugins/styleguide/plugin.rb
Martin Brennan 97a812f022
FIX: Hide core plugins from the admin Plugins list (#23328)
Most of the core plugins were already hidden, this hides
chat, styleguide, and checklist to avoid potential confusion
for end users.

Also removes respond_to? :hide_plugin, since that API has been
in place for a while now.
2023-08-31 10:01:01 +10:00

21 lines
543 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
hide_plugin
load File.expand_path("../lib/styleguide/engine.rb", __FILE__)
Discourse::Application.routes.append { mount ::Styleguide::Engine, at: "/styleguide" }
after_initialize do
register_asset_filter do |type, request, opts|
(opts[:path] || "").start_with?("#{Discourse.base_path}/styleguide")
end
end