Refactor
This commit is contained in:
parent
5be1e9acaa
commit
13613a593f
|
@ -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" %}
|
||||
|
|
|
@ -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 }}" />
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
{% for section, urls in posts[language].items() %}
|
||||
{% for url, post in urls.items() %}
|
||||
{% include "components/post_summary.j2" %}
|
||||
{% endfor %}
|
||||
{% if section != "/" %}
|
||||
{% for url, post in urls.items() %}
|
||||
{% include "components/post_summary.j2" %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
|
@ -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 %}
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
<div class="sidebar">
|
||||
<section>
|
||||
{% for section, urls in posts[language].items() %}
|
||||
<p>
|
||||
<a href="/{{ language}}/{{ section }}">{{ translate(section, language) }} ({{ urls | length }})</a>
|
||||
</p>
|
||||
{% if section != "/" %}
|
||||
<p>
|
||||
<a href="/{{ language}}/{{ section }}">{{ translate(section, language) }} ({{ urls | length }})</a>
|
||||
</p>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</section>
|
||||
</div>
|
Loading…
Reference in New Issue