Pārlūkot izejas kodu

Merge pull request #10975 from zhongwencool/conf-docs

fix: link different document between community and enterprise
zhongwencool 2 gadi atpakaļ
vecāks
revīzija
4835c30f8c
3 mainītis faili ar 12 papildinājumiem un 1 dzēšanām
  1. 1 1
      apps/emqx_conf/etc/emqx_conf.conf
  2. 7 0
      mix.exs
  3. 4 0
      rebar.config.erl

+ 1 - 1
apps/emqx_conf/etc/emqx_conf.conf

@@ -6,7 +6,7 @@
 ## are stored in data/configs/cluster.hocon.
 ## To avoid confusion, please do not store the same configs in both files.
 ##
-## See https://docs.emqx.com/en/enterprise/v5.0/configuration/configuration.html
+## See {{ emqx_configuration_doc }} for more details.
 ## Configuration full example can be found in emqx.conf.example
 
 node {

+ 7 - 0
mix.exs

@@ -736,6 +736,7 @@ defmodule EMQXUmbrella.MixProject do
   defp template_vars(release, release_type, :bin = _package_type, edition_type) do
     [
       emqx_default_erlang_cookie: default_cookie(),
+      emqx_configuration_doc: emqx_configuration_doc(edition_type),
       platform_data_dir: "data",
       platform_etc_dir: "etc",
       platform_plugins_dir: "plugins",
@@ -791,6 +792,12 @@ defmodule EMQXUmbrella.MixProject do
     end
   end
 
+  defp emqx_configuration_doc(:enterprise),
+    do: "https://docs.emqx.com/en/enterprise/v5.0/configuration/configuration.html"
+
+  defp emqx_configuration_doc(:community),
+    do: "https://www.emqx.io/docs/en/v5.0/configuration/configuration.html"
+
   defp emqx_schema_mod(:enterprise), do: :emqx_enterprise_schema
   defp emqx_schema_mod(:community), do: :emqx_conf_schema
 

+ 4 - 0
rebar.config.erl

@@ -345,11 +345,15 @@ overlay_vars(cloud, PkgType, Edition) ->
 overlay_vars_edition(ce) ->
     [
         {emqx_schema_mod, emqx_conf_schema},
+        {emqx_configuration_doc,
+            "https://www.emqx.io/docs/en/v5.0/configuration/configuration.html"},
         {is_enterprise, "no"}
     ];
 overlay_vars_edition(ee) ->
     [
         {emqx_schema_mod, emqx_enterprise_schema},
+        {emqx_configuration_doc,
+            "https://docs.emqx.com/en/enterprise/v5.0/configuration/configuration.html"},
         {is_enterprise, "yes"}
     ].