mirror of
https://github.com/BBaoVanC/bobatheme.git
synced 2025-07-05 03:27:33 -05:00
Compare commits
4 Commits
cc7cec07df
...
master
Author | SHA1 | Date | |
---|---|---|---|
1f82ad4f0b
|
|||
7e016547ec
|
|||
b4bff1e36d
|
|||
1f9477759d
|
@ -24,11 +24,7 @@
|
|||||||
<link rel="apple-touch-icon" href="{{ . | absURL }}" />
|
<link rel="apple-touch-icon" href="{{ . | absURL }}" />
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ if .IsHome }}
|
<title>{{ .Render "head_title" }}</title>
|
||||||
<title>{{ .Site.Title | plainify }}</title>
|
|
||||||
{{ else }}
|
|
||||||
<title>{{ (print .Title " | " .Site.Title) | plainify }}</title>
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
{{ partial "seo-tags/opengraph.html" . }}
|
{{ partial "seo-tags/opengraph.html" . }}
|
||||||
{{ partial "seo-tags/twitter-cards.html" . }}
|
{{ partial "seo-tags/twitter-cards.html" . }}
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
|
{{/* we do not need to duplicate what's already covered by OpenGraph tags
|
||||||
|
* see: https://demo.bbaovanc.com/test/remove-twitter-tags/blog/swapfile-guide/
|
||||||
|
* so, no twitter:image/title/description
|
||||||
|
*/}}
|
||||||
{{ $images := $.Resources.ByType "image" }}
|
{{ $images := $.Resources.ByType "image" }}
|
||||||
{{ $featured := $images.GetMatch "*feature*" }}
|
{{ $featured := $images.GetMatch "*feature*" }}
|
||||||
{{ if not $featured }}
|
{{ if not $featured }}
|
||||||
@ -17,13 +21,21 @@
|
|||||||
{{ else }}
|
{{ else }}
|
||||||
<meta name="twitter:card" content="summary">
|
<meta name="twitter:card" content="summary">
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
{{ else }}
|
||||||
<meta name="twitter:image" content="{{ $featured.Permalink }}">
|
<meta name="twitter:card" content="summary">
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
<meta name="twitter:title" content="{{ .Title | plainify }}">
|
{{/* twitter:site is the site author; twitter:creator is page author
|
||||||
<meta name="twitter:description" content="{{ (partial "seo-description.html" .) | plainify }}">
|
* https://developer.x.com/en/docs/x-for-websites/cards/guides/getting-started
|
||||||
|
* "Card and Content Attribution"
|
||||||
|
*/}}
|
||||||
{{ with .Site.Params.social.twitter }}
|
{{ with .Site.Params.social.twitter }}
|
||||||
<meta name="twitter:site" content="@{{ . }}">
|
<meta name="twitter:site" content="@{{ . }}">
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
{{ with .GetTerms "authors" }}
|
||||||
|
{{ range . }}
|
||||||
|
{{ with .Params.twitter }}
|
||||||
|
<meta name="twitter:creator" content="@{{ . }}">
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
1
layouts/authors/term.head_title.html
Normal file
1
layouts/authors/term.head_title.html
Normal file
@ -0,0 +1 @@
|
|||||||
|
{{ (print .Title "'s Posts | " .Site.Title) | plainify }}
|
@ -8,12 +8,6 @@
|
|||||||
|
|
||||||
{{ partial "top.html" . }}
|
{{ partial "top.html" . }}
|
||||||
|
|
||||||
{{ if hugo.IsServer -}}
|
|
||||||
<div style="position: fixed; bottom: 25px; right: 25px;">
|
|
||||||
{{ templates.Current.Name }}
|
|
||||||
</div>
|
|
||||||
{{ end -}}
|
|
||||||
|
|
||||||
<div class="main-container">
|
<div class="main-container">
|
||||||
{{ if not .IsHome }}
|
{{ if not .IsHome }}
|
||||||
{{ partial "breadcrumb.html" . }}
|
{{ partial "breadcrumb.html" . }}
|
||||||
|
1
layouts/head_title.html
Normal file
1
layouts/head_title.html
Normal file
@ -0,0 +1 @@
|
|||||||
|
{{ (print .Title " | " .Site.Title) | plainify }}
|
1
layouts/home.head_title.html
Normal file
1
layouts/home.head_title.html
Normal file
@ -0,0 +1 @@
|
|||||||
|
{{ .Site.Title | plainify }}
|
Reference in New Issue
Block a user