Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

Ref Guide - Add the Solr Operator (#4521)

Houston Putman692e37e49e38
diff --git a/solr/solr-ref-guide/antora.template.yml b/solr/solr-ref-guide/antora.template.yml
index 3f1e8ef816d..38739f713b5 100644
--- a/solr/solr-ref-guide/antora.template.yml
+++ b/solr/solr-ref-guide/antora.template.yml
@@ -23,7 +23,7 @@ version: '${solr_version_major}_${solr_version_minor}'
display_version: '${displayVersion}'
# Marking a version as 'prerelease: false' is only needed for published branches (minor version branches, branch_x_y, that have had a release)
prerelease: ${prerelease}
-title: Solr Reference Guide
+title: Apache Solr
nav:
- modules/getting-started/getting-started-nav.adoc
- modules/deployment-guide/deployment-nav.adoc
diff --git a/solr/solr-ref-guide/antora.yml b/solr/solr-ref-guide/antora.yml
index 50cce466b40..d7c6e26f549 100644
--- a/solr/solr-ref-guide/antora.yml
+++ b/solr/solr-ref-guide/antora.yml
@@ -23,7 +23,7 @@ version: '11_0'
display_version: '11.0-alpha'
# Marking a version as 'prerelease: false' is only needed for published branches (minor version branches, branch_x_y, that have had a release)
prerelease: -alpha
-title: Solr Reference Guide
+title: Apache Solr
nav:
- modules/getting-started/getting-started-nav.adoc
- modules/deployment-guide/deployment-nav.adoc
diff --git a/solr/solr-ref-guide/build.gradle b/solr/solr-ref-guide/build.gradle
index 5b53514d698..836a3addf14 100644
--- a/solr/solr-ref-guide/build.gradle
+++ b/solr/solr-ref-guide/build.gradle
@@ -15,6 +15,7 @@
* limitations under the License.
*/
+import groovy.json.JsonOutput
import org.apache.tools.ant.util.TeeOutputStream
apply plugin: 'java'
@@ -163,6 +164,13 @@ task buildLocalAntoraPlaybookYaml(type: Copy) {
'source_branches': "HEAD",
'start_path': project.rootDir.relativePath(file(project.ext.siteStagingDir)),
'site_dir': "./" + file(project.ext.siteStagingDir).relativePath(file(project.ext.siteDir)),
+ // The Solr Operator is only aggregated into the official multi-version
+ // site. Local builds render just the ref guide; operator contributors
+ // preview their component from the apache/solr-operator repo (make docs).
+ 'additional_sources': """
+ - url: "https://github.com/apache/solr-operator.git"
+ branches: \"release-*\"
+ start_path: docs""",
]
expand(escapeYamlSingleQuotesString(props))
@@ -181,12 +189,23 @@ task buildOfficialAntoraPlaybookYaml(type: Copy) {
into project.ext.playbooksDir
def branches = ["branch_*"]
+ def operatorBranches = ["release-*"]
if (officialSiteIncludePrerelease) {
branches.add("main")
+ operatorBranches.add("main")
} else {
branches.add("\"!branch_*x\"")
}
+ // Aggregate the Solr Operator docs as an additional component, sourced from
+ // its release-* branches (apache/solr-operator). Each such branch carries its
+ // own docs/antora.yml (component 'operator'). edit_url is overridden per
+ // source so "Edit this page" points at the operator repo rather than apache/solr.
+ def operatorSources = """
+ - url: "https://github.com/apache/solr-operator.git"
+ branches: ${JsonOutput.toJson(operatorBranches)}
+ start_path: docs"""
+
def props = [
'site_url': "https://solr.apache.org/guide",
'redirect_facility': "httpd",
@@ -194,6 +213,7 @@ task buildOfficialAntoraPlaybookYaml(type: Copy) {
'source_branches': branches,
'start_path': 'solr/solr-ref-guide',
'site_dir': "./" + file(project.ext.playbooksDir).relativePath(file(project.ext.siteDir)),
+ 'additional_sources': operatorSources,
]
expand(escapeYamlSingleQuotesString(props))
diff --git a/solr/solr-ref-guide/playbook.template.yml b/solr/solr-ref-guide/playbook.template.yml
index ad283d03392..22143899a0c 100644
--- a/solr/solr-ref-guide/playbook.template.yml
+++ b/solr/solr-ref-guide/playbook.template.yml
@@ -33,7 +33,7 @@ content:
- url: '${source_url}'
branches: ${source_branches}
start_path: '${start_path}'
-
+${additional_sources}
ui:
bundle:
url: 'https://nightlies.apache.org/solr/solr-reference-guide-ui-bundle/ui-bundle.zip'
diff --git a/solr/solr-ref-guide/ui-src/css/vars.css b/solr/solr-ref-guide/ui-src/css/vars.css
index ec17ab47bc7..c88bd97ff01 100644
--- a/solr/solr-ref-guide/ui-src/css/vars.css
+++ b/solr/solr-ref-guide/ui-src/css/vars.css
@@ -145,7 +145,9 @@
--nav-height--desktop: var(--body-min-height);
--nav-panel-menu-height: calc(100% - var(--drawer-height));
--nav-panel-explore-height: calc(50% + var(--drawer-height));
- --nav-width: calc(270 / var(--rem-base) * 1rem);
+ /* Solr Changes - Start */
+ --nav-width: calc(300 / var(--rem-base) * 1rem);
+ /* Solr Changes - End */
--toc-top: calc(var(--body-top) + var(--toolbar-height));
--toc-height: calc(100vh - var(--toc-top) - 2.5rem);
--toc-width: calc(162 / var(--rem-base) * 1rem);
diff --git a/solr/solr-ref-guide/ui-src/partials/nav-explore.hbs b/solr/solr-ref-guide/ui-src/partials/nav-explore.hbs
index 4cdd8f3fee7..9d7c4c4167e 100644
--- a/solr/solr-ref-guide/ui-src/partials/nav-explore.hbs
+++ b/solr/solr-ref-guide/ui-src/partials/nav-explore.hbs
@@ -26,68 +26,14 @@
<!-- Solr Additions - Start -->
<!-- A hard-coded list of older Ref Guides, pre-Antora -->
<ul class="components">
- <li class="component"> <a class="title" href="https://solr.apache.org/guide">Pre-9.0 Reference Guides</a>
+ <li class="component"> <a class="title" href="https://solr.apache.org/guide">Archived Solr Reference Guides</a>
<ul class="versions">
<li class="version">
<a href="https://solr.apache.org/guide/8_11">8.11</a>
</li>
- <li class="version">
- <a href="https://solr.apache.org/guide/8_10">8.10</a>
- </li>
- <li class="version">
- <a href="https://solr.apache.org/guide/8_9">8.9</a>
- </li>
- <li class="version">
- <a href="https://solr.apache.org/guide/8_8">8.8</a>
- </li>
- <li class="version">
- <a href="https://solr.apache.org/guide/8_7">8.7</a>
- </li>
- <li class="version">
- <a href="https://solr.apache.org/guide/8_6">8.6</a>
- </li>
- <li class="version">
- <a href="https://solr.apache.org/guide/8_5">8.5</a>
- </li>
- <li class="version">
- <a href="https://solr.apache.org/guide/8_4">8.4</a>
- </li>
- <li class="version">
- <a href="https://solr.apache.org/guide/8_3">8.3</a>
- </li>
- <li class="version">
- <a href="https://solr.apache.org/guide/8_2">8.2</a>
- </li>
- <li class="version">
- <a href="https://solr.apache.org/guide/8_1">8.1</a>
- </li>
- <li class="version">
- <a href="https://solr.apache.org/guide/8_0">8.0</a>
- </li>
<li class="version">
<a href="https://solr.apache.org/guide/7_7">7.7</a>
</li>
- <li class="version">
- <a href="https://solr.apache.org/guide/7_6">7.6</a>
- </li>
- <li class="version">
- <a href="https://solr.apache.org/guide/7_5">7.5</a>
- </li>
- <li class="version">
- <a href="https://solr.apache.org/guide/7_4">7.4</a>
- </li>
- <li class="version">
- <a href="https://solr.apache.org/guide/7_3">7.3</a>
- </li>
- <li class="version">
- <a href="https://solr.apache.org/guide/7_2">7.2</a>
- </li>
- <li class="version">
- <a href="https://solr.apache.org/guide/7_1">7.1</a>
- </li>
- <li class="version">
- <a href="https://solr.apache.org/guide/7_0">7.0</a>
- </li>
<li class="version">
<a href="https://solr.apache.org/guide/6_6">6.6</a>
</li>