Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions docs/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,15 @@ SCALA_VERSION: "2.12.10"
MESOS_VERSION: 1.0.0
SPARK_ISSUE_TRACKER_URL: https://issues.apache.org/jira/browse/SPARK
SPARK_GITHUB_URL: https://github.com/apache/spark
# Before a new release, we should apply a new `apiKey` for the new Spark documentation

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An alternative way is, we apply a new API key for the previous release instead. For example,
we are going to release 3.1.1 and the current release is 3.1.0. We apply a new API key for https://spark.apache.org/docs/3.1.0 and publish it. After that, we publish 3.1.1 with the default API key which points to the latest doc.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah

# on https://docsearch.algolia.com/. Otherwise, after release, the search results are always based
# on the latest documentation(https://spark.apache.org/docs/latest/) even when visiting the
# documentation of previous releases.
DOCSEARCH_SCRIPT: |
docsearch({
apiKey: 'b18ca3732c502995563043aa17bc6ecb',

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even if we don't set different API keys for different releases, I think it makes sense to avoid hardcoding in the HTML template.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It makes sense.

indexName: 'apache_spark',
inputSelector: '#docsearch-input',
enhancedSearchInput: true,
debug: false // Set debug to true if you want to inspect the dropdown
});
8 changes: 1 addition & 7 deletions docs/_layouts/global.html
Original file line number Diff line number Diff line change
Expand Up @@ -187,13 +187,7 @@ <h1 class="title">{{ page.title }}</h1>
// 2. a JavaScript snippet to be inserted in your website that will bind this Algolia index
// to your search input and display its results in a dropdown UI. If you want to find more
// details on how works DocSearch, check the docs of DocSearch.
docsearch({
apiKey: 'b18ca3732c502995563043aa17bc6ecb',
indexName: 'apache_spark',
inputSelector: '#docsearch-input',
enhancedSearchInput: true,
debug: false // Set debug to true if you want to inspect the dropdown
});
{{site.DOCSEARCH_SCRIPT}}
</script>

Comment thread
gengliangwang marked this conversation as resolved.
<!-- MathJax Section -->
Expand Down