JasonYao / JasonYao.github.io

My personal site at jasonyao.com using Hugo
https://www.jasonyao.com
GNU General Public License v3.0
1 stars 0 forks source link

Add in full opengraph support #1

Closed JasonYao closed 3 years ago

JasonYao commented 3 years ago

TODO

Docs

https://gohugo.io/templates/internal/#open-graph

JasonYao commented 3 years ago

old opengraph tags:


<!-- Opengraph Metadata tags: http://ogp.me/ -->
<meta property="og:title" content="{{ site.title }} | {% if page.title %}{{ page.title }}{% else %}{{ page.page }}{% endif %}" />
<meta property="og:description" content="{% if page.excerpt %}{{ page.excerpt | strip_html | strip_newlines | truncate: 160 }}{% else %}{{ site.description }}{% endif %}" />
<meta property="og:url" content="{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}" />

<meta property="og:image" content="{{ site.url }}/assets/img/posts/0-hamilton.jpg" />
<meta property="og:image:secure_url" content="{{ site.url }}/assets/img/posts/0-hamilton.jpg" />
<meta property="og:image:type" content="image/jpg" />
<meta property="og:image:width" content="1463" />
<meta property="og:image:height" content="1850" />

https://github.com/JasonYao/deprecated-old-2017-site/blob/source/_includes/head.html#L25-L34

JasonYao commented 3 years ago

While I'm doing this, it turns out I can overload the sidebar with schema.org information about me, so look into autogenerating that JSON payload from the config.toml file

JasonYao commented 3 years ago

leaving alone for now, but see about adding in opengraph links for categories and tags for posts