diff --git a/app/controllers/docs/docs_controller.rb b/app/controllers/docs/docs_controller.rb index 38650b0..50aa76e 100644 --- a/app/controllers/docs/docs_controller.rb +++ b/app/controllers/docs/docs_controller.rb @@ -2,7 +2,7 @@ module Docs class DocsController < ApplicationController - requires_plugin "docs" + requires_plugin PLUGIN_NAME skip_before_action :check_xhr, only: [:index] diff --git a/plugin.rb b/plugin.rb index e578df9..64cecb9 100644 --- a/plugin.rb +++ b/plugin.rb @@ -23,6 +23,10 @@ load File.expand_path("lib/docs/query.rb", __dir__) GlobalSetting.add_default :docs_path, "docs" +module ::Docs + PLUGIN_NAME = "discourse-docs" +end + after_initialize do require_dependency "search"