This commit is contained in:
Digital Studium 2023-07-23 11:47:23 +03:00
parent 5be1e9acaa
commit 13613a593f
6 changed files with 25 additions and 18 deletions

View File

@ -1,3 +1,12 @@
{% set title = config.languages[language].title %}
{% set description = config.languages[language].description %}
{% if section %}
{% set title = translate(section, language) | capitalize %}
{% set description = title %}
{% elif not home %}
{% set title = post.title %}
{% set description = post.description %}
{% endif %}
<!DOCTYPE html> <!DOCTYPE html>
<html lang="{{ language }}"> <html lang="{{ language }}">
{% include "components/head.j2" %} {% include "components/head.j2" %}

View File

@ -1,15 +1,6 @@
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
{% set title = config.languages[language].title %}
{% set description = config.languages[language].description %}
{% if section %}
{% set title = (translate(section, language) | capitalize) + " | " + title %}
{% set description = title %}
{% elif not home %}
{% set title = post.title + " | " + title %}
{% set description = post.description %}
{% endif %}
<title>{{ title }}</title> <title>{{ title }}</title>
<meta name="title" content="{{ title }}" /> <meta name="title" content="{{ title }}" />
<meta name="description" content="{{ description }}" /> <meta name="description" content="{{ description }}" />

View File

@ -1,5 +1,7 @@
{% for section, urls in posts[language].items() %} {% for section, urls in posts[language].items() %}
{% for url, post in urls.items() %} {% if section != "/" %}
{% include "components/post_summary.j2" %} {% for url, post in urls.items() %}
{% endfor %} {% include "components/post_summary.j2" %}
{% endfor %}
{% endif %}
{% endfor %} {% endfor %}

View File

@ -14,7 +14,10 @@
{ {
"@context": "https://schema.org", "@context": "https://schema.org",
"@type": {{ config.schema.type }}, "@type": {{ config.schema.type }},
{# "articleSection": {{ translate(section, language) }}, #} {% if section %}
"articleSection": {{ translate(section, language) }},
{% endif %}
{% if config.schema.type == 'TechArticle' %} {% if config.schema.type == 'TechArticle' %}
"proficiencyLevel": "Beginner", "proficiencyLevel": "Beginner",
{% endif %} {% endif %}

View File

@ -1,9 +1,11 @@
<div class="sidebar"> <div class="sidebar">
<section> <section>
{% for section, urls in posts[language].items() %} {% for section, urls in posts[language].items() %}
<p> {% if section != "/" %}
<a href="/{{ language}}/{{ section }}">{{ translate(section, language) }} ({{ urls | length }})</a> <p>
</p> <a href="/{{ language}}/{{ section }}">{{ translate(section, language) }} ({{ urls | length }})</a>
</p>
{% endif %}
{% endfor %} {% endfor %}
</section> </section>
</div> </div>