Skip to content

Commit

Permalink
Merge pull request #1991 from ynojima/extract-texts-from-templates
Browse files Browse the repository at this point in the history
Extract texts from templates
  • Loading branch information
gsmet authored Jun 4, 2024
2 parents 8138887 + 8c14ab5 commit bd26d27
Show file tree
Hide file tree
Showing 8 changed files with 49 additions and 23 deletions.
6 changes: 6 additions & 0 deletions _data/guides.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
texts:
by_version: "By Version"
edit_this_page: "Edit this Page"
related_content: "Related content"
on_the_same_extensions: "On the same extensions"
on_the_same_topics: "On the same topics"
15 changes: 15 additions & 0 deletions _data/index-docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
texts:
by_version: "By Version"
by_category: "By Category"
tutorials: "Tutorials"
short_and_focused_exercises_to_get_you_going_quickly: "Short and focused exercises to get you going quickly."
how_to_guides: "How-to Guides"
step_by_step_guides_to_covering_key_tasks_real_world_operations_and_common_problems: "Step-by-step guides to covering key tasks, real world operations and common problems."
download_link: "Download full cheatsheet as PDF."
filter_by_keyword: "Filter by keyword"
concepts: "Concepts"
explanations_of_some_of_the_larger_concepts_and_technologies_involved_with_quarkus: "Explanations of some of the larger concepts and technologies involved with Quarkus."
references: "References"
technical_resource_that_covers_tools_components_and_commands_the_encyclopedia_for_quarkus: "Technical Resource that covers tools, components, and commands. The encyclopedia for Quarkus."
general_guides: "General Guides"
other_quarkus_guides: "Other Quarkus Guides"
2 changes: 2 additions & 0 deletions _data/publication-entries.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
texts:
if_you_know_of_a_cool_article_blog_or_video_that_we_are_missing_please_submit_an_issue: "If you know of a cool article, blog or video that we are missing, please <a href=\"https://github.com/quarkusio/quarkusio.github.io\" target=\"blank\"> submit an issue</a>."
3 changes: 3 additions & 0 deletions _data/recent-posts-band.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
texts:
recent_blog_posts: "Recent Blog Posts"
read_full_article: "Read full article"
30 changes: 15 additions & 15 deletions _includes/index-docs.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<section class="full-width-version-bg flexfilterbar">
<div class="flexcontainer">
<div class="flexlabel">
<label>By Version</label>
<label>{{site.data.index-docs.texts.by_version}}</label>
</div>
<div class="pulldown version">
<select id="guidesindex-version-dropdown">
Expand All @@ -27,18 +27,18 @@
</select>
</div>
<div class="flexlabel">
<label>By Category</label>
<label>{{site.data.index-docs.texts.by_category}}</label>
</div>
<div class="pulldown category">
<select name="categories">
<option value="">All categories</option>
<option value="">{{site.data.index-docs.texts.all_categories}}</option>
{% for item in categories %}
<option value="{{ item.cat-id }}">{{ item.category }}</option>
{% endfor %}
</select>
</div>
<div class="search">
<input name="q" type="search" placeholder="Filter by keyword" autocomplete="off"/>
<input name="q" type="search" placeholder="{{site.data.index-docs.texts.filter_by_keyword}}" autocomplete="off"/>
</div>
</div>
</section>
Expand All @@ -57,8 +57,8 @@ <h1 class="title">{{ page.title }}</h1>
{% if values %}
<div class="grid__item width-12-12 docslist">
<div class="doclist-header">
<h3 id="tutorial">Tutorials</h3>
<p>Short and focused exercises to get you going quickly.</p>
<h3 id="tutorial">{{site.data.index-docs.texts.tutorials}}</h3>
<p>{{site.data.index-docs.texts.short_and_focused_exercises_to_get_you_going_quickly}}</p>
</div>
<div class="grid-wrapper">
{% for guide in values %}
Expand All @@ -73,8 +73,8 @@ <h3 id="tutorial">Tutorials</h3>
{% if values %}
<div class="grid__item width-12-12 docslist">
<div class="doclist-header">
<h3 id="guide">How-to Guides</h3>
<p>Step-by-step guides to covering key tasks, real world operations and common problems.</p>
<h3 id="guide">{{site.data.index-docs.texts.how_to_guides}}</h3>
<p>{{site.data.index-docs.texts.step_by_step_guides_to_covering_key_tasks_real_world_operations_and_common_problems}}</p>
</div>
<div class="grid-wrapper">
{% for guide in values %}
Expand All @@ -89,8 +89,8 @@ <h3 id="guide">How-to Guides</h3>
{% if values %}
<div class="grid__item width-12-12 docslist">
<div class="doclist-header">
<h3 id="concept">Concepts</h3>
<p>Explanations of some of the larger concepts and technologies involved with Quarkus.</p>
<h3 id="concept">{{site.data.index-docs.texts.concepts}}</h3>
<p>{{site.data.index-docs.texts.explanations_of_some_of_the_larger_concepts_and_technologies_involved_with_quarkus}}</p>
</div>
<div class="grid-wrapper">
{% for guide in values %}
Expand All @@ -105,13 +105,13 @@ <h3 id="concept">Concepts</h3>
{% if values %}
<div class="grid__item width-12-12 docslist">
<div class="doclist-header">
<h3 id="reference">References</h3>
<p>Technical Resource that covers tools, components, and commands. The encyclopedia for Quarkus.</p>
<h3 id="reference">{{site.data.index-docs.texts.references}}</h3>
<p>{{site.data.index-docs.texts.technical_resource_that_covers_tools_components_and_commands_the_encyclopedia_for_quarkus}}</p>
</div>
<div class="grid-wrapper">
{% include index-doc-item.html type="pdf" docversion=docversion
title="Quarkus Cheat
Sheet" url="https://lordofthejars.github.io/quarkus-cheat-sheet/" summary="Download full cheatsheet as PDF." %}
Sheet" url="https://lordofthejars.github.io/quarkus-cheat-sheet/" summary=site.data.index-docs.texts.download_link %}
{% for guide in values %}
{% include index-doc-item.html type="reference" docversion=docversion
title=guide.title url=guide.url summary=guide.summary
Expand All @@ -124,8 +124,8 @@ <h3 id="reference">References</h3>
{% if values %}
<div class="grid__item width-12-12 docslist">
<div class="doclist-header">
<h3>General Guides</h3>
<p>Other Quarkus Guides</p>
<h3>{{site.data.index-docs.texts.general_guides}}</h3>
<p>{{site.data.index-docs.texts.other_quarkus_guides}}</p>
</div>
<div class="grid-wrapper">
{% for guide in values %}
Expand Down
2 changes: 1 addition & 1 deletion _includes/publication-entries.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<div class="full-width-bg component-slim">
<div class="grid-wrapper click-cards">
<div class="width-12-12 width-12-12-m">
<p>If you know of a cool article, blog or video that we are missing, please <a href="https://github.com/quarkusio/quarkusio.github.io" target="blank"> submit an issue</a>.</p>
<p>{{site.data.publication-entries.texts.if_you_know_of_a_cool_article_blog_or_video_that_we_are_missing_please_submit_an_issue}}</p>
<h2 class="mt-0">{{site.publication.type_names[group.name]}}</h2>
</div>

Expand Down
4 changes: 2 additions & 2 deletions _includes/recent-posts-band.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="component recent-posts-band full-width-bg dark-bg alt-background">
<div class="grid-wrapper">
<div class="width-12-12">
<h2 class="text-centered">Recent Blog Posts</h2>
<h2 class="text-centered">{{site.data.recent-posts-band.texts.recent_blog_posts}}</h2>
</div>
{% for post in site.posts %}
{% if forloop.index <= 3 %}
Expand All @@ -20,7 +20,7 @@ <h6 class="margin-tb-0"><a href="{{site.baseurl}}{{ post.url }}">{{ post.title }
<p>{{ post.content | strip_html | truncate: 280 }}</p>
{% endif %}
<div class="text-centered">
<a href="{{site.baseurl}}{{ post.url }}" class="button-cta-white">Read full article</a>
<a href="{{site.baseurl}}{{ post.url }}" class="button-cta-white">{{site.data.recent-posts-band.texts.read_full_article}}</a>
</div>
</div>
{% endif %}
Expand Down
10 changes: 5 additions & 5 deletions _layouts/guides.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<a class="returnlink" href="{{site.baseurl}}/{% if versioned_page %}version/{{docversion}}/guides/{% else %}guides/{% endif %}"> Back to Guides</a>
</div>
<div class="flexlabel">
<label>By Version</label>
<label>{{site.data.guides.texts.by_version}}</label>
</div>
<div class="guidepulldown version">
<select id="guide-version-dropdown">
Expand Down Expand Up @@ -53,7 +53,7 @@
<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/quarkus/edit/main/docs/src/main/asciidoc/{{ page_filename }}">Edit this Page</a>
<a class="editlink" href="https://github.com/quarkusio/quarkus/edit/main/docs/src/main/asciidoc/{{ page_filename }}">{{site.data.guides.texts.edit_this_page}}</a>
{% endif %}
<h1 class="text-caps">{{page.title}} {{page.docversion}}</h1>
{{ content }}
Expand All @@ -63,11 +63,11 @@ <h1 class="text-caps">{{page.title}} {{page.docversion}}</h1>
</div>
</div>
{% if relations and relations[guide_url] -%}
<h2>Related content</h2>
<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>On the same extensions</h3>
<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' %}
Expand All @@ -85,7 +85,7 @@ <h3>On the same extensions</h3>
{% endif -%}
{% if relations[guide_url].sameTopics -%}
<div class="grid__item width-6-12 width-12-12-m">
<h3>On the same topics</h3>
<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' %}
Expand Down

0 comments on commit bd26d27

Please sign in to comment.