fix: link different document between community and enterprise

This commit is contained in:
zhongwencool 2023-06-08 11:05:21 +08:00
parent 4e9eeb489d
commit 0116c53395
3 changed files with 12 additions and 1 deletions

View File

@ -6,7 +6,7 @@
## are stored in data/configs/cluster.hocon. ## are stored in data/configs/cluster.hocon.
## To avoid confusion, please do not store the same configs in both files. ## 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 ## Configuration full example can be found in emqx.conf.example
node { node {

View File

@ -736,6 +736,7 @@ defmodule EMQXUmbrella.MixProject do
defp template_vars(release, release_type, :bin = _package_type, edition_type) do defp template_vars(release, release_type, :bin = _package_type, edition_type) do
[ [
emqx_default_erlang_cookie: default_cookie(), emqx_default_erlang_cookie: default_cookie(),
emqx_configuration_doc: emqx_configuration_doc(edition_type),
platform_data_dir: "data", platform_data_dir: "data",
platform_etc_dir: "etc", platform_etc_dir: "etc",
platform_plugins_dir: "plugins", platform_plugins_dir: "plugins",
@ -791,6 +792,12 @@ defmodule EMQXUmbrella.MixProject do
end end
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(:enterprise), do: :emqx_enterprise_schema
defp emqx_schema_mod(:community), do: :emqx_conf_schema defp emqx_schema_mod(:community), do: :emqx_conf_schema

View File

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