_includes/appscms/head/bloghead.html in appscms-tools-theme-4.2.7 vs _includes/appscms/head/bloghead.html in appscms-tools-theme-4.2.8

- old
+ new

@@ -1,14 +1,45 @@ <head> {%- 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 -%} + {%- include /authors/authors.html -%} + {%- assign pageAuthorName = page.authorName | split: " " -%} + {%- assign pageAuthorNameFirst = pageAuthorName.first | downcase -%} + {%- assign collectionData = [pageAuthorNameFirst] -%} + {%- for item in collectionData -%} + {%- if forloop.index == 1 -%} + {%- assign authorName = item -%} + {%- endif -%} + {%- if forloop.index == 2 -%} + {%- assign authorPick = item -%} + {%- endif -%} + {%- if forloop.index == 3 -%} + {%- assign bio = item -%} + {%- endif -%} + {%- if forloop.index == 4 -%} + {%- assign authorTwitter = item -%} + {%- endif -%} + {%- endfor -%} + + + {% 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 %} + + + {%- if authorName -%} + {%- assign title = authorName -%} + {%- else -%} + {%- assign title = "Our Authors" -%} + {%- endif -%} + + + {%- 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 %} {%- @@ -37,29 +68,17 @@ {%- 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="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 }}" - /> + <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 }}" /> @@ -70,106 +89,39 @@ <meta property="og:site_name" content="{{site.name}}" /> <meta property="og:url" content="{{site.url | append: page.url}}" /> {%- if page.layout == "appscms-authors" -%} <meta name="author" content="Authors" /> {%- else -%} - <meta - name="author" - content="{{ author | default: page.author| default: site.author_name}}" - /> + <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" - /> - <link - rel="stylesheet" - href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/all.min.css" - {%- - if - site.crossorigin - -%} - crossorigin - {%- - endif - -%} - /> - <link - rel="stylesheet" - href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/css/bootstrap.min.css" - {%- - if - site.crossorigin - -%} - crossorigin - {%- - endif - -%} - /> + <link href="https://fonts.googleapis.com/css2?family=Open+Sans&display=swap" rel="stylesheet" /> + <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/all.min.css" {%- if + site.crossorigin -%} crossorigin {%- endif -%} /> + <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/css/bootstrap.min.css" {%- if + site.crossorigin -%} crossorigin {%- endif -%} /> {% include adsense/adsense.html %} - <link - rel="stylesheet" - href="/assets/css/appscms-variables.css" - {%- - if - site.crossorigin - -%} - crossorigin - {%- - endif - -%} - /> - <link - rel="stylesheet" - href="/assets/css/appscms-theme.css" - {%- - if - site.crossorigin - -%} - crossorigin - {%- - endif - -%} - /> - <link - rel="stylesheet" - href="{{'/assets/css/appscms-blog.css' | relative_url }}" - {%- - if - site.crossorigin - -%} - crossorigin - {%- - endif - -%} - /> + <link rel="stylesheet" href="/assets/css/appscms-variables.css" {%- if site.crossorigin -%} crossorigin {%- endif + -%} /> + <link rel="stylesheet" href="/assets/css/appscms-theme.css" {%- if site.crossorigin -%} crossorigin {%- endif -%} /> + <link rel="stylesheet" href="{{'/assets/css/appscms-blog.css' | relative_url }}" {%- if site.crossorigin -%} + crossorigin {%- endif -%} /> {%- if page.layout == "devtool-blog" -%} <link rel="stylesheet" href="/assets/css/devtool-main.css" /> {%- endif -%} {%- if page.devtoolstyles -%} <link rel="stylesheet" href="/assets/css/devtool-main.css" /> {%- endif -%} {%- if page.layout == "blog-1" -%} - <link - rel="stylesheet" - href="{{'/assets/css/blog-1.css' | relative_url }}" - {%- - if - site.crossorigin - -%} - crossorigin - {%- - endif - -%} - /> + <link rel="stylesheet" href="{{'/assets/css/blog-1.css' | relative_url }}" {%- if site.crossorigin -%} crossorigin {%- + endif -%} /> {%- endif -%} {%- include google-analytics.html -%} {% if jekyll.environment == 'production' and site.monumetricId %} <script> const autoLoadDuration = 5; //In Seconds const eventList = [ @@ -199,16 +151,11 @@ document.querySelectorAll("script[delay]").forEach(function (scriptTag) { scriptTag.setAttribute("src", scriptTag.getAttribute("delay")); }); } </script> - <script - type="text/javascript" - defer - delay="{{site.monumetricId}}" - data-cfasync="false" - ></script> + <script type="text/javascript" defer delay="{{site.monumetricId}}" data-cfasync="false"></script> {% endif %} {% if jekyll.environment == 'development' and site.monumetricId %} <script> const autoLoadDuration = 5; //In Seconds const eventList = [ "keydown", @@ -240,6 +187,6 @@ } </script> <script type="text/javascript" delay="{{site.monumetricId}}"></script> {% endif %} -</head> +</head> \ No newline at end of file