Skip to content

Commit

Permalink
update social links
Browse files Browse the repository at this point in the history
  • Loading branch information
aviskase committed Feb 26, 2024
1 parent 2853c9b commit d12511a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion hugo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ mainSections = ["posts"]

[params.social]
email = "[email protected]"
twitter = "aviskase"
twitter_creator = "@aviskase"

[outputs]
# Output HTML, and ATOM on Home
Expand Down
8 changes: 7 additions & 1 deletion layouts/partials/opengraph.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<meta property="og:title" content="{{ partial "func/MakeTitle" (dict "title" .Title "isVisible" false ) }}" />
<meta name="twitter:title" content="{{ partial "func/MakeTitle" (dict "title" .Title "isVisible" false ) }}"/>
<meta property="og:description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}" />
<meta property="twitter:description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}" />
<meta name="description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}" />
<meta property="og:url" content="{{ .Permalink }}" />
<link rel="canonical" href="{{ .Permalink }}">
Expand All @@ -21,11 +23,13 @@
<meta property="og:image" content="{{ $featured.Permalink }}"/>
<meta property="og:image:height" content="630" />
<meta property="og:image:width" content="1200" />
<meta name="twitter:image" content="{{ $featured.Permalink }}" />
{{ else -}}
{{- with $.Site.Params.images -}}
<meta property="og:image" content="{{ index . 0 | absURL }}"/>
<meta property="og:image:height" content="200" />
<meta property="og:image:width" content="200" />
<meta name="twitter:image" content="{{ index . 0 | absURL }}" />
{{ end }}{{ end }}

{{- $iso8601 := "2006-01-02T15:04:05-07:00" -}}
Expand Down Expand Up @@ -61,4 +65,6 @@
<meta property="article:author" content="{{ ref . "pages/about" }}" />
{{ end }}

<meta name="twitter:card" content="summary"/>
<meta name="twitter:card" content="summary"/>
{{- with .Site.Social.twitter_creator -}}<meta name="twitter:creator" content="{{ . }}" />{{- end -}}
<link rel="me" href="https://mastodon.social/@aviskase" />

0 comments on commit d12511a

Please sign in to comment.