浏览代码

[DOCS] Include docs on permanently unreleased branches only (#51743)

Adds the ability to display docs on permanently unreleased branches,
such as `master` and `7.x`.

Also updates how the autoscaling and EQL docs are included.
Currently, these feature-flag docs would display on any unreleased
branches that contain the changes, such as 7.7.
James Rodewig 5 年之前
父节点
当前提交
c82a050eef
共有 2 个文件被更改,包括 11 次插入1 次删除
  1. 10 0
      docs/Versions.asciidoc
  2. 1 1
      docs/reference/index.asciidoc

+ 10 - 0
docs/Versions.asciidoc

@@ -58,6 +58,16 @@ endif::[]
 :javadoc-license: {rest-high-level-client-javadoc}/org/elasticsearch/protocol/xpack/license
 :javadoc-watcher: {rest-high-level-client-javadoc}/org/elasticsearch/protocol/xpack/watcher
 
+///////
+Permanently unreleased branches (master, n.X)
+///////
+ifeval::["{source_branch}"=="master"]
+:permanently-unreleased-branch:
+endif::[]
+ifeval::["{source_branch}"=="{major-version}"]
+:permanently-unreleased-branch:
+endif::[]
+
 ///////
 Shared attribute values are pulled from elastic/docs
 ///////

+ 1 - 1
docs/reference/index.asciidoc

@@ -40,7 +40,7 @@ include::ingest.asciidoc[]
 
 include::ilm/index.asciidoc[]
 
-ifeval::["{release-state}"=="unreleased"]
+ifdef::permanently-unreleased-branch[]
 
 include::autoscaling/index.asciidoc[]