Skip to content

Commit 47d8aff

Browse files
authored
feat: add social sharing support and clean up assets (#4)
- Add Open Graph & Twitter Card meta tags for rich link previews - Create 1200Γ—630 og-image.jpg for social sharing - Fix homepage OG title to show "Digital Bazaar πŸ’¬" - Reorganize gallery sources into icons/ and hero_selections/ - Remove unused logo sizes from Makefile - Delete orphaned assets (banner-*, single_article_hero_*, unused logos)
1 parent fff31a6 commit 47d8aff

File tree

12 files changed

+15
-14
lines changed

12 files changed

+15
-14
lines changed

β€ŽMakefileβ€Ž

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -57,19 +57,12 @@ assets: ## Download self-hosted assets (fonts + mermaid.js)
5757
images: ## Generate all site images from gallery sources
5858
@echo "πŸ“· Generating site images from assets/gallery/..."
5959
@echo ""
60-
@echo " β†’ Logo sizes..."
60+
@echo " β†’ Logo (128px for header)..."
6161
sips -z 128 128 assets/gallery/icons/bazaar_2025.jpg --out assets/img/logo-128.jpg
62-
sips -z 256 256 assets/gallery/icons/bazaar_2025.jpg --out assets/img/logo-256.jpg
63-
sips -z 512 512 assets/gallery/icons/bazaar_2025.jpg --out assets/img/logo-512.jpg
64-
@echo " β†’ Favicons and icons..."
65-
sips -z 16 16 assets/gallery/icons/bazaar_2025.png --out assets/img/favicon-16.png
62+
cwebp -q 80 assets/img/logo-128.jpg -o assets/img/logo-128.webp
63+
@echo " β†’ Favicons..."
6664
sips -z 32 32 assets/gallery/icons/bazaar_2025.png --out assets/img/favicon-32.png
6765
sips -z 180 180 assets/gallery/icons/bazaar_2025.png --out assets/img/apple-touch-icon.png
68-
sips -z 192 192 assets/gallery/icons/bazaar_2025.png --out assets/img/icon-192.png
69-
@echo " β†’ Converting to WebP..."
70-
cwebp -q 80 assets/img/logo-128.jpg -o assets/img/logo-128.webp
71-
cwebp -q 80 assets/img/logo-256.jpg -o assets/img/logo-256.webp
72-
cwebp -q 90 assets/img/logo-512.jpg -o assets/img/logo-512-hq.webp
7366
@echo " β†’ Social share image (OG)..."
7467
sips -Z 1200 assets/gallery/hero_selections/hero_home_light.png --out /tmp/og_temp.png
7568
sips -c 630 1200 /tmp/og_temp.png --out /tmp/og_cropped.png

β€Ž_data/strings_ar.ymlβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# All user-facing text for the Arabic version
33

44
# Site
5-
site_title: "Ψ§Ω„Ψ¨Ψ§Ψ²Ψ§Ψ± Ψ§Ω„Ψ±Ω‚Ω…ΩŠ"
5+
site_title: "Ψ§Ω„Ψ¨Ψ§Ψ²Ψ§Ψ± Ψ§Ω„Ψ±Ω‚Ω…ΩŠ πŸ’¬"
66
site_tagline: "حيث ΩŠΩ„ΨͺΩ‚ΩŠ Ψ§Ω„ΨΉΨ§Ω„Ω… Ψ§Ω„ΨΉΨ±Ψ¨ΩŠ Ψ§Ω„Ψ±Ω‚Ω…ΩŠΨŒ ويΨͺΨ¨Ψ§Ψ―Ω„ΨŒ ΩˆΩŠΩ†Ω…Ωˆ."
77

88
# Months (for archive)

β€Ž_data/strings_en.ymlβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# All user-facing text for the English version
33

44
# Site
5-
site_title: "Digital Bazaar"
5+
site_title: "Digital Bazaar πŸ’¬"
66
site_tagline: "Where the Arab digital world meets, trades, and grows."
77

88
# Navigation

β€Ž_layouts/default.htmlβ€Ž

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,11 @@
2929
<meta name="description" content="{{ page.excerpt | default: site.description }}">
3030

3131
<!-- Open Graph (Facebook, WhatsApp, LinkedIn, Telegram) -->
32-
<meta property="og:title" content="{{ page.title | default: strings.site_title }}">
32+
{%- if page.layout == 'home' or page.url == '/ar/' or page.url == '/en/' -%}
33+
<meta property="og:title" content="{{ strings.site_title }}">
34+
{%- else -%}
35+
<meta property="og:title" content="{{ page.title }} β€” {{ strings.site_title }}">
36+
{%- endif -%}
3337
<meta property="og:description" content="{{ page.excerpt | default: strings.site_tagline }}">
3438
<meta property="og:type" content="{% if page.layout == 'article' %}article{% else %}website{% endif %}">
3539
<meta property="og:locale" content="{{ lang }}">
@@ -42,7 +46,11 @@
4246

4347
<!-- Twitter Card (X) - Large Image -->
4448
<meta name="twitter:card" content="summary_large_image">
45-
<meta name="twitter:title" content="{{ page.title | default: strings.site_title }}">
49+
{%- if page.layout == 'home' or page.url == '/ar/' or page.url == '/en/' -%}
50+
<meta name="twitter:title" content="{{ strings.site_title }}">
51+
{%- else -%}
52+
<meta name="twitter:title" content="{{ page.title }} β€” {{ strings.site_title }}">
53+
{%- endif -%}
4654
<meta name="twitter:description" content="{{ page.excerpt | default: strings.site_tagline }}">
4755
<meta name="twitter:image" content="{{ '/assets/img/og-image.jpg' | absolute_url }}">
4856

β€Žassets/img/favicon-16.pngβ€Ž

-801 Bytes
Binary file not shown.

β€Žassets/img/icon-192.pngβ€Ž

-71 KB
Binary file not shown.

β€Žassets/img/logo-128.jpgβ€Ž

-235 Bytes
Loading

β€Žassets/img/logo-128.webpβ€Ž

-146 Bytes
Loading

β€Žassets/img/logo-256.jpgβ€Ž

-29 KB
Binary file not shown.

β€Žassets/img/logo-256.webpβ€Ž

-14.8 KB
Binary file not shown.

0 commit comments

Comments
Β (0)