git: 9d3afad07d - main - Improve the SEO adding the schema.org tags

Sergio Carlavilla Delgado <[email protected]>
Newsgroups gmane.os.freebsd.devel.cvs.doc
Message-ID <[email protected]>
The branch main has been updated by carlavilla:

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

commit 9d3afad07d2b9aa473a158e504785437ff9b7184
Author:     Sergio Carlavilla Delgado <[email protected]>
AuthorDate: 2021-05-13 20:54:45 +0000
Commit:     Sergio Carlavilla Delgado <[email protected]>
CommitDate: 2021-05-13 20:54:45 +0000

    Improve the SEO adding the schema.org tags
---
 .../themes/beastie/layouts/articles/baseof.html    | 10 +++++++
 .../themes/beastie/layouts/books/baseof.html       | 10 +++++++
 .../themes/beastie/layouts/partials/site-head.html | 34 ++++++++++++++--------
 3 files changed, 42 insertions(+), 12 deletions(-)

diff --git a/documentation/themes/beastie/layouts/articles/baseof.html b/documentation/themes/beastie/layouts/articles/baseof.html
index 0f8c17d313..552ece4ca6 100644
--- a/documentation/themes/beastie/layouts/articles/baseof.html
+++ b/documentation/themes/beastie/layouts/articles/baseof.html
@@ -32,6 +32,16 @@
     <meta property="og:locale" content="{{ $.Site.Language.Lang | default "en" }}" />
     <meta property="og:url" content="{{ .Permalink }}" />
     <meta property="og:site_name" content="{{ .Site.Title }}" />
+    <script type="application/ld+json">
+      {
+        "@context": "http://schema.org",
+        "@type": "WebSite",
+        "url": "{{ .Permalink }}",
+        "name": "{{ .Title }}",
+        "headline": "{{ .Title }}",
+        "description": "{{ .Description }}"
+      }
+    </script>
     <!-- END SEO -->
   </head>
   <body>
diff --git a/documentation/themes/beastie/layouts/books/baseof.html b/documentation/themes/beastie/layouts/books/baseof.html
index 0f8c17d313..1f70b7c22e 100644
--- a/documentation/themes/beastie/layouts/books/baseof.html
+++ b/documentation/themes/beastie/layouts/books/baseof.html
@@ -32,6 +32,16 @@
     <meta property="og:locale" content="{{ $.Site.Language.Lang | default "en" }}" />
     <meta property="og:url" content="{{ .Permalink }}" />
     <meta property="og:site_name" content="{{ .Site.Title }}" />
+    <script type="application/ld+json">
+      {
+        "@context": "http://schema.org",
+        "@type": "Book",
+        "url": "{{ .Permalink }}",
+        "name": "{{ .Title }}",
+        "headline": "{{ .Title }}",
+        "description": "{{ .Description }}"
+      }
+    </script>
     <!-- END SEO -->
   </head>
   <body>
diff --git a/documentation/themes/beastie/layouts/partials/site-head.html b/documentation/themes/beastie/layouts/partials/site-head.html
index 20c05cce39..8ab1b3b283 100644
--- a/documentation/themes/beastie/layouts/partials/site-head.html
+++ b/documentation/themes/beastie/layouts/partials/site-head.html
@@ -17,18 +17,28 @@
   <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 }}" />
+  <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 }}" />
+  <script type="application/ld+json">
+    {
+      "@context": "http://schema.org",
+      "@type": "Article",
+      "url": "{{ .Permalink }}",
+      "name": "{{ .Site.Title }}",
+      "headline": "{{ .Site.Title }}",
+      "description": "{{ .Site.Params.description }}"
+    }
+  </script>
   <!-- END SEO -->
 
 </head>
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/dev-commits-doc-all
To unsubscribe, send any mail to "[email protected]"
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.