diff --git a/_config.yml b/_config.yml
index 1242e93e29..9acc7ca3d0 100755
--- a/_config.yml
+++ b/_config.yml
@@ -78,6 +78,9 @@ collections:
versions:
output: true
permalink: /version/:path
+ migrations:
+ output: true
+ permalink: /migration/:path
# Exclude from processing.
# The following items will not be processed, by default. Create a custom list
@@ -122,6 +125,12 @@ defaults:
type: "posts"
values:
permalink: /blog/:title/
+ -
+ scope:
+ type: "migrations"
+ values:
+ layout: migration-guide
+ toc: true
-
scope:
type: redirects
diff --git a/_layouts/migration-guide.html b/_layouts/migration-guide.html
new file mode 100644
index 0000000000..7438449583
--- /dev/null
+++ b/_layouts/migration-guide.html
@@ -0,0 +1,83 @@
+---
+layout: base
+---
+{% assign versioned_page = page.url | startswith: '/version/' %}
+{% if versioned_page %}
+{% assign docversion = page.url | replace_regex: '^/version/([^/]+)/.*', '\1' %}
+{% else %}
+{% assign docversion = 'latest' %}
+{% endif %}
+{% assign docversion_index = docversion | replace: '.', '-' %}
+{% comment %}
+'page.path' pattern is different depending on the version
+- "Main - SNAPSHOT" -> _versions/main/guides/*.adoc
+- "x.x.x - Latest" -> _guides/*.adoc
+=> to extract the page filename you need two different replacement tokens
+{% endcomment %}
+{% assign page_filename = page.path | replace: '_migrations/', '' %}
+{% assign relations = site.data.versioned[docversion_index].index.relations %}
+{% assign guide_url = page.url | replace_regex: '^/version/[^/]+(/.*)', '\1' %}
+
+
+
+
+
+
+
+
{{ page.document | tocify_asciidoc }}
+
+
+ {% if relations and relations[guide_url] -%}
+
{{site.data.guides.texts.related_content}}
+
+ {% if relations[guide_url].sameExtensions -%}
+
+
{{site.data.guides.texts.on_the_same_extensions}}
+
+ {% for guide in relations[guide_url].sameExtensions -%}
+ {% assign is_external_guide = guide.url | startswith: 'http' %}
+ {% if is_external_guide %}
+ {% assign related_guide_url = include.url %}
+ {% elsif docversion == 'latest' %}
+ {% assign related_guide_url = site.baseurl | append: guide.url %}
+ {% else %}
+ {% assign related_guide_url = site.baseurl | append: '/version/' | append: docversion | append: guide.url %}
+ {% endif %}
+ - {{ guide.title }}
+ {% endfor -%}
+
+
+ {% endif -%}
+ {% if relations[guide_url].sameTopics -%}
+
+
{{site.data.guides.texts.on_the_same_topics}}
+
+ {% for guide in relations[guide_url].sameTopics limit:20 -%}
+ {% assign is_external_guide = guide.url | startswith: 'http' %}
+ {% if is_external_guide %}
+ {% assign related_guide_url = include.url %}
+ {% elsif docversion == 'latest' %}
+ {% assign related_guide_url = site.baseurl | append: guide.url %}
+ {% else %}
+ {% assign related_guide_url = site.baseurl | append: '/version/' | append: docversion | append: guide.url %}
+ {% endif %}
+ - {{ guide.title }}
+ {% endfor -%}
+
+
+ {% endif -%}
+
+ {% endif -%}
+
diff --git a/migrations.html b/migrations.html
new file mode 100644
index 0000000000..c54cfb05bc
--- /dev/null
+++ b/migrations.html
@@ -0,0 +1,14 @@
+---
+layout: base
+---
+
+Migration Guides
+
+{% assign doclist = site.migrations %}
+
+ {% for doc in doclist %}
+ {% assign page_filename = doc.path | replace: '_migrations/', '' | replace: 'Migration-Guide-', '' | replace: '.adoc', '' | replace: '.asciidoc', '' %}
+ - {{ page_filename }}
+ {% endfor %}
+
+