Fix social and schema

This commit is contained in:
Digital Studium 2023-07-23 15:53:48 +03:00
parent 13613a593f
commit 9bba1d2c70
6 changed files with 28 additions and 26 deletions

View File

@ -39,7 +39,7 @@ function addCopyButtons(clipboard) {
// wrapper.appendChild(preElement); // wrapper.appendChild(preElement);
var preParent = preElement.parentNode; var preParent = preElement.parentNode;
if (preParent.classList.contains('highlight') && preElement.children[0].dataset.lang != 'plaintext') { if (preParent.classList.contains('codehilite') && preElement.children[0].dataset.lang != 'plaintext') {
preParent.parentNode.insertBefore(button, preParent); preParent.parentNode.insertBefore(button, preParent);
} }
}); });

View File

@ -22,6 +22,7 @@
{% include "components/single.j2" %} {% include "components/single.j2" %}
{% endif %} {% endif %}
</main> </main>
{% include "components/social.j2" %}
{% include "components/sidebar.j2" %} {% include "components/sidebar.j2" %}
{% include "components/footer.j2" %} {% include "components/footer.j2" %}
{% include "components/script.j2" %} {% include "components/script.j2" %}

View File

@ -5,5 +5,7 @@
<meta name="title" content="{{ title }}" /> <meta name="title" content="{{ title }}" />
<meta name="description" content="{{ description }}" /> <meta name="description" content="{{ description }}" />
<link href="/css/style.css" rel="stylesheet"> <link href="/css/style.css" rel="stylesheet">
{% if config.custom_css %}<link href="/css/{{ config.custom_css }}" rel="stylesheet">{% endif %} {% if config.custom_css %}
</head> <link href="/css/{{ config.custom_css }}" rel="stylesheet">
{% endif %}
</head>

View File

@ -4,9 +4,9 @@
"@context": "http://schema.org", "@context": "http://schema.org",
"@type": "WebSite", "@type": "WebSite",
"name": "{{ title }}", "name": "{{ title }}",
"url": "{{ url }}", "url": "{{ config.base_url }}",
"description": "{{ description }}", "description": "{{ description }}",
"thumbnailUrl": "{{ logo_url }}", "thumbnailUrl": "{{ config.base_url + "/logo.svg" }}",
} }
</script> </script>
{% else %} {% else %}
@ -24,22 +24,21 @@
"name": {{ title }}, "name": {{ title }},
"headline": {{ title }}, "headline": {{ title }},
"inLanguage": {{ language }}, "inLanguage": {{ language }},
"wordCount": {{ wordcount }}, "description": {{ description | striptags }},
"description": {{ description }},
"datePublished": {{ date_published }}, "datePublished": {{ date_published }},
"dateModified": {{ date_modified }}, "dateModified": {{ date_modified }},
"author": { "author": {
"@type": "Person", "@type": "Person",
"name": {{ config.languages[language].author }}, "name": {{ config.languages[language].author }},
"url": {{ config.baseURL + "/" + language + "/about-author" }} "url": {{ config.base_url + "/" + language + "/about-author" }}
}, },
"publisher": { "publisher": {
"@type": "Organization", "@type": "Organization",
"name": "{{ config.languages[language].title }}", "name": "{{ config.languages[language].title }}",
"url": {{ config.baseUrl }}, "url": {{ config.base_url }},
"logo": { "logo": {
"@type": "ImageObject", "@type": "ImageObject",
"url": {{ logo_url }} "url": {{ config.base_url + "/logo.svg" }}
} }
} }
} }

View File

@ -1,3 +1,3 @@
{% for include in includes %} {% for include in config['includes'] %}
<script defer src="/js/{{ include }}"></script> <script defer src="/js/{{ include }}"></script>
{% endfor %} {% endfor %}

View File

@ -1,20 +1,20 @@
<div class="social-icons"> <div class="social-icons">
{{ if .Site.Params.youtube }} {% if config.languages[language].youtube %}
<a href="https://youtube.com/{{ .Site.Params.Youtube }}"> <a href="https://youtube.com/{{ config.languages[language].youtube }}">
<img src="data:image/svg+xml;base64,{{ readFile "/static/images/youtube.svg" | base64Encode }}" <img src="/images/youtube.svg"
alt="{{ .Site.Title }}" width="100" /> alt="{{ config.languages[language].title }}" width="100" />
</a> </a>
{{ end }} {% endif %}
{{ if .Site.Params.github }} {% if config.languages[language].github %}
<a href="https://github.com/{{ .Site.Params.Github }}"> <a href="https://github.com/{{ config.languages[language].github }}">
<img src="data:image/svg+xml;base64,{{ readFile "/static/images/github.svg" | base64Encode }}" <img src="/images/github.svg"
alt="{{ .Site.Title }}" width="100" /> alt="{{ config.languages[language].title }}" width="100" />
</a> </a>
{{ end }} {% endif %}
{{ if .Site.Params.telegram }} {% if config.languages[language].telegram %}
<a href="https://t.me/{{ .Site.Params.Telegram }}"> <a href="https://t.me/{{ config.languages[language].telegram }}">
<img src="data:image/svg+xml;base64,{{ readFile "/static/images/telegram.svg" | base64Encode }}" <img src="/images/telegram.svg"
alt="{{ .Site.Title }}" width="100" /> alt="{{ config.languages[language].title }}" width="100" />
</a> </a>
{{ end }} {% endif %}
</div> </div>