Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 9 May 2021 11:30:43 GMT
From:      Sergio Carlavilla Delgado <carlavilla@FreeBSD.org>
To:        doc-committers@FreeBSD.org, dev-commits-doc-all@FreeBSD.org
Subject:   git: aa85bf35fe - main - Improve SEO adding Open Graph and Twitter card
Message-ID:  <202105091130.149BUhOR038489@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by carlavilla:

URL: https://cgit.FreeBSD.org/doc/commit/?id=aa85bf35fec1408074b046a7d8c63f9156055266

commit aa85bf35fec1408074b046a7d8c63f9156055266
Author:     Sergio Carlavilla Delgado <carlavilla@FreeBSD.org>
AuthorDate: 2021-05-09 11:29:55 +0000
Commit:     Sergio Carlavilla Delgado <carlavilla@FreeBSD.org>
CommitDate: 2021-05-09 11:29:55 +0000

    Improve SEO adding Open Graph and Twitter card
---
 .../themes/beastie/layouts/articles/baseof.html    | 22 +++++++++++++++++++++-
 .../themes/beastie/layouts/books/baseof.html       | 22 +++++++++++++++++++++-
 .../themes/beastie/layouts/partials/site-head.html | 16 ++++++++++++----
 3 files changed, 54 insertions(+), 6 deletions(-)

diff --git a/documentation/themes/beastie/layouts/articles/baseof.html b/documentation/themes/beastie/layouts/articles/baseof.html
index e4e596e122..0f8c17d313 100644
--- a/documentation/themes/beastie/layouts/articles/baseof.html
+++ b/documentation/themes/beastie/layouts/articles/baseof.html
@@ -8,11 +8,31 @@
     <meta name="copyright" content="1995-2021 The FreeBSD Foundation">
     <link rel="canonical" href="{{ .Permalink }}" />
 
-    <title>{{ block "title" . }}{{ with .Params.Title }} {{ . }}{{ end }}{{ end }}</title>
+    <title>{{ block "title" . }}{{ .Site.Title }}{{ with .Params.Title }} | {{ . }}{{ end }}{{ end }}</title>
 
+    <!-- FAVICON -->
     <link rel="shortcut icon" href="{{ absLangURL ($.Site.BaseURL) }}favicon.ico">
+
+    <meta name="theme-color" content="#790000">
+    <!-- END FAVICON -->
+
     <link rel="stylesheet" href="{{ absLangURL ($.Site.BaseURL) }}css/docbook.css">
     <link rel="stylesheet" href="{{ absLangURL ($.Site.BaseURL) }}css/font-awesome-min.css">
+
+    <!-- SEO -->
+    <meta name="twitter:card" content="summary"/>
+    <meta name="twitter:domain" content="docs.FreeBSD.org"/>
+    <meta name="twitter:site" content="@freebsd"/>
+    <meta name="twitter:url" content="https://twitter.com/freebsd"/>;
+    <meta property="og:title" content="{{ if .IsHome }}{{ .Site.Params.Title }}{{ else }}{{ .Title }}{{ end }}" />
+    <meta property="og:description" content="{{ if .IsHome }}{{ .Site.Params.description }}{{ else }}{{ .Description }}{{ end }}" />
+    <meta property="og:type" content="website"/>
+    <meta property="og:image" content="{{ absLangURL ($.Site.BaseURL) }}favicon.ico"/>
+    <meta property="og:image:alt" content="FreeBSD Logo">
+    <meta property="og:locale" content="{{ $.Site.Language.Lang | default "en" }}" />
+    <meta property="og:url" content="{{ .Permalink }}" />
+    <meta property="og:site_name" content="{{ .Site.Title }}" />
+    <!-- END SEO -->
   </head>
   <body>
     <main>
diff --git a/documentation/themes/beastie/layouts/books/baseof.html b/documentation/themes/beastie/layouts/books/baseof.html
index e4e596e122..0f8c17d313 100644
--- a/documentation/themes/beastie/layouts/books/baseof.html
+++ b/documentation/themes/beastie/layouts/books/baseof.html
@@ -8,11 +8,31 @@
     <meta name="copyright" content="1995-2021 The FreeBSD Foundation">
     <link rel="canonical" href="{{ .Permalink }}" />
 
-    <title>{{ block "title" . }}{{ with .Params.Title }} {{ . }}{{ end }}{{ end }}</title>
+    <title>{{ block "title" . }}{{ .Site.Title }}{{ with .Params.Title }} | {{ . }}{{ end }}{{ end }}</title>
 
+    <!-- FAVICON -->
     <link rel="shortcut icon" href="{{ absLangURL ($.Site.BaseURL) }}favicon.ico">
+
+    <meta name="theme-color" content="#790000">
+    <!-- END FAVICON -->
+
     <link rel="stylesheet" href="{{ absLangURL ($.Site.BaseURL) }}css/docbook.css">
     <link rel="stylesheet" href="{{ absLangURL ($.Site.BaseURL) }}css/font-awesome-min.css">
+
+    <!-- SEO -->
+    <meta name="twitter:card" content="summary"/>
+    <meta name="twitter:domain" content="docs.FreeBSD.org"/>
+    <meta name="twitter:site" content="@freebsd"/>
+    <meta name="twitter:url" content="https://twitter.com/freebsd"/>;
+    <meta property="og:title" content="{{ if .IsHome }}{{ .Site.Params.Title }}{{ else }}{{ .Title }}{{ end }}" />
+    <meta property="og:description" content="{{ if .IsHome }}{{ .Site.Params.description }}{{ else }}{{ .Description }}{{ end }}" />
+    <meta property="og:type" content="website"/>
+    <meta property="og:image" content="{{ absLangURL ($.Site.BaseURL) }}favicon.ico"/>
+    <meta property="og:image:alt" content="FreeBSD Logo">
+    <meta property="og:locale" content="{{ $.Site.Language.Lang | default "en" }}" />
+    <meta property="og:url" content="{{ .Permalink }}" />
+    <meta property="og:site_name" content="{{ .Site.Title }}" />
+    <!-- END SEO -->
   </head>
   <body>
     <main>
diff --git a/documentation/themes/beastie/layouts/partials/site-head.html b/documentation/themes/beastie/layouts/partials/site-head.html
index 0cc0013fdf..20c05cce39 100644
--- a/documentation/themes/beastie/layouts/partials/site-head.html
+++ b/documentation/themes/beastie/layouts/partials/site-head.html
@@ -11,16 +11,24 @@
   <!-- FAVICON -->
   <link rel="shortcut icon" href="{{ absLangURL ($.Site.BaseURL) }}favicon.ico">
 
-
   <meta name="theme-color" content="#790000">
   <!-- END FAVICON -->
 
-
   <link rel="stylesheet" href="{{ absLangURL ($.Site.BaseURL) }}css/fixed.css">
 
   <!-- SEO -->
-
-
+    <meta name="twitter:card" content="summary"/>
+    <meta name="twitter:domain" content="docs.FreeBSD.org"/>
+    <meta name="twitter:site" content="@freebsd"/>
+    <meta name="twitter:url" content="https://twitter.com/freebsd"/>;
+    <meta property="og:title" content="{{ if .IsHome }}{{ .Site.Params.Title }}{{ else }}{{ .Title }}{{ end }}" />
+    <meta property="og:description" content="{{ if .IsHome }}{{ .Site.Params.description }}{{ else }}{{ .Description }}{{ end }}" />
+    <meta property="og:type" content="website"/>
+    <meta property="og:image" content="{{ absLangURL ($.Site.BaseURL) }}favicon.ico"/>
+    <meta property="og:image:alt" content="FreeBSD Logo">
+    <meta property="og:locale" content="{{ $.Site.Language.Lang | default "en" }}" />
+    <meta property="og:url" content="{{ .Permalink }}" />
+    <meta property="og:site_name" content="{{ .Site.Title }}" />
   <!-- END SEO -->
 
 </head>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202105091130.149BUhOR038489>