This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/plugins/styleguide/assets/javascripts/discourse/styleguide-route-map.js.es6
Joffrey JAFFEUX 82031aaf16
DEV: makes discourse-styleguide core (styleguide) (#10847)
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.
2020-10-07 14:48:38 +02:00

12 lines
254 B
JavaScript

export default function () {
const { disabled_plugins = [] } = this.site;
if (disabled_plugins.indexOf("styleguide") !== -1) {
return;
}
this.route("styleguide", function () {
this.route("show", { path: ":category/:section" });
});
}