_includes/appscms/head/bloghead.html in appscms-tools-theme-3.9.7 vs _includes/appscms/head/bloghead.html in appscms-tools-theme-3.9.8

- old
+ new

@@ -1,7 +1,16 @@ <head> - {%- assign pagedescriptionlength = page.description | split: ' ' -%} {%- if + {%- if page.layout == "appscms-authors" or page.layout == "appscms-author" -%} + {% assign posts = site.posts | where_exp:"post","post.url != page.url" %} {% + for post in posts %} {%- include /authors/authors.html -%} {% if authorName + contains page.authorName %} {% capture author_info %}{% assign author = + authorName %}{% assign bio = bio %}{{ author }} - {{ bio }}{% endcapture %} {% + capture author_name %}{% assign author = authorName %}{{ author }}{% + endcapture %} {% assign authorPageTitle = author_info %} {% assign author_name + = author_name %} {%- endif -%} {% endfor %} {%- assign title = newtitle -%} + {%- assign description = pagedescription-%} {%- else -%} {%- assign + pagedescriptionlength = page.description | split: ' ' -%} {%- if pagedescriptionlength.size > 5 -%} {%- assign pagedescriptionlength = page.description | split: ' ' -%} {%- assign pagedescription = page.description -%} {%- endif -%} {% assign favicon = site.favicon %} {%- assign seo_description = pagedescription | default: page.content | markdownify | strip_html | truncatewords: 50 | default: page.excerpt | default: @@ -23,27 +32,56 @@ else -%} {% assign word = operation %} {%- if forloop.last -%} {% assign pagedescription = pagedescription | append : word %} {%- else -%} {% assign pagedescription = pagedescription | append : word %} {% assign pagedescription = pagedescription | append : " " %} {%- endif -%} {%- endif -%} {% endfor %} {%- assign title = newtitle -%} {%- assign description = pagedescription-%} + {%- endif -%} <meta charset="UTF-8" /> <link rel="shortcut icon" href="{{favicon}}" /> <link rel="canonical" href="{{site.url | append: page.url}}" /> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" /> <meta name="keywords" content="{{site.keyboard}}" /> + {%- if page.layout == "appscms-authors" or page.layout == "appscms-author" -%} + + <meta + name="description" + content="{{ authorPageTitle | slice: 0, 155 | default: page.description }}" + /> + <meta + name="og:description" + content="{{ authorPageTitle | slice: 0, 155 | default: page.description}}" + /> + <meta + property="og:title" + content="{{ authorPageTitle | default: page.title }}" + /> + + {%- else -%} <meta name="description" content="{{ seo_description | slice: 0, 155 }}" /> <meta name="og:description" content="{{ seo_description | slice: 0, 155 }}" /> <meta property="og:title" content="{{ title | default: site.title }}" /> + {%- endif -%} + <meta property="og:type" content="{{og_type}}" /> <meta property="og:locale" content="en_US" /> <meta property="og:site_name" content="{{site.name}}" /> <meta property="og:url" content="{{site.url | append: page.url}}" /> - <meta name="author" content="{{ site.author_name }}" /> + {%- if page.layout == "appscms-authors" -%} + <meta name="author" content="Authors" /> + {%- else -%} + <meta + name="author" + content="{{ author | default: page.author| default: site.author_name}}" + /> + {%- endif -%} {%- if page.layout == "appscms-author" -%} + <title>{{authorPageTitle | default: page.title}}</title> + {%- else -%} <title>{{title}}</title> + {%- endif -%} <link href="https://fonts.googleapis.com/css2?family=Open+Sans&display=swap" rel="stylesheet" />