Skip to content

Commit 0dafd14

Browse files
committed
Add OG tags and TODO for favicon/og image
1 parent d90bc6d commit 0dafd14

2 files changed

Lines changed: 25 additions & 0 deletions

File tree

TODO.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# TODO
2+
3+
## Favicon
4+
5+
- Prepare `favicon-32x32.png` and `favicon-16x16.png`
6+
- Place them in `static/img/`
7+
8+
## OG Image
9+
10+
- Prepare an OG image (recommended size: 1200×630px)
11+
- Place it in `static/`
12+
- Add to `templates/_head_extend.html`:
13+
```html
14+
<meta property="og:image" content="{{ get_url(path='YOUR_IMAGE.png') }}">
15+
<meta name="twitter:image" content="{{ get_url(path='YOUR_IMAGE.png') }}">
16+
```

templates/_head_extend.html

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,3 +291,12 @@
291291
}
292292
}
293293
</style>
294+
295+
<meta property="og:title" content="{% if page.title %}{{ page.title }} | {{ config.title }}{% elif section.title %}{{ section.title }} | {{ config.title }}{% else %}{{ config.title }}{% endif %}">
296+
<meta property="og:description" content="{{ page.description | default(value=section.description | default(value=config.description)) }}">
297+
<meta property="og:url" content="{{ current_url | default(value=config.base_url) }}">
298+
<meta property="og:type" content="{% if page %}article{% else %}website{% endif %}">
299+
<meta property="og:site_name" content="{{ config.title }}">
300+
<meta name="twitter:card" content="summary">
301+
<meta name="twitter:title" content="{% if page.title %}{{ page.title }} | {{ config.title }}{% elif section.title %}{{ section.title }} | {{ config.title }}{% else %}{{ config.title }}{% endif %}">
302+
<meta name="twitter:description" content="{{ page.description | default(value=section.description | default(value=config.description)) }}">

0 commit comments

Comments
 (0)