-
Notifications
You must be signed in to change notification settings - Fork 378
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5ad2c6c
commit b140bb6
Showing
3 changed files
with
103 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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: '_guides/', '' | replace: '_versions/main/guides/', '' %} | ||
{% assign relations = site.data.versioned[docversion_index].index.relations %} | ||
{% assign guide_url = page.url | replace_regex: '^/version/[^/]+(/.*)', '\1' %} | ||
|
||
<section class="full-width-version-bg flexfilterbar guides"> | ||
<div class="guideflexcontainer"> | ||
<div class="docslink"> | ||
<a class="returnlink" href="{{site.baseurl}}/migrations/"> Back to Migration Guides</a> | ||
</div> | ||
</div> | ||
</section> | ||
|
||
<div class="guide"> | ||
<div class="grid-wrapper"> | ||
<div class="grid__item width-8-12 width-12-12-m"> | ||
{% if docversion == 'latest' or docversion == 'main' %} | ||
<a class="editlink" href="https://github.com/quarkusio/quarkusio.github.io/edit/main/_migrations/{{ page_filename }}">{{site.data.guides.texts.edit_this_page}}</a> | ||
{% endif %} | ||
<h1 class="text-caps">{{page.title}} {{page.docversion}}</h1> | ||
{{ content }} | ||
</div> | ||
<div class="grid__item width-4-12 width-12-12-m tocwrapper"> | ||
<div class="hide-mobile toc">{{ page.document | tocify_asciidoc }}</div> | ||
</div> | ||
</div> | ||
{% if relations and relations[guide_url] -%} | ||
<h2>{{site.data.guides.texts.related_content}}</h2> | ||
<div class="grid-wrapper relations"> | ||
{% if relations[guide_url].sameExtensions -%} | ||
<div class="grid__item width-6-12 width-12-12-m"> | ||
<h3>{{site.data.guides.texts.on_the_same_extensions}}</h3> | ||
<ul class="related-content"> | ||
{% 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 %} | ||
<li class="{{ guide.type }}"><a href="{{ related_guide_url }}">{{ guide.title }}</a></li> | ||
{% endfor -%} | ||
</ul> | ||
</div> | ||
{% endif -%} | ||
{% if relations[guide_url].sameTopics -%} | ||
<div class="grid__item width-6-12 width-12-12-m"> | ||
<h3>{{site.data.guides.texts.on_the_same_topics}}</h3> | ||
<ul class="related-content"> | ||
{% 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 %} | ||
<li class="{{ guide.type }}"><a href="{{ related_guide_url }}">{{ guide.title }}</a></li> | ||
{% endfor -%} | ||
</ul> | ||
</div> | ||
{% endif -%} | ||
</div> | ||
{% endif -%} | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
layout: base | ||
--- | ||
|
||
{% assign doclist = site.migrations %} | ||
<ul> | ||
{% for doc in doclist %} | ||
<li><a href="{{ site.baseurl }}{{ doc.url }}">{{ doc.url }}</a></li> | ||
{% endfor %} | ||
</ul> | ||
|