<commit_before>{% extends "edition-2/base.html" %}

{% import "edition-2/macros.html" as macros %}
{% import "snippets.html" as snippets %}

{% block title %}{{ page.title }} | {{ config.title }}{% endblock title %}

{% block header %}
    {% if lang != "en" -%}
    <aside id="all-posts-link"><a href="{{ config.base_url | safe }}/{{ lang }}" title="All Posts">{{ trans(key="all_posts", lang=lang) }}</a></aside>
    {%- else -%}
    <aside id="all-posts-link"><a href="{{ config.base_url | safe }}" title="All Posts">{{ trans(key="all_posts", lang=lang) }}</a></aside>
    {%- endif %}
{% endblock header %}

{% block description -%}
{{ page.summary | safe | striptags | truncate(length=150) }}
{%- endblock description %}

{% block toc_aside %}
<aside id="toc-aside" class="{% if page.extra.rtl %}right-to-left{% endif %}">
        <h2>{{ trans(key="toc", lang=lang) }}</h2>
    <ol>
        {% for h2 in page.toc %}<li>
            <a href="#{{h2.id | safe}}">{{ h2.title | safe }}</a>
            {% if h2.children %}<ol>
                {% for h3 in h2.children %}<li>
                    <a href="#{{h3.id | safe}}">{{ h3.title | safe }}</a>
                </li>{% endfor %}
            </ol>{% endif %}
        </li>{% endfor %}
        <li class="toc-comments-link"><a href="#comments">{{ trans(key="comments", lang=lang) }}</a></li>
    </ol>
</aside>
{% endblock toc_aside %}

{% block main %}
    <div class="{% if page.extra.rtl %}right-to-left{% endif %}">
    <h1>{{ page.title }}</h1>
    <time datetime="{{ page.date | date(format="%Y-%m-%d") }}" class="post-date">
        {{ page.date | date(format="%b %d, %Y") }}
        {% if page.extra.updated %} (updated on {{ page.extra.updated | date(format="%b %d, %Y") }}) {% endif %}
    </time>
    </div>

    {% if page.extra.warning %}
        <div class="warning">
            {% if page.extra.warning_short %} <b>{{ page.extra.warning_short }}</b> {% endif %}
            {{ page.extra.warning | markdown(inline=true) | safe }}
        </div>
    {% endif %}


    {%- if page.lang != "en" %}
        <div class="warning{% if page.extra.rtl %} right-to-left{% endif %}">
            {% set translations = page.translations | filter(attribute="lang", value="en") %}
            {% set original = translations.0 %}
            <p>
            <b>{{ trans(key="translated_content", lang=lang) }}</b>
            {{ trans(key="translated_content_notice", lang=lang) |
                replace(from="_original.permalink_", to=original.permalink) |
                replace(from="_original.title_", to=original.title) | safe }}
            </p>
            {%- if page.extra.translators %}
            <p>
                {{ trans(key="translated_by", lang=lang) }} {% for user in page.extra.translators -%}
                    {%- if not loop.first -%}
                        {%- if loop.last %} {{ trans(key="word_separator", lang=lang) }} {% else %}, {% endif -%}
                    {%- endif -%}
                    <a href="https://github.com/{{user}}">@{{user}}</a>
                {%- endfor %}.
            </p>
            {% endif -%}
        </div>
    {% endif %}

    <div class="{% if page.extra.rtl %}right-to-left{% endif %}">
    {{ page.content | replace(from="<!-- toc -->", to=macros::toc(toc=page.toc))  | safe }}
    </div>

    <div class="post-footer-support{% if page.extra.rtl %} right-to-left{% endif %}">
        <h2>Support Me</h2>
        {{ snippets::support() }}
    </div>

    <hr>
    <div class="PageNavigation">
        {% if page.lighter %}
            <a class="prev" href="{{ page.lighter.path | safe }}">&laquo; {{ page.lighter.title }}</a>
        {% endif %}
        {% if page.heavier %}
            <a class="next" href="{{ page.heavier.path | safe }}">{{ page.heavier.title }} &raquo;</a>
        {% endif %}
    </div>

    <hr>
    <section>
        <h2 id="comments" class="{% if page.extra.rtl %}right-to-left{% endif %}">{{ trans(key="comments", lang=lang) }}</h2>

        {%- if page.lang != "en" %}
        <p class="{% if page.extra.rtl %}right-to-left{% endif %}">
            {{ trans(key="comments_notice", lang=lang) }}
        </p>
        {% endif %}

        {% if page.extra.comments_search_term %}
            {% set search_term=page.extra.comments_search_term %}
        {% elif page.lang != "en" %}
            {% set search_term=page.title ~ " (" ~ page.lang ~ ")" %}
        {% else %}
            {% set search_term=page.title %}
        {% endif %}
        {{ snippets::giscus(search_term=search_term) }}
    </section>

    <aside class="page-aside-right">
        {% if page.translations -%}
        <div class="block" id="language-selector">
            <h2>Other Languages</h2>
            <ul>{%- for translation in page.translations | sort(attribute="lang") %}
                <li data-lang-switch-to="{{ translation.lang }}" class=""><a href="{{ translation.permalink | safe }}">
                    {%- if translation.lang == "en" -%}
                        English (original)
                    {%- else -%}
                        {{ trans(key="lang_name", lang = translation.lang) }}
                    {%- endif -%}
                </a></li>
            {% endfor %}</ul>
        </div>
        {%- endif %}

        <div class="block{% if page.extra.rtl %} left-to-right{% endif %}">
            <h2>About Me</h2>
            <p>
                I'm a Rust freelancer with a master's degree in computer science. I love systems programming, open source software, and new challenges.
            </p><p>
                If you want to work with me, reach out on <a href="https://www.linkedin.com/in/phil-opp/">LinkedIn</a> or write me at <a href="mailto:<EMAIL>"><EMAIL></a>.
            </p>
        </div>
    </aside>

{% endblock main %}
<commit_msg>Use original English title for mapping discussions to translated posts<commit_after>{% extends "edition-2/base.html" %}

{% import "edition-2/macros.html" as macros %}
{% import "snippets.html" as snippets %}

{% block title %}{{ page.title }} | {{ config.title }}{% endblock title %}

{% block header %}
    {% if lang != "en" -%}
    <aside id="all-posts-link"><a href="{{ config.base_url | safe }}/{{ lang }}" title="All Posts">{{ trans(key="all_posts", lang=lang) }}</a></aside>
    {%- else -%}
    <aside id="all-posts-link"><a href="{{ config.base_url | safe }}" title="All Posts">{{ trans(key="all_posts", lang=lang) }}</a></aside>
    {%- endif %}
{% endblock header %}

{% block description -%}
{{ page.summary | safe | striptags | truncate(length=150) }}
{%- endblock description %}

{% block toc_aside %}
<aside id="toc-aside" class="{% if page.extra.rtl %}right-to-left{% endif %}">
        <h2>{{ trans(key="toc", lang=lang) }}</h2>
    <ol>
        {% for h2 in page.toc %}<li>
            <a href="#{{h2.id | safe}}">{{ h2.title | safe }}</a>
            {% if h2.children %}<ol>
                {% for h3 in h2.children %}<li>
                    <a href="#{{h3.id | safe}}">{{ h3.title | safe }}</a>
                </li>{% endfor %}
            </ol>{% endif %}
        </li>{% endfor %}
        <li class="toc-comments-link"><a href="#comments">{{ trans(key="comments", lang=lang) }}</a></li>
    </ol>
</aside>
{% endblock toc_aside %}

{% block main %}
    <div class="{% if page.extra.rtl %}right-to-left{% endif %}">
    <h1>{{ page.title }}</h1>
    <time datetime="{{ page.date | date(format="%Y-%m-%d") }}" class="post-date">
        {{ page.date | date(format="%b %d, %Y") }}
        {% if page.extra.updated %} (updated on {{ page.extra.updated | date(format="%b %d, %Y") }}) {% endif %}
    </time>
    </div>

    {% if page.extra.warning %}
        <div class="warning">
            {% if page.extra.warning_short %} <b>{{ page.extra.warning_short }}</b> {% endif %}
            {{ page.extra.warning | markdown(inline=true) | safe }}
        </div>
    {% endif %}


    {%- if page.lang != "en" %}
        <div class="warning{% if page.extra.rtl %} right-to-left{% endif %}">
            {% set translations = page.translations | filter(attribute="lang", value="en") %}
            {% set original = translations.0 %}
            <p>
            <b>{{ trans(key="translated_content", lang=lang) }}</b>
            {{ trans(key="translated_content_notice", lang=lang) |
                replace(from="_original.permalink_", to=original.permalink) |
                replace(from="_original.title_", to=original.title) | safe }}
            </p>
            {%- if page.extra.translators %}
            <p>
                {{ trans(key="translated_by", lang=lang) }} {% for user in page.extra.translators -%}
                    {%- if not loop.first -%}
                        {%- if loop.last %} {{ trans(key="word_separator", lang=lang) }} {% else %}, {% endif -%}
                    {%- endif -%}
                    <a href="https://github.com/{{user}}">@{{user}}</a>
                {%- endfor %}.
            </p>
            {% endif -%}
        </div>
    {% endif %}

    <div class="{% if page.extra.rtl %}right-to-left{% endif %}">
    {{ page.content | replace(from="<!-- toc -->", to=macros::toc(toc=page.toc))  | safe }}
    </div>

    <div class="post-footer-support{% if page.extra.rtl %} right-to-left{% endif %}">
        <h2>Support Me</h2>
        {{ snippets::support() }}
    </div>

    <hr>
    <div class="PageNavigation">
        {% if page.lighter %}
            <a class="prev" href="{{ page.lighter.path | safe }}">&laquo; {{ page.lighter.title }}</a>
        {% endif %}
        {% if page.heavier %}
            <a class="next" href="{{ page.heavier.path | safe }}">{{ page.heavier.title }} &raquo;</a>
        {% endif %}
    </div>

    <hr>
    <section>
        <h2 id="comments" class="{% if page.extra.rtl %}right-to-left{% endif %}">{{ trans(key="comments", lang=lang) }}</h2>

        {%- if page.lang != "en" %}
        <p class="{% if page.extra.rtl %}right-to-left{% endif %}">
            {{ trans(key="comments_notice", lang=lang) }}
        </p>
        {% endif %}

        {% if page.extra.comments_search_term %}
            {% set search_term=page.extra.comments_search_term %}
        {% elif page.lang != "en" %}
            {% set translations = page.translations | filter(attribute="lang", value="en") %}
            {% set original = translations.0 %}
            {% set search_term=original.title ~ " (" ~ page.lang ~ ")" %}
        {% else %}
            {% set search_term=page.title %}
        {% endif %}
        {{ snippets::giscus(search_term=search_term) }}
    </section>

    <aside class="page-aside-right">
        {% if page.translations -%}
        <div class="block" id="language-selector">
            <h2>Other Languages</h2>
            <ul>{%- for translation in page.translations | sort(attribute="lang") %}
                <li data-lang-switch-to="{{ translation.lang }}" class=""><a href="{{ translation.permalink | safe }}">
                    {%- if translation.lang == "en" -%}
                        English (original)
                    {%- else -%}
                        {{ trans(key="lang_name", lang = translation.lang) }}
                    {%- endif -%}
                </a></li>
            {% endfor %}</ul>
        </div>
        {%- endif %}

        <div class="block{% if page.extra.rtl %} left-to-right{% endif %}">
            <h2>About Me</h2>
            <p>
                I'm a Rust freelancer with a master's degree in computer science. I love systems programming, open source software, and new challenges.
            </p><p>
                If you want to work with me, reach out on <a href="https://www.linkedin.com/in/phil-opp/">LinkedIn</a> or write me at <a href="mailto:<EMAIL>"><EMAIL></a>.
            </p>
        </div>
    </aside>

{% endblock main %}

{'fraction_non_alphanumeric': 0.20953671550774963, 'fraction_numerical': 0.0044888625391716775, 'mean_word_length': 2.056691690396065, 'pattern_counts': {'":': 0, '<': 193, '<?xml version=': 0, '>': 193, 'https://': 4, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6699524', 'n_tokens_mistral': 4152, 'n_tokens_neox': 3663, 'n_words': 799}