Skip to content

Commit

Permalink
Fix OG image
Browse files Browse the repository at this point in the history
  • Loading branch information
mhsattarian committed Nov 17, 2022
1 parent 43c6246 commit 9a35f00
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
17 changes: 13 additions & 4 deletions src/_includes/word.njk
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,20 @@

{% extends "base.njk" %}

{% set title = word + ' - ' + translation %}
{% set letter = page.url[1] %}
{# {% set letter = word[0] %} #}

{% block links %}
<link rel="stylesheet" href="/assets/word.css"/>
<link href="/assets/codehighlight.css" rel="stylesheet">
<meta property="og:title" content="الفبای یادگیری ماشین"/>
<meta property="og:description"
content="{{title}}"/>
<meta property="og:determiner" content="the"/>
<meta property="og:locale" content="fa_IR"/>
<meta property="og:image" content="/og/{{word}}.svg"/>

<script>
const shareData = {
title: "الفبای یادگیری ماشین",
Expand Down Expand Up @@ -37,10 +48,6 @@
</script>
{% endblock %}

{% set title = word + ' - ' + translation %}
{% set letter = page.url[1] %}
{# {% set letter = word[0] %} #}

{% set previousPost = collections[letter] | getPreviousCollectionItem(page) %}
{% set nextPost = collections[letter] | getNextCollectionItem(page) %}

Expand Down Expand Up @@ -86,7 +93,9 @@
<article>
<section id='description'>
<h3>تعریف</h3>

<p>{{content | safe}}</p>

</section>
<section id='options'>
<div id="info">
Expand Down
2 changes: 1 addition & 1 deletion words/og.svg.njk
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ permalink: "og/{{ word.fileSlug | safe }}.svg"
<path d="M1071.68 537H1083.05" stroke="#393939" stroke-width="1.5" stroke-linecap="round"/>
<path d="M1081.63 544.102C1081.63 544.102 1084.47 544.102 1084.47 544.102C1088.39 544.102 1091.57 540.922 1091.57 537C1091.57 533.078 1088.39 529.898 1084.47 529.898C1084.47 529.898 1081.63 529.898 1081.63 529.898" stroke="#393939" stroke-width="1.5" stroke-linecap="round"/>
<text transform="translate(1188.08 17.2381) rotate(90)" fill="white" xml:space="preserve" style="white-space: pre" font-family="Vazir" font-size="14" letter-spacing="0em">
<tspan x="0" y="13.1">&#x646;&#x6cc;&#x634;&#x627;&#x645; &#x6cc;&#x631;&#x6cc;&#x6af;&#x62f;&#x627;&#x6cc; &#x6cc;&#x627;&#x628;&#x641;&#x644;&#x627;</tspan>
<tspan x="0" y="13.1">الفبای یادگیری ماشین</tspan>
</text>
<text transform="translate(1188.08 133.744) rotate(90)" fill="white" xml:space="preserve" style="white-space: pre" font-family="Vazir" font-size="14" letter-spacing="0em">
<tspan x="0" y="13.1">ML Glossary</tspan>
Expand Down

0 comments on commit 9a35f00

Please sign in to comment.