Skip to content

Refactor URLs in includes #9867

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 13, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
3 changes: 2 additions & 1 deletion _config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
title: OpenSearch Documentation
description: >- # this means to ignore newlines until "baseurl:"
Documentation for OpenSearch, the Apache 2.0 search, analytics, and visualization suite with advanced security, alerting, SQL support, automated index management, deep performance analysis, and more.
baseurl: "/docs/latest" # the subpath of your site, e.g. /blog
baseurl: "/docs/latest" # The subpath of the current version. This is version-specific. For example, for 2.19, the base URL is /docs/2.19.
latesturl: "/docs/latest" # The subpath of the latest version. Used for non-version-specific documentation, like Data Prepper, etc.
url: "https://docs.opensearch.org" # the base hostname & protocol for your site, e.g. http://example.com
permalink: /:path/

Expand Down
10 changes: 5 additions & 5 deletions _data/migration-assistant/breaking-changes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,18 @@ breaking_changes:
introducedIn: "OpenSearch 1.3"
comp: []
- title: "OpenSearch 2.0: Remove mapping types parameter"
url: "/docs/latest/breaking-changes/#remove-mapping-types-parameter"
url: "https://docs.opensearch.org/docs/latest/breaking-changes/#remove-mapping-types-parameter"
introducedIn: "OpenSearch 2.19"
comp: []
transformation:
title: "Type Mapping Deprecation"
url: "/docs/latest/migration-assistant/migration-phases/planning-your-migration/handling-type-mapping-deprecation/"
url: "https://docs.opensearch.org/docs/latest/migration-assistant/migration-phases/planning-your-migration/handling-type-mapping-deprecation/"
- title: "OpenSearch Notifications Plugins"
url: "/breaking-changes/#add-opensearch-notifications-plugins"
url: "https://docs.opensearch.org/docs/latest/breaking-changes/#add-opensearch-notifications-plugins"
introducedIn: "OpenSearch 2.19"
comp: []
- title: "OpenSearch 2.0: Client JDK 8 Support Dropped"
url: "/docs/latest/breaking-changes/#drop-support-for-jdk-8"
url: "https://docs.opensearch.org/docs/latest/breaking-changes/#drop-support-for-jdk-8"
introducedIn: "OpenSearch 2.19"
comp: []
- title: "Removal of Types in Elasticsearch 7.x"
Expand All @@ -42,7 +42,7 @@ breaking_changes:
comp: []
transformation:
title: "Type Mapping Deprecation"
url: "/docs/latest/migration-assistant/migration-phases/planning-your-migration/handling-type-mapping-deprecation/"
url: "https://docs.opensearch.org/docs/latest/migration-assistant/migration-phases/planning-your-migration/handling-type-mapping-deprecation/"
- title: "Elasticsearch 6.0 - 6.6 Breaking Changes"
url: "https://www.elastic.co/guide/en/elasticsearch/reference/6.8/breaking-changes.html"
introducedIn: "Elasticsearch 6.8"
Expand Down
94 changes: 35 additions & 59 deletions _data/top_nav.yml
Original file line number Diff line number Diff line change
@@ -1,82 +1,58 @@
items:
- label: OpenSearchCon
children:
- label: 2024 Europe
url: /events/opensearchcon/2024/europe/index.html
- label: 2024 North America
url: /events/opensearchcon/2024/north-america/index.html
# children:
# - label: Speakers
# url: /events/opensearchcon/2024/north-america/speakers/index.html
# - label: Sessions
# url: /events/opensearchcon/2024/north-america/sessions/index.html
# - label: Exhibitors
# url: /events/opensearchcon/2024/north-america/exhibitors/index.html
# - label: Workshops
# url: /events/opensearchcon/2024/north-america/workshops/index.html
# - label: Unconference
# url: /events/opensearchcon/2024/north-america/unconference/index.html
- label: 2024 India
url: /events/opensearchcon/2024/india/index.html
- label: Archive
children:
- label: 2023 North America
url: /events/opensearchcon/2023/north-america/index.html
- label: 2022 North America
url: /events/opensearchcon/2022/north-america/index.html
- label: Download
url: /downloads.html
- label: About
url: /about.html
url: https://opensearch.org/about.html
children:
- label: Releases
url: /releases.html
url: https://opensearch.org/releases.html
- label: Roadmap
url: https://github.com/orgs/opensearch-project/projects/1
- label: FAQ
url: /faq/
url: https://opensearch.org/faq/
- label: Platform
url: https://opensearch.org/platform/index.html
children:
- label: Search
url: https://opensearch.org/platform/search/index.html
- label: Observability
url: https://opensearch.org/platform/observability/index.html
- label: Security Analytics
url: https://opensearch.org/platform/security-analytics/index.html
- label: Vector Database
url: https://opensearch.org/platform/search/vector-database.html
- label: Playground Demo
url: https://playground.opensearch.org/
- label: Performance Benchmarks
url: https://opensearch.org/benchmarks/
- label: Community
url: https://opensearch.org/community/
children:
- label: Blog
url: /blog/
- label: Forum
url: https://forum.opensearch.org/
- label: Slack
url: /slack.html
url: https://opensearch.org/slack.html
- label: Events
url: /events
url: https://opensearch.org/events/
class_name: events-page-menu-link__device-based
- label: Partners
url: /partners/
- label: Solutions Providers
url: https://opensearch.org/solutions-providers/
- label: Projects
url: /community_projects/
url: https://opensearch.org/community_projects/
- label: Members
url: /community/members/index.html
url: https://opensearch.org/authors-list/
- label: Documentation
url: /docs/latest/
url: https://docs.opensearch.org/docs/latest/
children:
- label: OpenSearch and Dashboards
url: /docs/latest/about/
url: https://docs.opensearch.org/docs/latest/about/
- label: Data Prepper
url: /docs/latest/data-prepper/
url: https://docs.opensearch.org/docs/latest/data-prepper/
- label: Clients
url: /docs/latest/clients/
url: https://docs.opensearch.org/docs/latest/clients/
- label: Benchmark
url: /docs/latest/benchmark/
url: https://docs.opensearch.org/docs/latest/benchmark/
- label: Migration Assistant
url: /docs/latest/migration-assistant/
- label: Platform
url: /platform/index.html
children:
- label: Search
url: /platform/search/index.html
- label: Observability
url: /platform/observability/index.html
- label: Security Analytics
url: /platform/security-analytics/index.html
- label: Vector Database
url: /platform/search/vector-database.html
- label: Playground Demo
url: https://playground.opensearch.org/
- label: Performance Benchmarks
url: /benchmarks/
url: https://docs.opensearch.org/docs/latest/migration-assistant/
- label: Blog
url: https://opensearch.org/blog/
- label: Download
url: https://opensearch.org/downloads.html
2 changes: 1 addition & 1 deletion _includes/head_custom.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
{% if jekyll.environment == "development" %}
<script src="{{ '/assets/js/version-selector.js' | relative_url }}"></script>
{% else %}
<script src="{{ '/docs/latest/assets/js/version-selector.js' }}"></script>
<script src="{{site.baseurl}}/assets/js/version-selector.js"></script>
Copy link
Member

Choose a reason for hiding this comment

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

Seems like we are replacing hardcode /docs/latest in version selector with {{site.baseurl}}. But this doesn't change the path or routing from before.
Are we plan to update the baseurl in the future so eventually the URL pattern would be docs.opensearch.org/latest/...

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, we're just extracting the path into a variable so when we change the url, we can change only the variable in the _config.yml file (and whatever links are hardcoded in the yaml files).

{% endif %}

<!-- Last-Modified: {% last_modified_at %} -->
8 changes: 4 additions & 4 deletions _includes/home_cards.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,29 +39,29 @@
<div class="home-card-container">

<div class="home-card">
<a href="{{site.url}}/docs/latest/data-prepper/" class='card-link'></a>
<a href="{{site.url}}{{site.latesturl}}/data-prepper/" class='card-link'></a>
<p class="heading">Data Prepper</p>
<p class="description">Filter, mutate, and sample your data for ingestion into OpenSearch.</p>
<p class="last-link" >Documentation &#x2192;</p>
</div>

<div class="home-card">
<a href="{{site.url}}/docs/latest/clients/" class='card-link'></a>
<a href="{{site.url}}{{site.latesturl}}/clients/" class='card-link'></a>
<p class="heading">Clients</p>
<p class="description">Interact with OpenSearch from your application using language APIs.</p>
<p class="last-link">Documentation &#x2192;</p>
</div>


<div class="home-card">
<a href="{{site.url}}/docs/latest/benchmark/" class='card-link'></a>
<a href="{{site.url}}{{site.latesturl}}/benchmark/" class='card-link'></a>
<p class="heading">OpenSearch Benchmark</p>
<p class="description">Measure OpenSearch cluster performance metrics.</p>
<p class="last-link">Documentation &#x2192;</p>
</div>

<div class="home-card">
<a href="{{site.url}}/docs/latest/migration-assistant/" class='card-link'></a>
<a href="{{site.url}}{{site.latesturl}}/migration-assistant/" class='card-link'></a>
<p class="heading">Migration Assistant</p>
<p class="description">Migrate to OpenSearch.</p>
<p class="last-link">Documentation &#x2192;</p>
Expand Down
176 changes: 0 additions & 176 deletions _includes/redesign_buttons.html

This file was deleted.

Loading
Loading