diff --git a/_config.yml b/_config.yml index b33172dd..19ce7802 100644 --- a/_config.yml +++ b/_config.yml @@ -1,18 +1,3 @@ -# Welcome to Jekyll! -# -# This config file is meant for settings that affect your whole blog, values -# which you are expected to set up once and rarely edit after that. If you find -# yourself editing this file very often, consider using Jekyll's data files -# feature for the data you need to update frequently. -# -# For technical reasons, this file is *NOT* reloaded automatically when you use -# 'bundle exec jekyll serve'. If you change this file, please restart the server process. - -# Site settings -# These are used to personalize your new site. If you look in the HTML files, -# you will see them accessed via {{ site.title }}, {{ site.email }}, and so on. -# You can create any custom variable you would like, and they will be accessible -# in the templates via {{ site.myvariable }}. 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. @@ -39,6 +24,43 @@ aux_links: - "https://opensearch.org" color_scheme: opensearch +# Define Jekyll collections +collections: + # Define a collection named "tests", its documents reside in the "_tests" directory + opensearch_docs: + permalink: "/:collection/:path/" + output: true + opensearch_dashboards_docs: + permalink: "/:collection/:path/" + output: true + opensearch_plugins_docs: + permalink: "/:collection/:path/" + output: true + external_links: + permalink: "/:collection/:path/" + output: true + +just_the_docs: + # Define the collections used in the theme + collections: + opensearch_docs: + name: OpenSearch + # nav_exclude: true + # nav_fold: true + # search_exclude: true + opensearch_dashboards_docs: + name: OpenSearch Dashboards + #nav_fold: true + opensearch_plugins_docs: + name: Plugins + #nav_fold: true + opensearch_troubleshooting_docs: + name: Troubleshooting + #nav_fold: true + external_links: + name: External links + + # Enable or disable the site search # Supports true (default) or false search_enabled: true diff --git a/_external_links/javadoc.md b/_external_links/javadoc.md new file mode 100644 index 00000000..6bcc81cc --- /dev/null +++ b/_external_links/javadoc.md @@ -0,0 +1,7 @@ +--- +layout: default +title: Javadoc +nav_order: 1 +permalink: /javadoc/ +redirect_to: https://opensearch.org/docs/javadocs/ +--- diff --git a/_includes/nav.html b/_includes/nav.html index 9fc8b022..4330a15b 100644 --- a/_includes/nav.html +++ b/_includes/nav.html @@ -60,7 +60,7 @@ {%- for node in pages_list -%} {%- if node.parent == nil -%} {%- unless node.nav_exclude -%} - {%- endunless -%} {%- endfor -%} - {%- endif -%} {%- endunless -%} {%- endif -%} {%- endfor -%} - + +{%- if page.collection == include.key -%} + + {%- for node in pages_list -%} + {%- if node.parent == nil -%} + {%- if page.parent == node.title or page.grand_parent == node.title -%} + {%- assign first_level_url = node.url | absolute_url -%} + {%- endif -%} + {%- if node.has_children -%} + {%- assign children_list = pages_list | where: "parent", node.title -%} + {%- for child in children_list -%} + {%- if child.has_children -%} + {%- if page.url == child.url or page.parent == child.title and page.grand_parent == child.parent -%} + {%- assign second_level_url = child.url | absolute_url -%} + {%- endif -%} + {%- endif -%} + {%- endfor -%} + {%- endif -%} + {%- endif -%} + {%- endfor -%} + + {% if page.has_children == true and page.has_toc != false %} + {%- assign toc_list = pages_list | where: "parent", page.title | where: "grand_parent", page.parent -%} + {%- endif -%} + +{%- endif -%} diff --git a/_layouts/default.html b/_layouts/default.html index 14d95c9a..fe35f3f5 100755 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -38,13 +38,6 @@ layout: table_wrappers - - External - - - - -