This is an automated email from the ASF dual-hosted git repository. bmarwell pushed a commit to branch jbake in repository https://gitbox.apache.org/repos/asf/shiro-site.git
The following commit(s) were added to refs/heads/jbake by this push: new f7f6c9d add twittercard new c31d78e Merge pull request #122 from bmarwell/jbake-twitter-cards f7f6c9d is described below commit f7f6c9d243b43a309fcc23ee1229786aaab95273 Author: Benjamin Marwell <bmarw...@apache.org> AuthorDate: Wed Oct 13 22:31:14 2021 +0200 add twittercard --- jbake/data/authors.yaml | 13 +++++++++++++ jbake/templates/header.ftl | 8 ++++++++ 2 files changed, 21 insertions(+) diff --git a/jbake/data/authors.yaml b/jbake/data/authors.yaml new file mode 100644 index 0000000..70bb333 --- /dev/null +++ b/jbake/data/authors.yaml @@ -0,0 +1,13 @@ +authors: + + Benjamin Marwell: + twitter: "@bmarwell" + + Brian Demers: + twitter: "@briandemers" + + François Papon: + twitter: "@fpapon2" + + Les Hazlewood: + twitter: "@lhazlewood" diff --git a/jbake/templates/header.ftl b/jbake/templates/header.ftl index a260910..4e84215 100644 --- a/jbake/templates/header.ftl +++ b/jbake/templates/header.ftl @@ -57,6 +57,14 @@ <#if (content.date)??> <meta property="article:published_time" content="${content.date?date?string.iso}"/> </#if> + <meta name="twitter:card" content="summary" /> + <meta name="twitter:site" content="@ApacheShiro" /> + <#if (content.author!"") != ""> + <#assign authors = data.get('authors.yaml').authors> + <#if (authors[content.author?trim].twitter)??> + <meta name="twitter:creator" content="${authors[content.author].twitter}" /> + </#if> + </#if> <#-- fall through --> <#case "page"> <meta property="og:type" content="article"/>