Skip to content

Commit

Permalink
Improve things (#61)
Browse files Browse the repository at this point in the history
* Remove duplicate og:site_name meta tag and update comment style

* Update meta.json and base.njk files

* Update Twitter meta tags
  • Loading branch information
afnizarnur committed Apr 26, 2024
1 parent e6b9c3a commit 6c59e7f
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 28 deletions.
2 changes: 1 addition & 1 deletion src/data/meta.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"title": "Afnizar Nur Ghifari, Product Designer",
"title": "Afnizar Nur Ghifari",
"description": "Afnizar Nur Ghifari is an Indonesia-based product designer that specializing in user interfaces, design system, and strategy across multiple industries.",
"url": "https://afnizarnur.com",
"lang": "en",
Expand Down
7 changes: 3 additions & 4 deletions src/includes/meta.njk
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,18 @@ endset -%}
/>
<meta property="og:site_name" content="{{ meta.title }}"/>
<meta property="og:locale" content="{{ meta.locale }}"/>
<meta property="og:site_name" content="{{ meta.title }}"/>
<meta name="author" content="{{ author.name }}"/>
<meta
property="og:image"
content="{{ 'https://afnizarnur.com/assets/images/meta-image.png' | url }}"
/>

<!-- Twitter -->
{# Twitter #}
<meta property="twitter:card" content="summary_large_image"/>
<meta name="twitter:site" content="@{{ author.social.twitter.name }}"/>
<meta name="twitter:creator" content="@{{ author.social.twitter.name }}"/>
<meta property="twitter:title" content="{{ meta.title }}"/>
<meta property="twitter:description" content="{{ meta.description }}"/>
<meta property="twitter:title" content="{{ title or meta.title }}"/>
<meta property="twitter:description" content="{{ description or meta.description }}"/>
<meta
property="twitter:image"
content="{{ 'https://afnizarnur.com/assets/images/meta-image.png' | url }}"
Expand Down
19 changes: 17 additions & 2 deletions src/layouts/base.njk
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,24 @@
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>
{% if title %}{{ title }} | {{ meta.title }}
{% if page
.url
.startsWith('/writing/') %}
{% if page.url == '/writing/' or page
.url
.startsWith('/writing/tags/') %}
{{ title }} · {{ meta.title }}
{% else %}
{% if title %}
{{ title }}
{% endif %}
{% endif %}
{% else %}
{{ meta.title }}
{% if title %}
{{ title }} · {{ meta.title }}
{% else %}
{{ meta.title }}
{% endif %}
{% endif %}
</title>
{% include "meta.njk" %}
Expand Down
42 changes: 21 additions & 21 deletions src/site.webmanifest
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
{
"lang": "en",
"dir": "ltr",
"name": "Afnizar Nur Ghifari, Product Designer",
"short_name": "afnizarnur",
"icons": [
{
"src": "/assets/images/favicon/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/assets/images/favicon/android-chrome-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
],
"theme_color": "#191a1b",
"background_color": "#ffffff",
"start_url": "/index.html",
"display": "standalone",
"orientation": "natural"
"lang": "en",
"dir": "ltr",
"name": "Afnizar Nur Ghifari",
"short_name": "afnizarnur",
"icons": [
{
"src": "/assets/images/favicon/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/assets/images/favicon/android-chrome-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
],
"theme_color": "#191a1b",
"background_color": "#ffffff",
"start_url": "/index.html",
"display": "standalone",
"orientation": "natural"
}

0 comments on commit 6c59e7f

Please sign in to comment.