bmarwell commented on a change in pull request #117:
URL: https://github.com/apache/shiro-site/pull/117#discussion_r727829890



##########
File path: jbake/templates/header.ftl
##########
@@ -21,28 +21,79 @@
 <html lang="en">
   <head>
     <meta charset="utf-8"/>
-    <title>
-      <#if (content.title)?? && (content.title)?contains("|")>
-        <#-- The page has a full custom title, render it directly: -->
-        ${content.title}
-      <#elseif (content.title)??>
-        <#-- standard title, append the project name appended for SEO: -->
-        ${content.title} | Apache Shiro
-      <#else>
-        <#-- No title found in the page metadata, set the default: -->
-        Apache Shiro | Simple. Java. Security.
-      </#if>
-    </title>
+    <#if (content.title)?? && (content.title)?contains("|")>
+    <#-- The page has a full custom title, render it directly: -->
+      <#assign ftltitle="${content.title}" />
+    <#elseif (content.title)??>
+    <#-- standard title, append the project name appended for SEO: -->
+      <#assign ftltitle="${content.title} | Apache Shiro" />
+    <#else>
+    <#-- No title found in the page metadata, set the default: -->
+      <#assign ftltitle="Apache Shiro | Simple. Java. Security." />
+    </#if>
+    <title>${ftltitle}</title>
     <meta name="viewport" content="width=device-width, initial-scale=1.0">
-    <meta name="description" content="">
-    <meta name="author" content="">
-    <meta name="keywords" content="">
+    <#if (content.description)??>
+    <meta name="description" content="${content.description}">
+    <meta property="og:description" content="${content.description}">
+    <#else>
+    <meta name="description" content="Apache Shiro is a powerful and 
easy-to-use Java security framework that performs authentication, 
authorization, cryptography, and session management.">
+    <#-- leave out og:description, so it will fill from the body. -->
+    </#if>

Review comment:
       This is interesting, isn't it? It might be smarter to leave out the 
description, depending on the use case.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to