Better OG tags in head partial

This commit is contained in:
shockrah 2023-10-01 16:02:02 -07:00
parent 3de4dfa871
commit 8f6175c0d2
6 changed files with 13 additions and 5 deletions

5
.gitignore vendored
View File

@ -2,3 +2,8 @@ main-site/public/
main-site/.hugo_build.lock main-site/.hugo_build.lock
*.swp *.swp
infra/.terraform/
infra/.terraform.lock.hcl
infra/set-env.sh
infra/out.plan
infra/terraform.tfvars

View File

View File

View File

@ -6,6 +6,7 @@ theme: 'temper'
Params: Params:
description: I like to make stuff description: I like to make stuff
name: temper.tv
twitch: https://twitch.tv/shockrah twitch: https://twitch.tv/shockrah
gitlab: https://gitlab.com/shockrah gitlab: https://gitlab.com/shockrah
github: https://github.com/tempersama github: https://github.com/tempersama

View File

@ -1,4 +1,6 @@
{{ define "main" }} {{ define "main" }}
{{ partial "head.html" }}
{{ partial "minimal-navbar.html" }}
<h1>{{ .Title }}</h1> <h1>{{ .Title }}</h1>
{{ if .Params.Article }} {{ if .Params.Article }}
<h5>{{ .Params.Description }}</h5> <h5>{{ .Params.Description }}</h5>

View File

@ -3,12 +3,12 @@
<link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="/css/style.css"> <link rel="stylesheet" type="text/css" href="/css/style.css">
<link rel="shortcut icon" type="image/png" href="{{ .Site.BaseURL }}/img/favicon.png"> <link rel="shortcut icon" type="image/png" href="{{ .Site.BaseURL }}/img/favicon.png">
<title>{{.Site.Params.Title}}</title> <title>{{ default .Params.Title .Site.Params.Title }}</title>
<meta name="viewport" content="width=device-width,initial-scale=1.0"> <meta name="viewport" content="width=device-width,initial-scale=1.0">
<meta property="og:title" content="{{ .Site.Params.Title }}"> <meta property="og:title" content="{{ default .Site.Title .Params.Title }}">
<meta property="og:description" content="{{ .Site.Params.description }}"> <meta property="og:description" content="{{ default .Site.Params.Description .Params.Description }}">
<meta property="og:site_name" content="{{ .Site.Params.name }}"> <meta property="og:site_name" content="{{ .Site.Params.Name }}">
<meta property="og:url" content="{{ .Site.BaseURL }}"> <meta property="og:url" content="{{ .Permalink }}">
<meta property="og:type" content="website"> <meta property="og:type" content="website">
<meta property="og:image" content="/images/ogbanner.jpg"> <meta property="og:image" content="/images/ogbanner.jpg">
</head> </head>