Skip to content

Commit

Permalink
Add subtitle content meta
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikko Miu committed Feb 13, 2024
1 parent 163daf1 commit c6f64f2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
3 changes: 2 additions & 1 deletion config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
baseURL: /
languageCode: en-us
title: RRR
subtitle: Reduce, Recycle, Recode

disableHugoGeneratorInject: true
copyright: Nikko Miu
Expand Down Expand Up @@ -45,6 +44,8 @@ markup:
style: github-dark

params:
subtitle: Reduce, Recycle, Recode

gitRepoURL: https://github.com/nikkomiu/blog
gitDefaultBranch: main

Expand Down
16 changes: 8 additions & 8 deletions layouts/partials/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta
name="description"
content="{{ if .IsHome -}}
{{ $.Site.Params.Subtitle }}
{{- else if .Description -}}
content="{{ if .Description -}}
{{ .Description | plainify }}
{{- else -}}
{{- else if .Summary -}}
{{ .Summary | plainify }}
{{- else -}}
{{ $.Site.Params.Subtitle }}
{{- end }}"
/>
<meta
Expand Down Expand Up @@ -79,12 +79,12 @@
/>
<meta
property="og:description"
content="{{ if .IsHome -}}
{{ $.Site.Params.Subtitle }}
{{- else if .Description -}}
content="{{ if .Description -}}
{{ .Description | plainify }}
{{- else -}}
{{- else if .Summary -}}
{{ .Summary | plainify }}
{{- else -}}
{{ $.Site.Params.Subtitle }}
{{- end }}"
/>
<meta property="og:url" content="{{ .Permalink }}" />
Expand Down

0 comments on commit c6f64f2

Please sign in to comment.