Skip to content
Permalink
Browse files
head: use .Permalink for non-href
.RelPermalink appears to be somewhat incorrect when a baseURL involves a
path.
  • Loading branch information
samuelkarp committed Mar 23, 2019
1 parent ac11c7d commit 3b765bc3d9586989da99222d3aeee101ccb35f05
Showing 1 changed file with 5 additions and 5 deletions.
@@ -42,15 +42,15 @@
<meta name="twitter:site" content="@{{ .Site.Params.twitter | default $gohugoio }}">
<meta name="twitter:title" content="{{ .Title }}">
<meta name="twitter:description" content="{{ .Summary | plainify }}">
<meta name="twitter:image" content="{{ $avatar.RelPermalink }}">
<meta name="twitter:image" content="{{ $avatar.Permalink }}">
{{ end }}

<!-- Facebook Open Graph -->
<meta property="og:type" content="article">
<meta property="og:title" content="{{ .Title }}">
<meta property="og:description" content="{{ .Summary | plainify }}">
<meta property="og:url" content="{{ .Permalink }}">
<meta property="og:image" content="{{ if isset .Params "cover" }}{{ .Params.cover | absURL }}{{ else }}{{ $avatar.RelPermalink }}{{ end }}">
<meta property="og:image" content="{{ if isset .Params "cover" }}{{ .Params.cover | absURL }}{{ else }}{{ $avatar.Permalink }}{{ end }}">

{{ else }}

@@ -63,14 +63,14 @@
<meta name="twitter:site" content="@{{ .Site.Params.twitter | default $gohugoio }}">
<meta name="twitter:title" content="{{ if isset .Site.Params "seotitle" }}{{ .Site.Params.seotitle }}{{ else }}{{ .Site.Title }}{{ end }}">
{{ with .Site.Params.description }}<meta name="twitter:description" content="{{ . }}">{{ end }}
<meta name="twitter:image" content="{{ $avatar.RelPermalink }}">
<meta name="twitter:image" content="{{ $avatar.Permalink }}">

<!-- Facebook Open Graph -->
<meta property="og:type" content="website">
<meta property="og:title" content="{{ if isset .Site.Params "seotitle" }}{{ .Site.Params.seotitle }}{{ else }}{{ .Site.Title }}{{ end }}">
{{ with .Site.Params.description }}<meta property="og:description" content="{{ . }}">{{ end }}
<meta property="og:url" content="{{ .Permalink }}">
<meta property="og:image" content="{{ $avatar.RelPermalink }}">
<meta property="og:image" content="{{ $avatar.Permalink }}">

{{ end }}

@@ -124,7 +124,7 @@
<!-- Main Styles -->
<style>
body {
background: rgb(244, 243, 241) url('{{ $bg.RelPermalink }}') repeat fixed;
background: rgb(244, 243, 241) url('{{ $bg.Permalink }}') repeat fixed;
}
</style>
<link rel="stylesheet" href="{{ $style.RelPermalink }}">

0 comments on commit 3b765bc

Please sign in to comment.