diff options
author | Melody Horn <melody@boringcactus.com> | 2018-08-31 15:44:25 -0500 |
---|---|---|
committer | Melody Horn <melody@boringcactus.com> | 2018-08-31 15:44:25 -0500 |
commit | ec88adb4bc05a85692b41cfc764c091c347ec991 (patch) | |
tree | c8990f3a0f86c6789f9d5034c3c59a3a9a8fb385 /_layouts/default.html | |
parent | 1760ebea8ab6cef982693989ab0c22e48adc47fe (diff) | |
download | boringcactus.com-ec88adb4bc05a85692b41cfc764c091c347ec991.tar.gz boringcactus.com-ec88adb4bc05a85692b41cfc764c091c347ec991.zip |
Add (in theory) Open Graph metadata
Diffstat (limited to '_layouts/default.html')
-rw-r--r-- | _layouts/default.html | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/_layouts/default.html b/_layouts/default.html index a8d8e3f..982510c 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -1,19 +1,30 @@ <!DOCTYPE html> <html> <head> -<meta charset="utf-8" /> -<meta name="viewport" content="width=device-width, initial-scale=1"> -<title>{{ page.title }} | boringcactus</title> -<link rel="stylesheet" href="/site.css"> + <meta charset="utf-8"/> + <meta name="viewport" content="width=device-width, initial-scale=1" /> + <meta name="description" content="{% if page.description != nil %}{{ page.description }}{% else %}{{ page.excerpt | strip_html | strip }}{% endif %}" /> + <meta property="og:url" content="{{ page.url | absolute_url }}" /> + <meta property="og:title" content="{{ page.title }}" /> + {% if page.url == "/" %} + <meta property="og:type" content="website" /> + <title>{{ page.title }}</title> + {% else %} + <meta property="og:type" content="article" /> + <meta property="article:published_time" content="{{ page.date }}" /> + <title>{{ page.title }} | boringcactus</title> + {% endif %} + <link rel="stylesheet" href="/site.css"> </head> <body> <header> -{% if page.url != "/" %} -<p>(brought to you by <a href="/">boringcactus</a>)</p> -{% endif %} + {% if page.url != "/" %} + <p>(brought to you by <a href="/">boringcactus</a>)</p> + {% endif %} </header> <main> -{{ content }} + <h1>{{ page.title }}</h1> + {{ content }} </main> </body> </html> |