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>
<html lang="{{ language }}">
{% include "components/head.j2" %}

View File

@ -1,15 +1,6 @@
<head>
<meta charset="utf-8">
<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>
<meta name="title" content="{{ title }}" />
<meta name="description" content="{{ description }}" />

View File

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

View File

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

View File

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