|
11 | 11 | <!-- Meta -->
|
12 | 12 | <meta name="theme-color" />
|
13 | 13 |
|
14 |
| - <!-- Author --> |
15 | 14 | {% if page %}
|
16 |
| - <meta name="description" content="{{ page.summary | default(value=page.title) | safe }}" /> |
17 |
| - <meta name="author" content="{{ page.extra.author | default(value=page.title) }}" /> |
| 15 | + <!-- Author --> |
| 16 | + {% set page_title = page.title | default(value=config.title) %} |
| 17 | + <!----> |
| 18 | + {% set description = page.summary | default(value=page_title) %} |
| 19 | + <meta name="description" content="{{ description }}" /> |
| 20 | + <meta name="author" content="{{ page.extra.author | default(value=page_title) }}" /> |
| 21 | + <!-- The Open Graph protocol --> |
| 22 | + <meta property="og:type" content="website" /> |
| 23 | + <meta property="og:title" content="{{ page_title }}" /> |
| 24 | + <meta property="og:site_name" content="{{ config.title }}" /> |
| 25 | + <meta property="og:description" content="{{ description }}" /> |
| 26 | + <meta property="og:url" content="{{ page.permalink }}" /> |
| 27 | + {% set image = page.extra.cover_image | default(value=config.extra.social_image) %} |
| 28 | + <!----> |
| 29 | + {% if image %} |
| 30 | + <meta property="og:image" content="{{ get_url(path=image) }}" /> |
| 31 | + {% endif %} |
| 32 | + <!----> |
18 | 33 | {% else %}
|
19 |
| - <meta name="description" content="{{ config.description | default(value=`A personal blog`) }}" /> |
| 34 | + <!-- Author --> |
| 35 | + {% set description = config.description | default(value="A personal blog") %} |
| 36 | + <!----> |
| 37 | + <meta name="description" content="{{ description }}" /> |
20 | 38 | <meta name="author" content="{{ config.author | default(value=config.title) }}" />
|
| 39 | + <!-- The Open Graph protocol --> |
| 40 | + <meta property="og:type" content="website" /> |
| 41 | + <meta property="og:title" content="{{ config.title }}" /> |
| 42 | + <meta property="og:description" content="{{ description }}" /> |
| 43 | + <meta property="og:url" content="{{ get_url(path=``) }}" /> |
| 44 | + {% if config.extra.social_image %} |
| 45 | + <meta property="og:image" content="{{ get_url(path=config.extra.social_image) }}" /> |
| 46 | + {% endif %} |
| 47 | + <!----> |
21 | 48 | {% endif %}
|
22 | 49 |
|
23 | 50 | <!-- CSS & JS -->
|
|
0 commit comments