Selaa lähdekoodia

Merge https://github.com/gcushen/hugo-academic

Xi Ruoyao 5 vuotta sitten
vanhempi
commit
620487f08e
100 muutettua tiedostoa jossa 1534 lisäystä ja 648 poistoa
  1. 26 0
      .github/stale.yml
  2. 17 0
      .github/support.md
  3. 8 10
      README.md
  4. 6 0
      archetypes/talk/index.md
  5. 13 6
      assets/js/academic-search.js
  6. 72 20
      assets/js/academic.js
  7. 7 3
      assets/js/mathjax-config.js
  8. 14 50
      assets/sass/academic/_content.scss
  9. 0 9
      assets/sass/academic/_dark.scss
  10. 1 0
      assets/sass/academic/_integrations.scss
  11. 15 1
      assets/sass/academic/_root.scss
  12. 14 8
      assets/sass/academic/_search.scss
  13. 1 0
      assets/sass/main.scss
  14. 1 1
      data/academic.toml
  15. 0 4
      data/fonts/classic.toml
  16. 1 5
      data/fonts/minimal.toml
  17. 11 0
      data/fonts/mr_robot.toml
  18. 0 4
      data/fonts/rose.toml
  19. 24 0
      data/page_sharer.toml
  20. 2 0
      data/themes/1950s.toml
  21. 2 0
      data/themes/coffee.toml
  22. 1 1
      data/themes/minimal.toml
  23. 18 0
      data/themes/mr_robot.toml
  24. 8 4
      exampleSite/config/_default/config.toml
  25. 2 2
      exampleSite/config/_default/menus.toml
  26. 141 58
      exampleSite/config/_default/params.toml
  27. 1 1
      exampleSite/content/home/hero.md
  28. 1 0
      exampleSite/content/home/projects.md
  29. 12 0
      exampleSite/content/home/tags.md
  30. BIN
      exampleSite/content/post/getting-started/gallery/theme-1950s.png
  31. BIN
      exampleSite/content/post/getting-started/gallery/theme-apogee.png
  32. BIN
      exampleSite/content/post/getting-started/gallery/theme-coffee-playfair.png
  33. BIN
      exampleSite/content/post/getting-started/gallery/theme-dark.png
  34. BIN
      exampleSite/content/post/getting-started/gallery/theme-default.png
  35. BIN
      exampleSite/content/post/getting-started/gallery/theme-forest.png
  36. BIN
      exampleSite/content/post/getting-started/gallery/theme-ocean.png
  37. BIN
      exampleSite/content/post/getting-started/gallery/theme-strawberry.png
  38. 22 46
      exampleSite/content/post/getting-started/index.md
  39. 67 29
      exampleSite/content/post/jupyter/index.ipynb
  40. 31 26
      exampleSite/content/post/jupyter/index.md
  41. 0 0
      exampleSite/content/post/jupyter/index_1_0.png
  42. BIN
      exampleSite/content/post/writing-technical-content/featured.jpg
  43. 199 0
      exampleSite/content/post/writing-technical-content/index.md
  44. 2 0
      exampleSite/content/privacy.md
  45. 9 1
      exampleSite/content/talk/example/index.md
  46. 15 0
      exampleSite/content/terms.md
  47. 5 3
      i18n/de.yaml
  48. 3 0
      i18n/en.yaml
  49. 44 44
      i18n/ru.yaml
  50. 96 1
      i18n/zh.yaml
  51. BIN
      images/themes.png
  52. 1 1
      layouts/404.html
  53. 1 2
      layouts/_default/baseof.html
  54. 1 1
      layouts/_default/list.html
  55. 18 13
      layouts/_default/rss.xml
  56. 9 7
      layouts/_default/single.html
  57. 2 2
      layouts/authors/list.html
  58. 1 1
      layouts/authors/terms.html
  59. 12 1
      layouts/index.html
  60. 19 0
      layouts/index.webmanifest
  61. 6 2
      layouts/partials/comments.html
  62. 2 0
      layouts/partials/comments/commento.html
  63. 22 0
      layouts/partials/comments/disqus.html
  64. 1 1
      layouts/partials/cookie_consent.html
  65. 8 4
      layouts/partials/docs_layout.html
  66. 1 1
      layouts/partials/docs_sidebar.html
  67. 17 0
      layouts/partials/functions/get_event_dates.html
  68. 51 47
      layouts/partials/functions/parse_theme.html
  69. 60 0
      layouts/partials/jsonld/article.html
  70. 29 0
      layouts/partials/jsonld/business.html
  71. 60 0
      layouts/partials/jsonld/event.html
  72. 23 0
      layouts/partials/jsonld/main.html
  73. 14 0
      layouts/partials/jsonld/website.html
  74. 12 24
      layouts/partials/li_card.html
  75. 5 5
      layouts/partials/li_citation.html
  76. 21 25
      layouts/partials/li_compact.html
  77. 20 20
      layouts/partials/li_list.html
  78. 2 3
      layouts/partials/navbar.html
  79. 8 8
      layouts/partials/page_author.html
  80. 7 0
      layouts/partials/page_edit.html
  81. 33 36
      layouts/partials/page_header.html
  82. 6 8
      layouts/partials/page_metadata.html
  83. 1 1
      layouts/partials/page_metadata_authors.html
  84. 16 2
      layouts/partials/portfolio_li_card.html
  85. 6 0
      layouts/partials/portfolio_li_compact.html
  86. 6 0
      layouts/partials/portfolio_li_list.html
  87. 18 12
      layouts/partials/portfolio_li_showcase.html
  88. 0 15
      layouts/partials/project_li_list.html
  89. 1 1
      layouts/partials/search.html
  90. 8 2
      layouts/partials/site_footer.html
  91. 22 13
      layouts/partials/site_head.html
  92. 9 10
      layouts/partials/site_js.html
  93. 10 12
      layouts/partials/widgets/about.html
  94. 1 1
      layouts/partials/widgets/accomplishments.html
  95. 47 25
      layouts/partials/widgets/contact.html
  96. 1 1
      layouts/partials/widgets/experience.html
  97. 1 1
      layouts/partials/widgets/featured.html
  98. 1 1
      layouts/partials/widgets/featurette.html
  99. 1 1
      layouts/partials/widgets/hero.html
  100. 1 1
      layouts/partials/widgets/pages.html

+ 26 - 0
.github/stale.yml

@@ -0,0 +1,26 @@
+# Number of days of inactivity before an issue becomes stale
+daysUntilStale: 30
+# Number of days of inactivity before a stale issue is closed
+daysUntilClose: 7
+# Issues with these labels will never be considered stale
+exemptLabels:
+  - keep
+  - enhancement
+  - bug
+  - documentation
+  - security
+# Label to use when marking an issue as stale
+staleLabel: stale
+# Comment to post when marking an issue as stale. Set to `false` to disable
+markComment: >
+  This issue has been automatically marked as stale because it has not had any
+  recent activity. The resources of the Academic team are limited, and so we are asking for your help.
+
+  If this is a **bug** and you can still reproduce this error on the <code>master</code> branch, please reply with all of the information you have about it in order to keep the issue open.
+
+  If this is a **feature request**, and you feel that it is still relevant and valuable, please tell us why.
+
+  This issue will automatically close soon if no further activity occurs. Thank you for your contributions.
+
+# Comment to post when closing a stale issue. Set to `false` to disable
+closeComment: false

+ 17 - 0
.github/support.md

@@ -0,0 +1,17 @@
+# How to get support for Academic 👨‍💬👩‍💬
+
+For **help** and **questions** please join our **[community chat](https://spectrum.chat/academic)** or use the **[forum](https://discourse.gohugo.io/c/themes)** 🚑.
+
+Please **_do not_** raise an issue on GitHub.
+
+Also, you can search and browse the extensive [Academic](https://sourcethemes.com/academic/docs/) and [Hugo](https://gohugo.io/documentation/) **documentation**.
+
+For questions on _Blogdown_, please reach out to the [Blogdown community](https://github.com/rstudio/blogdown).
+
+Issues which are not bug reports or feature requests will be closed.
+
+## Why not GitHub?
+
+GitHub is our project management tool, it's the place where our volunteers contribute. We use the issue list to keep track of bugs and new features that we are working on. We do this openly for transparency.
+
+With the chat and forum, you can leverage the knowledge of our wider community to get help with any problems you are having with Academic. Please keep in mind that Academic is Free Open Source Software (FOSS), and free support is provided by the goodwill of our wonderful community members.

+ 8 - 10
README.md

@@ -42,22 +42,20 @@
 - **Stand Out** - Bring your site to life with animation, parallax backgrounds, and scroll effects
 - **One-Click Deployment** - No servers. No databases. Only files.
 
-## Color Themes
+## Themes
 
-Academic comes with **day (light) and night (dark) mode** built-in. Click the sun/moon icon in the top right of the [Demo](https://academic-demo.netlify.com/) to see it in action!
+Academic comes with **automatic day (light) and night (dark) mode** built-in. Alternatively, click the sun/moon icon in the top right of the [Demo](https://academic-demo.netlify.com/) to set your preferred mode!
 
-Choose a stunning color and font theme for your site. Themes are fully customizable and include:
+Choose a stunning theme for your site and [customize it](https://sourcethemes.com/academic/docs/customization/#custom-theme) to your liking:
 
-| `default` | `ocean` | `forest` | `dark` |
-| --- | --- | --- | --- |
-| ![default theme](https://raw.githubusercontent.com/gcushen/hugo-academic/master/images/theme-default.png) | ![ocean theme](https://raw.githubusercontent.com/gcushen/hugo-academic/master/images/theme-ocean.png) | ![forest theme](https://raw.githubusercontent.com/gcushen/hugo-academic/master/images/theme-forest.png) | ![dark theme](https://raw.githubusercontent.com/gcushen/hugo-academic/master/images/theme-dark.png) |
-
-| `apogee` | `1950s` | `coffee` | `strawberry` |
-| --- | --- | --- | --- |
-| ![apogee theme](https://raw.githubusercontent.com/gcushen/hugo-academic/master/images/theme-apogee.png) | ![1950s theme](https://raw.githubusercontent.com/gcushen/hugo-academic/master/images/theme-1950s.png) | ![coffee theme](https://raw.githubusercontent.com/gcushen/hugo-academic/master/images/theme-coffee-playfair.png) | ![cupcake theme](https://raw.githubusercontent.com/gcushen/hugo-academic/master/images/theme-strawberry.png) |
+[![Themes](https://raw.githubusercontent.com/gcushen/hugo-academic/master/images/themes.png)](https://sourcethemes.com/academic/themes/)
 
 [Browse more themes...](https://sourcethemes.com/academic/themes/)
 
+## The Future of Technical Content Writing
+
+[![Writing technical content](https://sourcethemes.com/academic/img/docs/writing-technical-content.gif)](https://academic-demo.netlify.com/post/writing-technical-content/)
+
 ## Ecosystem
 
 * **[Academic Admin](https://github.com/sourcethemes/academic-admin):** An admin tool to import publications from BibTeX or import assets for an offline site

+ 6 - 0
archetypes/talk/index.md

@@ -5,6 +5,12 @@ title: "{{ replace .Name "-" " " | title }}"
 event:
 event_url:
 location:
+address:
+  street:
+  city:
+  region:
+  postcode:
+  country:
 summary:
 abstract:
 

+ 13 - 6
assets/js/academic-search.js

@@ -43,8 +43,8 @@ function getSearchQuery(name) {
 
 // Set query in URI without reloading the page.
 function updateURL(url) {
-  if (history.pushState) {
-    window.history.pushState({path:url}, '', url);
+  if (history.replaceState) {
+    window.history.replaceState({path:url}, '', url);
   }
 }
 
@@ -84,10 +84,18 @@ function searchAcademic(query, fuse) {
 // Parse search results.
 function parseResults(query, results) {
   $.each( results, function(key, value) {
-    let content = value.item.content;
+    let content_key = value.item.section;
+    let content = "";
     let snippet = "";
     let snippetHighlights = [];
 
+    // Show abstract in results for content types where the abstract is often the primary content.
+    if (["publication", "talk"].includes(content_key)) {
+      content = value.item.summary;
+    } else {
+      content = value.item.content;
+    }
+
     if ( fuseOptions.tokenize ) {
       snippetHighlights.push(query);
     } else {
@@ -102,14 +110,13 @@ function parseResults(query, results) {
     }
 
     if (snippet.length < 1) {
-      snippet += content.substring(0, summaryLength*2);
+      snippet += value.item.summary;  // Alternative fallback: `content.substring(0, summaryLength*2);`
     }
 
     // Load template.
-    var template = $('#search-hit-fuse-template').html();
+    let template = $('#search-hit-fuse-template').html();
 
     // Localize content types.
-    let content_key = value.item.section;
     if (content_key in content_type) {
       content_key = content_type[content_key];
     }

+ 72 - 20
assets/js/academic.js

@@ -11,9 +11,13 @@
    * Responsive scrolling for URL hashes.
    * --------------------------------------------------------------------------- */
 
-  // Dynamically get responsive navigation bar offset.
-  let $navbar = $('.navbar');
-  let navbar_offset = $navbar.innerHeight();
+  // Dynamically get responsive navigation bar height for offsetting Scrollspy.
+  function getNavBarHeight() {
+    let $navbar = $('.navbar');
+    let navbar_offset = $navbar.innerHeight();
+    console.debug('Navbar height: ' + navbar_offset);
+    return navbar_offset;
+  }
 
   /**
    * Responsive hash scrolling.
@@ -23,18 +27,22 @@
    */
   function scrollToAnchor(target) {
     // If `target` is undefined or HashChangeEvent object, set it to window's hash.
-    target = (typeof target === 'undefined' || typeof target === 'object') ? window.location.hash : target;
-    // Escape colons from IDs, such as those found in Markdown footnote links.
-    target = target.replace(/:/g, '\\:');
+    // Decode the hash as browsers can encode non-ASCII characters (e.g. Chinese symbols).
+    target = (typeof target === 'undefined' || typeof target === 'object') ? decodeURIComponent(window.location.hash) : target;
+    // Escape special chars from IDs, such as colons found in Markdown footnote links.
+    target = '#' + $.escapeSelector(target.substring(1));  // Previously, `target = target.replace(/:/g, '\\:');`
 
     // If target element exists, scroll to it taking into account fixed navigation bar offset.
     if($(target).length) {
+      let elementOffset = Math.ceil($(target).offset().top - getNavBarHeight());  // Round up to highlight right ID!
       $('body').addClass('scrolling');
       $('html, body').animate({
-        scrollTop: $(target).offset().top - navbar_offset
+        scrollTop: elementOffset
       }, 600, function () {
         $('body').removeClass('scrolling');
       });
+    }else{
+      console.warn('Cannot scroll to '+target+'. ID not found!');
     }
   }
 
@@ -43,16 +51,16 @@
     let $body = $('body');
     let data = $body.data('bs.scrollspy');
     if (data) {
-      data._config.offset = navbar_offset;
+      data._config.offset = getNavBarHeight();
       $body.data('bs.scrollspy', data);
       $body.scrollspy('refresh');
     }
   }
 
   function removeQueryParamsFromUrl() {
-    if (window.history.pushState) {
+    if (window.history.replaceState) {
       let urlWithoutSearchParams = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.hash;
-      window.history.pushState({path:urlWithoutSearchParams}, '', urlWithoutSearchParams);
+      window.history.replaceState({path:urlWithoutSearchParams}, '', urlWithoutSearchParams);
     }
   }
 
@@ -74,8 +82,15 @@
 
       // Use jQuery's animate() method for smooth page scrolling.
       // The numerical parameter specifies the time (ms) taken to scroll to the specified hash.
+      let elementOffset = Math.ceil($(hash).offset().top - getNavBarHeight());  // Round up to highlight right ID!
+
+      // Uncomment to debug.
+      // let scrollTop = $(window).scrollTop();
+      // let scrollDelta = (elementOffset - scrollTop);
+      // console.debug('Scroll Delta: ' + scrollDelta);
+
       $('html, body').animate({
-        scrollTop: $(hash).offset().top - navbar_offset
+        scrollTop: elementOffset
       }, 800);
     }
   });
@@ -300,10 +315,27 @@
 
   function toggleSearchDialog() {
     if ($('body').hasClass('searching')) {
+      // Clear search query and hide search modal.
       $('[id=search-query]').blur();
-      $('body').removeClass('searching');
+      $('body').removeClass('searching compensate-for-scrollbar');
+
+      // Remove search query params from URL as user has finished searching.
       removeQueryParamsFromUrl();
+
+      // Prevent fixed positioned elements (e.g. navbar) moving due to scrollbars.
+      $('#fancybox-style-noscroll').remove();
     } else {
+      // Prevent fixed positioned elements (e.g. navbar) moving due to scrollbars.
+      if ( !$('#fancybox-style-noscroll').length && document.body.scrollHeight > window.innerHeight ) {
+        $('head').append(
+          '<style id="fancybox-style-noscroll">.compensate-for-scrollbar{margin-right:' +
+          (window.innerWidth - document.documentElement.clientWidth) +
+          'px;}</style>'
+        );
+        $('body').addClass('compensate-for-scrollbar');
+      }
+
+      // Show search modal.
       $('body').addClass('searching');
       $('.search-results').css({opacity: 0, visibility: 'visible'}).animate({opacity: 1}, 200);
       $('#search-query').focus();
@@ -372,12 +404,33 @@
     $('#TableOfContents li').addClass('nav-item');
     $('#TableOfContents li a').addClass('nav-link');
 
-    // Set dark mode if user chose it.
-    let default_mode = 0;
+    // Fix Mmark task lists (remove bullet points).
+    $("input[type='checkbox'][disabled]").parents('ul').addClass('task-list');
+
+    // Fix Mermaid.js clash with Highlight.js.
+    let mermaids = [];
+    [].push.apply(mermaids, document.getElementsByClassName('language-mermaid'));
+    for (i = 0; i < mermaids.length; i++) {
+      $(mermaids[i]).unwrap('pre');  // Remove <pre> wrapper.
+      $(mermaids[i]).replaceWith(function(){
+        // Convert <code> block to <div> and add `mermaid` class so that Mermaid will parse it.
+        return $("<div />").append($(this).contents()).addClass('mermaid');
+      });
+    }
+
+    // Get theme variation (day/night).
+    let defaultThemeVariation;
     if ($('body').hasClass('dark')) {
-      default_mode = 1;
+      // The `color_theme` of the site is dark.
+      defaultThemeVariation = 1;
+    } else if ($('.js-dark-toggle').length && window.matchMedia('(prefers-color-scheme: dark)').matches) {
+      // The visitor prefers dark themes and switching to the dark variation is allowed by admin.
+      defaultThemeVariation = 1;
+    } else {
+      // Default to day (light) theme.
+      defaultThemeVariation = 0;
     }
-    let dark_mode = parseInt(localStorage.getItem('dark_mode') || default_mode);
+    let dark_mode = parseInt(localStorage.getItem('dark_mode') || defaultThemeVariation);
 
     // Is code highlighting enabled in site config?
     const codeHlEnabled = $('link[title=hl-light]').length > 0;
@@ -419,6 +472,9 @@
    * --------------------------------------------------------------------------- */
 
   $(window).on('load', function() {
+    // Re-initialize Scrollspy with dynamic navbar height offset.
+    fixScrollspy();
+
     if (window.location.hash) {
       // When accessing homepage from another page and `#top` hash is set, show top of page (no hash).
       if (window.location.hash == "#top") {
@@ -432,10 +488,6 @@
       }
     }
 
-    // Initialize Scrollspy.
-    let $body = $('body');
-    $body.scrollspy({offset: navbar_offset });
-
     // Call `fixScrollspy` when window is resized.
     let resizeTimer;
     $(window).resize(function() {

+ 7 - 3
assets/js/mathjax-config.js

@@ -1,6 +1,10 @@
 window.MathJax = {
-  CommonHTML: { linebreaks: { automatic: true } },
-  tex2jax: { inlineMath: [ ['$', '$'], ['\\(','\\)'] ], displayMath: [ ['$$','$$'], ['\\[', '\\]'] ], processEscapes: false },
-  TeX: { noUndefined: { attributes: { mathcolor: 'red', mathbackground: '#FFEEEE', mathsize: '90%' } } },
+  CommonHTML: {linebreaks: {automatic: true}},
+  tex2jax: {
+    inlineMath: [['$', '$'], ['\\(', '\\)']],
+    displayMath: [['$$', '$$'], ['\\[', '\\]']],
+    processEscapes: false
+  },
+  TeX: {noUndefined: {attributes: {mathcolor: 'red', mathbackground: '#FFEEEE', mathsize: '90%'}}},
   messageStyle: 'none'
 };

+ 14 - 50
assets/sass/academic/_content.scss

@@ -13,14 +13,6 @@ article {
   margin: 0 auto 0 auto;
 }
 
-.split-header {
-  margin-bottom: 2rem;
-}
-
-.split-header .share-box {
-  float: left;
-}
-
 .page-subtitle {
   font-size: 1.15rem;
   color: rgba(0,0,0,.54);
@@ -31,25 +23,6 @@ article {
   color: rgba(255,255,255,0.54);
 }
 
-.split-header .page-subtitle {
-  margin-bottom: 1.5rem;
-}
-
-.split-header-content {
-  max-width: 612px;
-  width: 100%;
-  padding: 60px 60px 32px 0;
-  margin-left: auto;
-  -webkit-box-sizing: border-box;
-  box-sizing: border-box;
-}
-
-.split-header-image {
-  position: relative; /* Required for caption positioning */
-  clear: both;
-  max-width: 580px;
-}
-
 .article-header {
   position: relative; /* Required for caption positioning */
   clear: both;
@@ -60,30 +33,17 @@ article {
   height: auto;
 }
 
-.featured-image {
-  width: 100%;
-  background-position: left;
-  background-origin: border-box;
-  background-size: cover;
-  height: 60vh;
-  min-height: 500px;
-  -webkit-box-flex: 1;
-  -webkit-flex: 1 0 auto;
-  -ms-flex: 1 0 auto;
-  flex: 1 0 auto
-}
-
-@media screen and (max-width: 1199px) {
-  .featured-image {
-    min-height: 400px;
-    height: auto;
-  }
+.featured-image-wrapper {
+  position: relative;
+  padding-left: 0; /* Override container padding. */
+  padding-right: 0; /* Override container padding. */
 }
 
-@media screen and (max-width: 767px) {
-  .featured-image {
-    min-height: 300px;
-  }
+.featured-image {
+  position: relative;
+  width: 100%;
+  display: block;
+  margin: 0 auto;
 }
 
 .article-header-caption {
@@ -121,7 +81,7 @@ article {
 }
 
 .dark .text-muted {
-  color: rgba(255,255,255,0.54);
+  color: rgba(255,255,255,0.54) !important;
 }
 
 .article-metadata {
@@ -158,6 +118,10 @@ article .article-metadata {
   color: $sta-primary;
 }
 
+.article-categories {
+  white-space: nowrap; /* Keep category icon on same line as category links, otherwise context lost. */
+}
+
 .middot-divider {
   padding-right: .45em;
   padding-left: .45em;

+ 0 - 9
assets/sass/academic/_dark.scss

@@ -127,15 +127,6 @@ body.dark,
   color: rgb(248, 248, 242);
 }
 
-/* Algolia search input */
-.dark .ais-search-box--input {
-  background-color: rgb(68, 71, 90);
-}
-
-.dark #search-query {
-  background-color: rgb(68, 71, 90);
-}
-
 .dark .badge-light {
   color: rgba(255, 255, 255, .68);
   background: rgba(255, 255, 255, .2);

+ 1 - 0
assets/sass/academic/_integrations.scss

@@ -2,4 +2,5 @@
 div.mermaid {
   width: 100%;
   text-align: center;
+  margin-bottom: 1rem;
 }

+ 15 - 1
assets/sass/academic/_root.scss

@@ -55,6 +55,10 @@ ul, ol, dl {
   margin-bottom: 1rem;
 }
 
+ul.task-list {
+  list-style: none;
+}
+
 /* Navigation bar text */
 .navbar-light {
   font-family: $sta-font-nav, sans-serif;
@@ -525,9 +529,16 @@ table > tbody > tr:hover > th {
 }
 
 /*************************************************
- *  Alerts
+ *  Article Alerts (Shortcode) and Asides (Mmark)
  **************************************************/
 
+/* Style asides as Bootstrap alerts. */
+.article-style aside {
+  @extend .alert;
+}
+
+/* Asides use <p> block element whereas alerts use <div>. */
+.article-style aside p,
 div.alert > div {
   position: relative;
   display: block;
@@ -545,6 +556,7 @@ div.alert div > :last-child {
   margin-bottom: 0;
 }
 
+.article-style aside p::before,
 div.alert > div:first-child::before {
   position: absolute;
   top: -0.5rem;
@@ -565,12 +577,14 @@ div.alert-warning > div:first-child::before {
   content: '\f071';
 }
 
+.article-style aside a,
 div.alert a {
   color: currentColor;
   text-decoration: none;
   border-bottom: solid 1px currentColor;
 }
 
+.article-style aside,
 .alert-note {
   color: #12537e;
   background-color: #f6fbfe;

+ 14 - 8
assets/sass/academic/_search.scss

@@ -17,7 +17,7 @@
 }
 
 .dark .search-results {
-  background-color: rgb(40, 42, 54);
+  background-color: $sta-dark-background;
 }
 
 .searching {
@@ -47,19 +47,14 @@
 .search-header {
   position: -webkit-sticky;
   position: sticky;
-  top: 70px;  /* Navbar height. */
+  top: 0;
   background-color: $sta-background;
   padding-top: 2rem;
   padding-bottom: 1rem;
 }
-@media screen and (max-width: 1200px) {
-  .search-header {
-    top: 50px;  /* Navbar height. */
-  }
-}
 
 .dark .search-header {
-  background-color: rgb(40, 42, 54);
+  background-color: $sta-dark-background;
 }
 
 .search-header h1 {
@@ -129,3 +124,14 @@
   border-color: $sta-primary;
   box-shadow: 0 0 0 .2rem $sta-primary-light;
 }
+
+/* DARK themed components. */
+
+/* Algolia search input */
+.dark .ais-search-box--input {
+  background-color: $sta-dark-background;;
+}
+
+.dark #search-query {
+  background-color: $sta-dark-background;;
+}

+ 1 - 0
assets/sass/main.scss

@@ -1,5 +1,6 @@
 {{- $scr := .Scratch -}}
 {{- $site := $scr.Get "site" -}}
+{{/* Don't use partialCached as can error when admin changes theme config whilst `hugo server` is running. */}}
 {{- partial "functions/parse_theme" . -}}
 
 $sta-darken-percentage: 10%;

+ 1 - 1
data/academic.toml

@@ -1,3 +1,3 @@
 # Academic
 
-version = "4.3.1"
+version = "4.5.0"

+ 0 - 4
data/fonts/classic.toml

@@ -9,7 +9,3 @@ heading_font = "Lato"
 body_font = "Merriweather"
 nav_font = "Lato"
 mono_font = "Roboto Mono"
-
-# Font size
-font_size = "20"
-font_size_small = "16"

+ 1 - 5
data/fonts/default.toml → data/fonts/minimal.toml

@@ -1,5 +1,5 @@
 # Font style metadata
-name = "Default"
+name = "Minimal"
 
 # Optional Google font URL
 google_fonts = "Montserrat:400,700|Roboto:400,400italic,700|Roboto+Mono"
@@ -9,7 +9,3 @@ heading_font = "Montserrat"
 body_font = "Roboto"
 nav_font = "Roboto"
 mono_font = "Roboto Mono"
-
-# Font size
-font_size = "20"
-font_size_small = "16"

+ 11 - 0
data/fonts/mr_robot.toml

@@ -0,0 +1,11 @@
+# Font style metadata
+name = "Mr Robot"
+
+# Optional Google font URL
+google_fonts = "B612+Mono:400,700|Orbitron:400,700"
+
+# Font families
+heading_font = "Orbitron"
+body_font = "B612 Mono"
+nav_font = "B612 Mono"
+mono_font = "B612 Mono"

+ 0 - 4
data/fonts/rose.toml

@@ -9,7 +9,3 @@ heading_font = "Lora"
 body_font = "Roboto"
 nav_font = "Lora"
 mono_font = "Cutive Mono"
-
-# Font size
-font_size = "20"
-font_size_small = "16"

+ 24 - 0
data/page_sharer.toml

@@ -56,3 +56,27 @@
   icon_pack = "fab"
   icon = "reddit-alien"
   enable = false
+
+[[buttons]]
+  id = "pinterest"
+  url = "https://pinterest.com/pin/create/link/?url={url}&description={title}"
+  title = "Pinterest"
+  icon_pack = "fab"
+  icon = "pinterest"
+  enable = false
+
+[[buttons]]
+  id = "xing"
+  url = "https://www.xing.com/spi/shares/new?url={url}&title={title}"
+  title = "Xing"
+  icon_pack = "fab"
+  icon = "xing"
+  enable = false
+
+[[buttons]]
+  id = "tumblr"
+  url = "https://www.tumblr.com/widgets/share/tool?canonicalUrl={url}&title={title}"
+  title = "Tumblr"
+  icon_pack = "fab"
+  icon = "tumblr"
+  enable = false

+ 2 - 0
data/themes/1950s.toml

@@ -17,3 +17,5 @@ menu_title = "#fff"
 background = "#EAE7D6"
 home_section_odd = "#EAE7D6"
 home_section_even = "#EAE7D6"
+
+font = "rose"

+ 2 - 0
data/themes/coffee.toml

@@ -17,3 +17,5 @@ menu_title = "#fff"
 background = "hsla(16, 24%, 85%, 1)"
 home_section_odd = "hsla(16, 24%, 85%, 1)"
 home_section_even = "hsla(16, 24%, 80%, 1)"
+
+font = "rose"

+ 1 - 1
data/themes/default.toml → data/themes/minimal.toml

@@ -1,5 +1,5 @@
 # Theme metadata
-name = "Default"
+name = "Minimal"
 
 # Is theme light or dark?
 light = true

+ 18 - 0
data/themes/mr_robot.toml

@@ -0,0 +1,18 @@
+# Theme metadata
+name = "Mr Robot"
+
+# Is theme light or dark?
+light = false
+
+# Primary
+primary = "rgb(0, 136, 204)"
+
+# Menu
+menu_primary = "rgb(33, 37, 41)"
+menu_text = "rgb(0, 136, 204)"
+menu_text_active = "rgba(255,255,255,1)"
+menu_title = "rgb(153, 153, 153)"
+
+# Home sections
+home_section_odd = "rgb(29, 33, 39)"
+home_section_even = "rgb(29, 33, 39)"

+ 8 - 4
exampleSite/config/_default/config.toml

@@ -18,9 +18,6 @@ copyright = ""
 # Enable analytics by entering your Google Analytics tracking ID
 googleAnalytics = ""
 
-# Enable comments by entering your Disqus shortname
-disqusShortname = ""
-
 ############################
 ## Advanced options below ##
 ############################
@@ -43,9 +40,16 @@ footnotereturnlinkcontents = "<sup>^</sup>"
 ignoreFiles = ["\\.ipynb$", ".ipynb_checkpoints$", "\\.Rmd$", "\\.Rmarkdown$", "_files$", "_cache$"]
 
 [outputs]
-  home = [ "HTML", "RSS", "JSON" ]
+  home = [ "HTML", "RSS", "JSON", "WebAppManifest" ]
   section = [ "HTML", "RSS" ]
 
+[mediaTypes."application/manifest+json"]
+  suffixes = ["webmanifest"]
+
+[outputFormats.WebAppManifest]
+  mediaType = "application/manifest+json"
+  rel = "manifest"
+
 # Configure BlackFriday Markdown rendering.
 #   See: https://gohugo.io/getting-started/configuration/#configure-blackfriday
 [blackfriday]

+ 2 - 2
exampleSite/config/_default/menus.toml

@@ -4,8 +4,8 @@
 #   The weight parameter defines the order that the links will appear in.
 
 [[main]]
-  name = "Home"
-  url = "#about"
+  name = "Demo"
+  url = "#hero"
   weight = 10
 
 [[main]]

+ 141 - 58
exampleSite/config/_default/params.toml

@@ -1,62 +1,107 @@
 # SITE SETUP
 # Documentation: https://sourcethemes.com/academic/
 
-# Color theme.
-#   Choose from `default`, `ocean`, `forest`, `dark`, `apogee`, `1950s`, `coffee`, `cupcake`, `strawberry`.
-color_theme = "default"
+############################
+## Theme
+############################
+
+# Choose a theme.
+#   Latest themes (may require updating): https://sourcethemes.com/academic/themes/
+#   Browse built-in themes in `themes/academic/data/themes/`
+#   Browse user installed themes in `data/themes/`
+theme = "minimal"
+
 # Enable users to switch between day and night mode?
 day_night = true
 
-# Font style.
-#   Choose from `default`, `classic`, or `playfair`.
-font = "default"
+# Override the theme's font set (optional).
+#   Latest font sets (may require updating): https://sourcethemes.com/academic/themes/
+#   Browse built-in font sets in `themes/academic/data/fonts/`
+#   Browse user installed font sets in `data/fonts/`
+font = ""
 
-# Description for social sharing and search engines. If undefined, superuser role is used in place.
-description = ""
+# Choose a font size.
+# Sizes: XS (extra small), S (small), M (medium), L (large - DEFAULT), XL (extra large)
+font_size = "L"
 
-# Default image for social sharing and search engines. Place image in `static/img/` folder and specify image name here.
-sharing_image = ""
+############################
+## Basic Info
+############################
 
-# Twitter username (without @). Used when a vistor shares your site on Twitter.
-twitter = ""
+# Website type
+#   Improve how search engines understand your site.
+#   For personal sites, choose "Person".
+#   For organizations and projects, choose from https://schema.org/Organization#subtypes
+#   E.g. Person, Organization, LocalBusiness, Project, EducationalOrganization
+site_type = "Person"
+
+# Local business type (optional)
+# If you entered "LocalBusiness" above, choose the type of business from https://schema.org/LocalBusiness#subtypes
+local_business_type = ""
+
+# Organization name (optional)
+# Enter an organization or project name. Defaults to the site title from `config.toml`.
+org_name = ""
 
-# Diplay a logo in navigation bar rather than title (optional).
+# Description for social sharing and search engines. If undefined, superuser role is used in place.
+description = ""
+
+# Display a logo in navigation bar rather than title (optional).
 #   To enable, place an image in `static/img/` and reference its filename below. To disable, set the value to "".
 logo = ""
 
-# Enable global source code highlighting? true/false
+############################
+## Site Features
+############################
+
+# Enable source code highlighting? true/false
 # Documentation: https://sourcethemes.com/academic/docs/writing-markdown-latex/#highlighting-options
 highlight = true
-# highlight_languages = ["r"]  # Add support for highlighting additional languages
+highlight_languages = ["r"]  # Add support for highlighting additional languages
 # highlight_style = "github"  # For supported styles, see https://cdnjs.com/libraries/highlight.js/
 
-# Enable global LaTeX math rendering?
-#   If false, you can enable it locally on a per page basis.
+# Enable LaTeX math rendering? true/false
+#   If false, you can enable math on a per page basis as needed.
 math = false
 
+# Enable diagram rendering? true/false
+#   If false, you can enable diagrams on a per page basis as needed.
+diagram = false
+
 # Privacy pack
 #   Show a cookie consent message to visitors
 #   Anonymize IP in Google Analytics (if enabled)
 privacy_pack = false
 
-# Date and time format (refer to https://sourcethemes.com/academic/docs/customization/#date-format )
-#   Examples: "Mon, Jan 2, 2006" or "2006-01-02"
-date_format = "Jan 2, 2006"
-#   Examples: "3:04 pm" or "15:04"
-time_format = "3:04 PM"
+# Enable visitors to edit pages?
+#   `repo` defines the repository URL. `editable` defines which page types can be edited.
+edit_page = {repo_url = "https://github.com/gcushen/hugo-academic", repo_branch = "master", editable = {docs = true, page = false, post = false}}
 
 ############################
-## Contact Widget setup   ##
+## Contact details
+##
+## These details power the Contact widget (if enabled).
+## Additionally, for organizations, these details may be used to enrich search engine results.
 ############################
 
 # Enter contact details (optional). To hide a field, clear it to "".
 email = "test@example.org"
 phone = "888 888 88 88"
-address = "Building 1 Room 1, Stanford University, California, 90210, USA"
 
-# Office hours: use `<br>` to insert a line break, or set to "" to remove office hours
-office_hours = """Monday 10:00 to 13:00<br>
-                  Wednesday 09:00 to 10:00"""
+# Address
+# For country_code, use the 2-letter ISO code (see https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 )
+address = {street = "450 Serra Mall", city = "Stanford", region = "CA", postcode = "94305", country = "United States", country_code = "US"}
+
+# Geographic coordinates
+# To get your coordinates, right-click on Google Maps and choose "What's here?". The coords will show up at the bottom.
+coordinates = {latitude = "37.4275", longitude = "-122.1697"}
+
+# Directions for visitors to locate you.
+directions = "Enter Building 1 and take the stairs to Office 200 on Floor 2"
+
+# Office hours
+# A list of your office hours. To remove, set to an empty list `[]`.
+office_hours = ["Monday 10:00 to 13:00", "Wednesday 09:00 to 10:00"]
 
 # Enter an optional link for booking appointments (e.g. calendly.com).
 appointment_url = "https://calendly.com"
@@ -71,39 +116,32 @@ contact_links = [
   # {icon = "telegram", icon_pack = "fab", name = "Telegram Me", link = "https://telegram.me/@Telegram"},
   ]
 
-# Display a map.
-# To show your address on a map in the contact widget, you need to enter your latitude, longitude and choose
-# a map provider below.
-# To use Google Maps, set `map = 1` and enter your API key that can be obtained here:
-#   https://developers.google.com/maps/documentation/javascript/get-api-key
-# To use OpenStreetMap tiles, set `map = 2`.
-# To use OpenStreetMap on a high traffic site, set `map = 3` and enter your API key that can be obtained here:
-#   https://www.mapbox.com/studio/account/tokens
-# To get your coordinates, right-click on Google Maps and choose "What's here?". The coords will show up at the bottom.
-#
-# Map provider:
-#   0: No map
-#   1: Google Maps
-#   2: OpenStreetMap (Mapnik)
-#   3: OpenStreetMap (Mapbox)
-map = 0
-map_api_key = ""
-latitude = "37.4275"
-longitude = "-122.1697"
-zoom = 15
+############################
+## Social
+############################
+
+# Default image for social sharing and search engines. Place image in `static/img/` folder and specify image name here.
+sharing_image = ""
+
+# Twitter username (without @). Used when a visitor shares your site on Twitter.
+twitter = ""
 
 ############################
-## Plugins                ##
+## Regional Settings
 ############################
 
-# Load CSS and JS plugins
-#   E.g. To load `/assets/css/custom.css`, set `plugins_css = ["custom"]`.
-#   E.g. To load `/assets/js/custom.js`, set `plugins_js = ["custom"]`.
-plugins_css = []
-plugins_js  = []
+# Date and time format (refer to https://sourcethemes.com/academic/docs/customization/#date-format )
+#   Examples: "Mon, Jan 2, 2006" or "2006-01-02"
+date_format = "Jan 2, 2006"
+#   Examples: "3:04 pm" or "15:04"
+time_format = "3:04 PM"
+
+# List delimiter (separates parts of an address)
+# Popular separators are ", " (comma), "<br>" (new line), " " (space)
+list_delimiter = ", "
 
 ############################
-## Advanced options       ##
+## Advanced
 ############################
 
 # Get user avatars from Gravatar.com? (true/false)
@@ -115,9 +153,6 @@ menu_align_right = false
 # Show estimated reading time for posts? (true/false)
 reading_time = true
 
-# Display comment count (if commenting enabled in config.toml)? (true/false)
-comment_count = true
-
 # Display next/previous section pager? (true/false)
 section_pager = false
 docs_section_pager = true  # Display pager in Docs layout (e.g. tutorials)?
@@ -125,6 +160,12 @@ docs_section_pager = true  # Display pager in Docs layout (e.g. tutorials)?
 # Enable in-built social sharing buttons? (true/false)
 sharing = true
 
+# Load CSS and JS plugins
+#   E.g. To load `/assets/css/custom.css`, set `plugins_css = ["custom"]`.
+#   E.g. To load `/assets/js/custom.js`, set `plugins_js = ["custom"]`.
+plugins_css = []
+plugins_js  = []
+
 # Configuration of publication pages.
 [publications]
   # Date format (refer to https://sourcethemes.com/academic/docs/customization/#date-format )
@@ -145,7 +186,27 @@ sharing = true
   publication_view = 2
   talk_view = 2
 
-# Search.
+############################
+## Comments
+############################
+[comments]
+  # Comment provider:
+  #   0: Disabled
+  #   1: Disqus (https://disqus.com)
+  #   2: Commento (https://commento.io)
+  engine = 0
+
+  # Which page types are commentable?
+  commentable = {page = true, post = true, docs = true, project = true, publication = true, talk = true}
+
+  # Configuration of Disqus.
+  [comments.disqus]
+    shortname = ""  # Paste the shortname from your Disqus dashboard.
+    show_count = true  # Show comment count in page header? (true/false)
+
+############################
+## Search
+############################
 [search]
   # Search provider:
   #   0: No search engine
@@ -160,3 +221,25 @@ sharing = true
     api_key = ""
     index_name = ""
     show_logo = false
+
+############################
+## Maps
+############################
+[map]
+  # To show your address on a map in the Contact widget, enter your latitude and longitude (above)
+  # and choose a map provider below.
+  #
+  # To use Google Maps, set `engine` to 1 and enter your API key that can be obtained here:
+  #   https://developers.google.com/maps/documentation/javascript/get-api-key
+  # To use OpenStreetMap tiles, set `engine` to 2.
+  # To use OpenStreetMap on a high traffic site, set `engine` to 3 and enter your API key that can be obtained here:
+  #   https://www.mapbox.com/studio/account/tokens
+  #
+  # Map provider:
+  #   0: No map
+  #   1: Google Maps
+  #   2: OpenStreetMap (Mapnik)
+  #   3: OpenStreetMap (Mapbox)
+  engine = 2
+  api_key = ""
+  zoom = 15

+ 1 - 1
exampleSite/content/home/hero.md

@@ -45,7 +45,7 @@ hero_media = "hero-academic.png"
 
 # Note. An optional note to show underneath the links.
 [cta_note]
-  label = '<a id="academic-release" href="https://sourcethemes.com/academic/updates" data-repo="gcushen/hugo-academic">Latest release <!-- V --></a>'
+  label = '<a class="js-github-release" href="https://sourcethemes.com/academic/updates" data-repo="gcushen/hugo-academic">Latest release<!-- V --></a>'
 +++
 
 **The Best Way to Create the Website You Want from Markdown (or Jupyter/RStudio)**

+ 1 - 0
exampleSite/content/home/projects.md

@@ -39,6 +39,7 @@ subtitle = ""
 
   # Toggle between the various page layout types.
   #   1 = List
+  #   2 = Compact
   #   3 = Card
   #   5 = Showcase
   view = 3

+ 12 - 0
exampleSite/content/home/tags.md

@@ -7,4 +7,16 @@ weight = 120  # Order that this section will appear.
 
 title = "Popular Topics"
 subtitle = ""
+
+[content]
+  # Choose the taxonomy from `config.toml` to display (e.g. tags, categories)
+  taxonomy = "tags"
+  
+  # Choose how many tags you would like to display (0 = all tags)
+  count = 20
+
+[design]
+  # Minimum and maximum font sizes (1.0 = 100%).
+  font_size_min = 0.7
+  font_size_max = 2.0
 +++

BIN
exampleSite/content/post/getting-started/gallery/theme-1950s.png


BIN
exampleSite/content/post/getting-started/gallery/theme-apogee.png


BIN
exampleSite/content/post/getting-started/gallery/theme-coffee-playfair.png


BIN
exampleSite/content/post/getting-started/gallery/theme-dark.png


BIN
exampleSite/content/post/getting-started/gallery/theme-default.png


BIN
exampleSite/content/post/getting-started/gallery/theme-forest.png


BIN
exampleSite/content/post/getting-started/gallery/theme-ocean.png


BIN
exampleSite/content/post/getting-started/gallery/theme-strawberry.png


+ 22 - 46
exampleSite/content/post/getting-started/index.md

@@ -6,7 +6,8 @@ authors:
 - admin
 tags:
 - Academic
-categories: []
+categories:
+- Demo
 date: "2016-04-20T00:00:00Z"
 lastmod: "2019-04-17T00:00:00Z"
 featured: false
@@ -14,8 +15,10 @@ draft: false
 
 # Featured image
 # To use, add an image named `featured.jpg/png` to your page's folder.
+# Placement options: 1 = Full column width, 2 = Out-set, 3 = Screen-width
 # Focal point options: Smart, Center, TopLeft, Top, TopRight, Left, Right, BottomLeft, Bottom, BottomRight
 image:
+  placement: 2
   caption: 'Image credit: [**Unsplash**](https://unsplash.com/photos/CpkOjOcXdUY)'
   focal_point: ""
   preview_only: false
@@ -26,52 +29,27 @@ image:
 #   E.g. `projects = ["internal-project"]` references `content/project/deep-learning/index.md`.
 #   Otherwise, set `projects = []`.
 projects: []
-
-# Set captions for image gallery.
-gallery_item:
-- album: gallery
-  caption: Default
-  image: theme-default.png
-- album: gallery
-  caption: Ocean
-  image: theme-ocean.png
-- album: gallery
-  caption: Forest
-  image: theme-forest.png
-- album: gallery
-  caption: Dark
-  image: theme-dark.png
-- album: gallery
-  caption: Apogee
-  image: theme-apogee.png
-- album: gallery
-  caption: 1950s
-  image: theme-1950s.png
-- album: gallery
-  caption: Coffee theme with Playfair font
-  image: theme-coffee-playfair.png
-- album: gallery
-  caption: Strawberry
-  image: theme-strawberry.png
 ---
 
 **Create a free website with Academic using Markdown, Jupyter, or RStudio. Choose a beautiful color theme and build anything with the Page Builder - over 40 _widgets_, _themes_, and _language packs_ included!**
 
 [Check out the latest **demo**](https://academic-demo.netlify.com/) of what you'll get in less than 10 minutes, or [view the **showcase**](https://sourcethemes.com/academic/#expo) of personal, project, and business sites.
 
-- [**Setup Academic**](#install)
-- [**Get Started**](https://sourcethemes.com/academic/docs/get-started/)
-- [View the documentation](https://sourcethemes.com/academic/docs/)
-- [Ask a question](http://discuss.gohugo.io/)
-- [Request a feature or report a bug](https://github.com/gcushen/hugo-academic/issues)
-- Updating? View the [Update Guide](https://sourcethemes.com/academic/docs/update/) and [Release Notes](https://sourcethemes.com/academic/updates/)
-- Support development of Academic:
-  - [Donate a coffee](https://paypal.me/cushen)
-  - [Become a backer on Patreon](https://www.patreon.com/cushen)
-  - [Decorate your laptop or journal with an Academic sticker](https://www.redbubble.com/people/neutreno/works/34387919-academic)
-  - [Wear the T-shirt](https://academic.threadless.com/)
-
-[![Screenshot](https://raw.githubusercontent.com/gcushen/hugo-academic/master/academic.png)](https://github.com/gcushen/hugo-academic/)
+- 👉 [**Get Started**](#install)
+- 📚 [View the **documentation**](https://sourcethemes.com/academic/docs/)
+- 💬 [**Ask a question** on the forum](https://discourse.gohugo.io)
+- 👥 [Chat with the **community**](https://spectrum.chat/academic)
+- 🐦 Twitter: [@source_themes](https://twitter.com/source_themes) [@GeorgeCushen](https://twitter.com/GeorgeCushen) [#MadeWithAcademic](https://twitter.com/search?q=%23MadeWithAcademic&src=typd)
+- 💡 [Request a **feature** or report a **bug**](https://github.com/gcushen/hugo-academic/issues)
+- ⬆️ **Updating?** View the [Update Guide](https://sourcethemes.com/academic/docs/update/) and [Release Notes](https://sourcethemes.com/academic/updates/)
+- :heart: **Support development** of Academic:
+  - ☕️ [**Donate a coffee**](https://paypal.me/cushen)
+  - 💵 [Become a backer on **Patreon**](https://www.patreon.com/cushen)
+  - 🖼️ [Decorate your laptop or journal with an Academic **sticker**](https://www.redbubble.com/people/neutreno/works/34387919-academic)
+  - 👕 [Wear the **T-shirt**](https://academic.threadless.com/)
+  - :woman_technologist: [**Contribute**](https://sourcethemes.com/academic/docs/contribute/)
+
+{{< figure src="https://raw.githubusercontent.com/gcushen/hugo-academic/master/academic.png" lightbox="true" >}}
 
 **Key features:**
 
@@ -91,13 +69,11 @@ gallery_item:
 - **Stand Out** - Bring your site to life with animation, parallax backgrounds, and scroll effects
 - **One-Click Deployment** - No servers. No databases. Only files.
 
-## Color Themes
-
-Academic comes with **day (light) and night (dark) mode** built-in. Click the sun/moon icon in the top right of the [Demo](https://academic-demo.netlify.com/) to see it in action!
+## Themes
 
-Choose a stunning color and font theme for your site. Themes are fully customizable and include:
+Academic comes with **automatic day (light) and night (dark) mode** built-in. Alternatively, visitors can  choose their preferred mode - click the sun/moon icon in the top right of the [Demo](https://academic-demo.netlify.com/) to see it in action! Day/night mode can also be disabled by the site admin in `params.toml`.
 
-{{< gallery >}}
+[Choose a stunning **theme** and **font**](https://sourcethemes.com/academic/themes/) for your site. Themes are fully [customizable](https://sourcethemes.com/academic/docs/customization/#custom-theme).
 
 ## Ecosystem
 

+ 67 - 29
exampleSite/content/post/jupyter/academic.ipynb → exampleSite/content/post/jupyter/index.ipynb

@@ -1,5 +1,38 @@
 {
  "cells": [
+  {
+   "cell_type": "raw",
+   "metadata": {},
+   "source": [
+    "---\n",
+    "title: Display Jupyter Notebooks with Academic\n",
+    "subtitle: Learn how to blog in Academic using Jupyter notebooks\n",
+    "summary: Learn how to blog in Academic using Jupyter notebooks\n",
+    "authors:\n",
+    "- admin\n",
+    "tags: []\n",
+    "categories: []\n",
+    "date: \"2019-02-05T00:00:00Z\"\n",
+    "lastMod: \"2019-09-05T00:00:00Z\"\n",
+    "featured: false\n",
+    "draft: false\n",
+    "\n",
+    "# Featured image\n",
+    "# To use, add an image named `featured.jpg/png` to your page's folder. \n",
+    "image:\n",
+    "  caption: \"\"\n",
+    "  focal_point: \"\"\n",
+    "\n",
+    "# Projects (optional).\n",
+    "#   Associate this post with one or more of your projects.\n",
+    "#   Simply enter your project's folder or file name without extension.\n",
+    "#   E.g. `projects = [\"internal-project\"]` references \n",
+    "#   `content/project/deep-learning/index.md`.\n",
+    "#   Otherwise, set `projects = []`.\n",
+    "projects: []\n",
+    "---"
+   ]
+  },
   {
    "cell_type": "code",
    "execution_count": 5,
@@ -43,20 +76,20 @@
    "cell_type": "markdown",
    "metadata": {},
    "source": [
-    "## Install Python and Jupyter\n",
+    "## Install Python and JupyterLab\n",
     "\n",
-    "[Install Anaconda](https://www.anaconda.com/distribution/#download-section) which includes Python 3 and Jupyter notebook.\n",
+    "[Install Anaconda](https://www.anaconda.com/distribution/#download-section) which includes Python 3 and JupyterLab.\n",
     "\n",
-    "Otherwise, for advanced users, install Jupyter notebook with `pip3 install jupyter`."
+    "Alternatively, install JupyterLab with `pip3 install jupyterlab`."
    ]
   },
   {
    "cell_type": "markdown",
    "metadata": {},
    "source": [
-    "## Create a new blog post [as usual](https://sourcethemes.com/academic/docs/managing-content/#create-a-blog-post)\n",
+    "## Create or upload a Jupyter notebook\n",
     "\n",
-    "Run the following commands in your Terminal, substituting `<MY_WEBSITE_FOLDER>` and `my-post` with the file path to your Academic website folder and a name for your blog post (without spaces), respectively:  "
+    "Run the following commands in your Terminal, substituting `<MY-WEBSITE-FOLDER>` and `<SHORT-POST-TITLE>` with the file path to your Academic website folder and a short title for your blog post (use hyphens instead of spaces), respectively:"
    ]
   },
   {
@@ -64,9 +97,9 @@
    "metadata": {},
    "source": [
     "```bash\n",
-    "cd <MY_WEBSITE_FOLDER>\n",
-    "hugo new  --kind post post/my-post\n",
-    "cd <MY_WEBSITE_FOLDER>/content/post/my-post/\n",
+    "mkdir -p <MY-WEBSITE-FOLDER>/content/post/<SHORT-POST-TITLE>/\n",
+    "cd <MY-WEBSITE-FOLDER>/content/post/<SHORT-POST-TITLE>/\n",
+    "jupyter lab index.ipynb\n",
     "```"
    ]
   },
@@ -74,18 +107,33 @@
    "cell_type": "markdown",
    "metadata": {},
    "source": [
-    "## Create or upload a Jupyter notebook\n",
-    "\n",
-    "Run the following command to start Jupyter within your new blog post folder. Then create a new Jupyter notebook (*New > Python Notebook*) or upload a notebook."
+    "The `jupyter` command above will launch the JupyterLab editor, allowing us to add Academic metadata and write the content."
    ]
   },
   {
    "cell_type": "markdown",
    "metadata": {},
    "source": [
-    "```bash\n",
-    "jupyter notebook\n",
-    "```"
+    "## Edit your post metadata\n",
+    "\n",
+    "The first cell of your Jupter notebook will contain your post metadata ([front matter](https://sourcethemes.com/academic/docs/front-matter/)).\n",
+    "\n",
+    "In Jupter, choose _Markdown_ as the type of the first cell and wrap your Academic metadata in three dashes, indicating that it is YAML front matter: \n",
+    "\n",
+    "```\n",
+    "---\n",
+    "title: My post's title\n",
+    "date: 2019-09-01\n",
+    "\n",
+    "# Put any other Academic metadata here...\n",
+    "---\n",
+    "```\n",
+    "\n",
+    "Edit the metadata of your post, using the [documentation](https://sourcethemes.com/academic/docs/managing-content) as a guide to the available options.\n",
+    "\n",
+    "To set a [featured image](https://sourcethemes.com/academic/docs/managing-content/#featured-image), place an image named `featured` into your post's folder.\n",
+    "\n",
+    "For other tips, such as using math, see the guide on [writing content with Academic](https://sourcethemes.com/academic/docs/writing-markdown-latex/). "
    ]
   },
   {
@@ -100,13 +148,7 @@
    "metadata": {},
    "source": [
     "```bash\n",
-    "jupyter nbconvert Untitled.ipynb --to markdown --NbConvertApp.output_files_dir=.\n",
-    "\n",
-    "# Copy the contents of Untitled.md and append it to index.md:\n",
-    "cat Untitled.md | tee -a index.md\n",
-    "\n",
-    "# Remove the temporary file:\n",
-    "rm Untitled.md\n",
+    "jupyter nbconvert index.ipynb --to markdown --NbConvertApp.output_files_dir=.\n",
     "```"
    ]
   },
@@ -114,13 +156,9 @@
    "cell_type": "markdown",
    "metadata": {},
    "source": [
-    "## Edit your post metadata\n",
-    "\n",
-    "Open `index.md` in your text editor and edit the title etc. in the [front matter](https://sourcethemes.com/academic/docs/front-matter/) according to your preference.\n",
+    "## Example\n",
     "\n",
-    "To set a [featured image](https://sourcethemes.com/academic/docs/managing-content/#featured-image), place an image named `featured` into your post's folder.\n",
-    "\n",
-    "For other tips, such as using math, see the guide on [writing content with Academic](https://sourcethemes.com/academic/docs/writing-markdown-latex/). "
+    "This post was created with Jupyter. The orginal files can be found at https://github.com/gcushen/hugo-academic/tree/master/exampleSite/content/post/jupyter"
    ]
   }
  ],
@@ -140,9 +178,9 @@
    "name": "python",
    "nbconvert_exporter": "python",
    "pygments_lexer": "ipython3",
-   "version": "3.7.2"
+   "version": "3.7.3"
   }
  },
  "nbformat": 4,
- "nbformat_minor": 2
+ "nbformat_minor": 4
 }

+ 31 - 26
exampleSite/content/post/jupyter/index.md

@@ -7,6 +7,7 @@ authors:
 tags: []
 categories: []
 date: "2019-02-05T00:00:00Z"
+lastMod: "2019-09-05T00:00:00Z"
 featured: false
 draft: false
 
@@ -25,7 +26,6 @@ image:
 projects: []
 ---
 
-
 ```python
 from IPython.core.display import Image
 Image('https://www.python.org/static/community_logos/python-logo-master-v3-TM-flattened.png')
@@ -34,7 +34,7 @@ Image('https://www.python.org/static/community_logos/python-logo-master-v3-TM-fl
 
 
 
-![png](./academic_0_0.png)
+![png](./index_1_0.png)
 
 
 
@@ -46,46 +46,51 @@ print("Welcome to Academic!")
     Welcome to Academic!
 
 
-## Install Python and Jupyter
-
-[Install Anaconda](https://www.anaconda.com/distribution/#download-section) which includes Python 3 and Jupyter notebook.
-
-Otherwise, for advanced users, install Jupyter notebook with `pip3 install jupyter`.
+## Install Python and JupyterLab
 
-## Create a new blog post [as usual](https://sourcethemes.com/academic/docs/managing-content/#create-a-blog-post)
+[Install Anaconda](https://www.anaconda.com/distribution/#download-section) which includes Python 3 and JupyterLab.
 
-Run the following commands in your Terminal, substituting `<MY_WEBSITE_FOLDER>` and `my-post` with the file path to your Academic website folder and a name for your blog post (without spaces), respectively:  
-
-```bash
-cd <MY_WEBSITE_FOLDER>
-hugo new  --kind post post/my-post
-cd <MY_WEBSITE_FOLDER>/content/post/my-post/
-```
+Alternatively, install JupyterLab with `pip3 install jupyterlab`.
 
 ## Create or upload a Jupyter notebook
 
-Run the following command to start Jupyter within your new blog post folder. Then create a new Jupyter notebook (*New > Python Notebook*) or upload a notebook.
+Run the following commands in your Terminal, substituting `<MY-WEBSITE-FOLDER>` and `<SHORT-POST-TITLE>` with the file path to your Academic website folder and a short title for your blog post (use hyphens instead of spaces), respectively:
 
 ```bash
-jupyter notebook
+mkdir -p <MY-WEBSITE-FOLDER>/content/post/<SHORT-POST-TITLE>/
+cd <MY-WEBSITE-FOLDER>/content/post/<SHORT-POST-TITLE>/
+jupyter lab index.ipynb
 ```
 
-## Convert notebook to Markdown
+The `jupyter` command above will launch the JupyterLab editor, allowing us to add Academic metadata and write the content.
 
-```bash
-jupyter nbconvert Untitled.ipynb --to markdown --NbConvertApp.output_files_dir=.
+## Edit your post metadata
 
-# Copy the contents of Untitled.md and append it to index.md:
-cat Untitled.md | tee -a index.md
+The first cell of your Jupter notebook will contain your post metadata ([front matter](https://sourcethemes.com/academic/docs/front-matter/)).
+
+In Jupter, choose _Markdown_ as the type of the first cell and wrap your Academic metadata in three dashes, indicating that it is YAML front matter: 
 
-# Remove the temporary file:
-rm Untitled.md
 ```
+---
+title: My post's title
+date: 2019-09-01
 
-## Edit your post metadata
+# Put any other Academic metadata here...
+---
+```
 
-Open `index.md` in your text editor and edit the title etc. in the [front matter](https://sourcethemes.com/academic/docs/front-matter/) according to your preference.
+Edit the metadata of your post, using the [documentation](https://sourcethemes.com/academic/docs/managing-content) as a guide to the available options.
 
 To set a [featured image](https://sourcethemes.com/academic/docs/managing-content/#featured-image), place an image named `featured` into your post's folder.
 
 For other tips, such as using math, see the guide on [writing content with Academic](https://sourcethemes.com/academic/docs/writing-markdown-latex/). 
+
+## Convert notebook to Markdown
+
+```bash
+jupyter nbconvert index.ipynb --to markdown --NbConvertApp.output_files_dir=.
+```
+
+## Example
+
+This post was created with Jupyter. The orginal files can be found at https://github.com/gcushen/hugo-academic/tree/master/exampleSite/content/post/jupyter

+ 0 - 0
exampleSite/content/post/jupyter/academic_0_0.png → exampleSite/content/post/jupyter/index_1_0.png


BIN
exampleSite/content/post/writing-technical-content/featured.jpg


+ 199 - 0
exampleSite/content/post/writing-technical-content/index.md

@@ -0,0 +1,199 @@
+---
+title: Writing technical content in Academic
+date: 2019-07-12
+math: true
+diagram: true
+markup: mmark
+image:
+  placement: 3
+  caption: 'Image credit: [**John Moeses Bauan**](https://unsplash.com/photos/OGZtQF8iC0g)'
+---
+
+Academic is designed to give technical content creators a seamless experience. You can focus on the content and Academic handles the rest.
+
+**Highlight your code snippets, take notes on math classes, and draw diagrams from textual representation.**
+
+On this page, you'll find some examples of the types of technical content that can be rendered with Academic.
+
+## Examples
+
+### Code
+
+Academic supports a Markdown extension for highlighting code syntax. You can enable this feature by toggling the `highlight` option in your `config/_default/params.toml` file.
+
+    ```python
+    import pandas as pd
+    data = pd.read_csv("data.csv")
+    data.head()
+    ```
+
+renders as
+
+```python
+import pandas as pd
+data = pd.read_csv("data.csv")
+data.head()
+```
+
+### Math
+
+Academic supports a Markdown extension for $\LaTeX$ math. You can enable this feature by toggling the `math` option in your `config/_default/params.toml` file and adding `markup: mmark` to your page front matter.
+
+To render *inline* or *block* math, wrap your LaTeX math with `$$...$$`.
+
+Example **math block**:
+
+```tex
+$$\gamma_{n} = \frac{ 
+\left | \left (\mathbf x_{n} - \mathbf x_{n-1} \right )^T 
+\left [\nabla F (\mathbf x_{n}) - \nabla F (\mathbf x_{n-1}) \right ] \right |}
+{\left \|\nabla F(\mathbf{x}_{n}) - \nabla F(\mathbf{x}_{n-1}) \right \|^2}$$
+```
+
+renders as
+
+$$\gamma_{n} = \frac{ \left | \left (\mathbf x_{n} - \mathbf x_{n-1} \right )^T \left [\nabla F (\mathbf x_{n}) - \nabla F (\mathbf x_{n-1}) \right ] \right |}{\left \|\nabla F(\mathbf{x}_{n}) - \nabla F(\mathbf{x}_{n-1}) \right \|^2}$$
+
+Example **inline math** `$$\left \|\nabla F(\mathbf{x}_{n}) - \nabla F(\mathbf{x}_{n-1}) \right \|^2$$` renders as $$\left \|\nabla F(\mathbf{x}_{n}) - \nabla F(\mathbf{x}_{n-1}) \right \|^2$$ .
+
+Example **multi-line math** using the `\\` math linebreak:
+
+```tex
+$$f(k;p_0^*) = \begin{cases} p_0^* & \text{if }k=1, \\
+1-p_0^* & \text {if }k=0.\end{cases}$$
+```
+
+renders as
+
+$$f(k;p_0^*) = \begin{cases} p_0^* & \text{if }k=1, \\
+1-p_0^* & \text {if }k=0.\end{cases}$$
+
+### Diagrams
+
+Academic supports a Markdown extension for diagrams. You can enable this feature by toggling the `diagram` option in your `config/_default/params.toml` file or by adding `diagram: true` to your page front matter.
+
+An example **flowchart**:
+
+    ```mermaid
+    graph TD;
+      A-->B;
+      A-->C;
+      B-->D;
+      C-->D;
+    ```
+
+renders as
+
+```mermaid
+graph TD;
+  A-->B;
+  A-->C;
+  B-->D;
+  C-->D;
+```
+
+An example **sequence diagram**:
+
+    ```mermaid
+    sequenceDiagram
+      participant Alice
+      participant Bob
+      Alice->John: Hello John, how are you?
+      loop Healthcheck
+          John->John: Fight against hypochondria
+      end
+      Note right of John: Rational thoughts <br/>prevail...
+      John-->Alice: Great!
+      John->Bob: How about you?
+      Bob-->John: Jolly good!
+    ```
+
+renders as
+
+```mermaid
+sequenceDiagram
+  participant Alice
+  participant Bob
+  Alice->John: Hello John, how are you?
+  loop Healthcheck
+      John->John: Fight against hypochondria
+  end
+  Note right of John: Rational thoughts <br/>prevail...
+  John-->Alice: Great!
+  John->Bob: How about you?
+  Bob-->John: Jolly good!
+```
+
+An example **Gantt diagram**:
+
+    ```mermaid
+    gantt
+      dateFormat  YYYY-MM-DD
+      section Section
+      A task           :a1, 2014-01-01, 30d
+      Another task     :after a1  , 20d
+      section Another
+      Task in sec      :2014-01-12  , 12d
+      another task      : 24d
+    ```
+
+renders as
+
+```mermaid
+gantt
+  dateFormat  YYYY-MM-DD
+  section Section
+  A task           :a1, 2014-01-01, 30d
+  Another task     :after a1  , 20d
+  section Another
+  Task in sec      :2014-01-12  , 12d
+  another task      : 24d
+```
+
+### Todo lists
+
+You can even write your todo lists in Academic too:
+
+```markdown
+- [x] Write math example
+- [x] Write diagram example
+- [ ] Do something else
+```
+
+renders as
+
+- [x] Write math example
+- [x] Write diagram example
+- [ ] Do something else
+
+### Tables
+
+Represent your data in tables:
+
+```markdown
+| First Header  | Second Header |
+| ------------- | ------------- |
+| Content Cell  | Content Cell  |
+| Content Cell  | Content Cell  |
+```
+
+renders as
+
+| First Header  | Second Header |
+| ------------- | ------------- |
+| Content Cell  | Content Cell  |
+| Content Cell  | Content Cell  |
+
+### Asides
+
+Academic supports a Markdown extension for asides, also referred to as *notices* or *hints*. By prefixing a paragraph with `A>`, it will render as an aside. You can enable this feature by adding `markup: mmark` to your page front matter, or alternatively using the [*Alert* shortcode](https://sourcethemes.com/academic/docs/writing-markdown-latex/#alerts).
+
+```markdown
+A> A Markdown aside is useful for displaying notices, hints, or definitions to your readers.
+```
+
+renders as
+
+A> A Markdown aside is useful for displaying notices, hints, or definitions to your readers.
+
+### Did you find this page helpful? Consider sharing it 🙌

+ 2 - 0
exampleSite/content/privacy.md

@@ -3,6 +3,8 @@ title: Privacy Policy
 date: "2018-06-28T00:00:00+01:00"
 draft: true
 share: false
+commentable: false
+editable: false
 
 # Optional header image (relative to `static/img/` folder).
 header:

+ 9 - 1
exampleSite/content/talk/example/index.md

@@ -2,7 +2,15 @@
 title: Example Talk
 event: Academic Theme Conference
 event_url: https://example.org
-location: London, United Kingdom
+
+location: Source Themes HQ
+address:
+  street: 450 Serra Mall
+  city: Stanford
+  region: CA
+  postcode: '94305'
+  country: United States
+
 summary: An example talk using Academic's Markdown slides feature.
 abstract: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis posuere tellusac convallis placerat. Proin tincidunt magna sed ex sollicitudin condimentum. Sed ac faucibus dolor, scelerisque sollicitudin nisi. Cras purus urna, suscipit quis sapien eu, pulvinar tempor diam."
 

+ 15 - 0
exampleSite/content/terms.md

@@ -0,0 +1,15 @@
+---
+title: Terms
+date: "2018-06-28T00:00:00+01:00"
+draft: true
+share: false
+commentable: false
+editable: false
+
+# Optional header image (relative to `static/img/` folder).
+header:
+  caption: ""
+  image: ""
+---
+
+...

+ 5 - 3
i18n/de.yaml

@@ -1,5 +1,5 @@
 - id: toggle_navigation
-  translation: Zur Navigation
+  translation: Navigation einblenden
 - id: table_of_contents
   translation: Inhaltsverzeichnis
 - id: on_this_page
@@ -9,15 +9,17 @@
 - id: related
   translation: Ähnliches
 - id: minute_read
-  translation: Min. Lektüre
+  translation: min Lesezeit
 - id: previous
   translation: Zurück
 - id: next
   translation: Weiter
 - id: figure
   translation: 'Abbildung %d:'
+- id: edit_page
+  translation: Seite editieren
 - id: btn_preprint
-  translation: Preprint
+  translation: Vorabdruck
 - id: btn_pdf
   translation: PDF
 - id: btn_cite

+ 3 - 0
i18n/en.yaml

@@ -29,6 +29,9 @@
 - id: figure
   translation: "Figure %d:"
 
+- id: edit_page
+  translation: Edit this page
+
 # Buttons
 
 - id: btn_preprint

+ 44 - 44
i18n/ru.yaml

@@ -1,27 +1,27 @@
 - id: toggle_navigation
   translation: Переключить навигацию
 - id: table_of_contents
-  translation: Table of Contents
+  translation: Содержание
 - id: on_this_page
-  translation: On this page
+  translation: На этой странице
 - id: back_to_top
-  translation: Back to top
+  translation: На верх
 - id: related
-  translation: Related
+  translation: Похожие
 - id: minute_read
-  translation: min read
+  translation: мин. для прочтения
 - id: previous
-  translation: Previous
+  translation: Предыдущий
 - id: next
-  translation: Next
+  translation: Следующий
 - id: figure
-  translation: 'Figure %d:'
+  translation: 'Схема № %d:'
 - id: btn_preprint
-  translation: Preprint
+  translation: Предварительная печать
 - id: btn_pdf
   translation: PDF
 - id: btn_cite
-  translation: Cite
+  translation: Процетировать
 - id: btn_slides
   translation: Слайды
 - id: btn_video
@@ -33,25 +33,25 @@
 - id: btn_project
   translation: Проект
 - id: btn_poster
-  translation: Poster
+  translation: Постер
 - id: btn_source
-  translation: Source Document
+  translation: Исходный документ
 - id: btn_copy
-  translation: Copy
+  translation: Копия
 - id: btn_download
-  translation: Download
+  translation: Скачать
 - id: interests
   translation: Интересы
 - id: education
   translation: Образование
 - id: user_profile_latest
-  translation: Latest
+  translation: Последние
 - id: see_certificate
-  translation: See certificate
+  translation: Посмотреть сертификат
 - id: present
-  translation: Present
+  translation: Настоящий
 - id: more_pages
-  translation: See all
+  translation: Посмотреть всё
 - id: more_posts
   translation: Больше статей
 - id: more_talks
@@ -59,47 +59,47 @@
 - id: more_publications
   translation: Больше публикаций
 - id: contact_name
-  translation: Name
+  translation: Имя
 - id: contact_email
-  translation: Email
+  translation: адрес электронной почты
 - id: contact_message
-  translation: Message
+  translation: Сообщение
 - id: contact_send
-  translation: Send
+  translation: Отправить
 - id: book_appointment
-  translation: Book an appointment
+  translation: Назначить встречу
 - id: abstract
   translation: Аннотация
 - id: publication
   translation: Публикация
 - id: publication_type
-  translation: Тип
+  translation: Тип публикации
 - id: date
   translation: Дата
 - id: last_updated
-  translation: Last updated on
+  translation: Обновлено
 - id: event
   translation: Событие
 - id: location
   translation: Место
 - id: pub_uncat
-  translation: Uncategorized
+  translation: Без категории
 - id: pub_conf
-  translation: Conference paper
+  translation: Статья для конференции
 - id: pub_journal
-  translation: Journal article
+  translation: Статья для журнала
 - id: pub_preprint
-  translation: Preprint
+  translation: Предварительная печать
 - id: pub_report
-  translation: Report
+  translation: Выступление
 - id: pub_book
-  translation: Book
+  translation: Книга
 - id: pub_book_section
-  translation: Book section
+  translation: Глава книги
 - id: pub_thesis
-  translation: Thesis
+  translation: Тезис
 - id: pub_patent
-  translation: Patent
+  translation: Патент
 - id: open_project_site
   translation: Перейти на сайт проекта
 - id: posts
@@ -109,22 +109,22 @@
 - id: talks
   translation: Выступления
 - id: projects
-  translation: Projects
+  translation: Проекты
 - id: search
-  translation: Search
+  translation: Поиск
 - id: search_placeholder
-  translation: Search...
+  translation: Поиск ...
 - id: search_results
-  translation: results found
+  translation: результат найден
 - id: search_no_results
-  translation: No results found
+  translation: результат не найден
 - id: page_not_found
-  translation: Page not found
+  translation: Страница не найдена
 - id: 404_recommendations
-  translation: Perhaps you were looking for one of these?
+  translation: Вы наверное искали один из тесисов?
 - id: cookie_message
-  translation: This website uses cookies to ensure you get the best experience on our website.
+  translation: Для комфорной навигации на этом сайте используются куки (cookies).
 - id: cookie_dismiss
-  translation: Got it!
+  translation: Понял!
 - id: cookie_learn
-  translation: Learn more
+  translation: Узнать больше

+ 96 - 1
i18n/zh.yaml

@@ -1,130 +1,225 @@
+# Navigation
+
 - id: toggle_navigation
   translation: 切换导航
+  
 - id: table_of_contents
   translation: 目录
+
 - id: on_this_page
   translation: 在本页
+
 - id: back_to_top
   translation: 回到顶部
+
+# General
+
 - id: related
   translation: 相关
+
 - id: minute_read
-  translation: 分钟阅读时间
+  translation: 阅读时间(分钟)
+
 - id: previous
   translation: 上一页
+
 - id: next
   translation: 下一页
+
 - id: figure
   translation: '图%d:'
+
+- id: edit_page
+  translation: 编辑本页
+
+# Buttons
+
 - id: btn_preprint
   translation: 预印本
+
 - id: btn_pdf
   translation: PDF
+
 - id: btn_cite
   translation: 引用
+
 - id: btn_slides
   translation: 演示文稿
+
 - id: btn_video
   translation: 视频
+
 - id: btn_code
   translation: 代码
+
 - id: btn_dataset
   translation: 数据集
+
 - id: btn_project
   translation: 项目
+
 - id: btn_poster
   translation: 海报
+
 - id: btn_source
   translation: 源文档
+
 - id: btn_copy
   translation: 复制
+
 - id: btn_download
   translation: 下载
+
+# About widget
+
 - id: interests
   translation: 兴趣爱好
+
 - id: education
   translation: 教育经历
+
 - id: user_profile_latest
   translation: 最新
+
+# Accomplishments widget
+
 - id: see_certificate
   translation: 查看证书
+
+# Experience widget
+
 - id: present
   translation: 现在
+
+# Pages widget
+
 - id: more_pages
   translation: 查看全部
+
 - id: more_posts
   translation: 查看全部文章
+
 - id: more_talks
   translation: 查看全部演讲
+
 - id: more_publications
   translation: 查看全部出版物
+
+# Contact widget
+
 - id: contact_name
   translation: 姓名
+
 - id: contact_email
   translation: 邮箱
+
 - id: contact_message
   translation: 信息
+
 - id: contact_send
   translation: 发送
+
 - id: book_appointment
   translation: 预约
+
+# Publication/Talk details
+
 - id: abstract
   translation: 摘要
+
 - id: publication
   translation: 出版物
+
 - id: publication_type
   translation: 类型
+
 - id: date
   translation: 日期
+
 - id: last_updated
   translation: 最近更新于
+
 - id: event
   translation: 事件
+
 - id: location
   translation: 位置
+
 - id: pub_uncat
   translation: 未分类
+
 - id: pub_conf
   translation: 会议文章
+
 - id: pub_journal
   translation: 期刊文章
+
 - id: pub_preprint
   translation: 预印本
+
 - id: pub_report
   translation: 报告
+
 - id: pub_book
   translation: 书籍
+
 - id: pub_book_section
   translation: 章节
+
 - id: pub_thesis
   translation: 论文
+
 - id: pub_patent
   translation: 专利
+
+# Project details
+
 - id: open_project_site
   translation: 访问项目网站
+
+# Default titles for archive pages
+
 - id: posts
   translation: 文章
+
 - id: publications
   translation: 出版物
+
 - id: talks
   translation: 演讲
+
 - id: projects
   translation: 项目
+
+# Search
+
 - id: search
   translation: 搜索
+
 - id: search_placeholder
   translation: 搜索...
+
 - id: search_results
   translation: 搜索结果
+
 - id: search_no_results
   translation: 没有找到结果
+
+# Error 404
+
 - id: page_not_found
   translation: 找不到页面
+
 - id: 404_recommendations
   translation: 也许你在找?
+
+# Cookie consent
+
 - id: cookie_message
   translation: 本网站使用cookies来确保您在本网站上获得最佳体验。
+
 - id: cookie_dismiss
   translation: 知道了!
+
 - id: cookie_learn
   translation: 了解更多

BIN
images/themes.png


+ 1 - 1
layouts/404.html

@@ -7,7 +7,7 @@
   {{/* Show search box if Academic's search engine is enabled. */}}
   {{ if eq site.Params.search.engine 1 }}
   <form class="d-flex align-items-center mb-3">
-    <input name="q" type="search" class="form-control" id="search-query" placeholder="{{ i18n "search_placeholder" }}" autocomplete="off">
+    <input name="q" type="search" class="form-control" placeholder="{{ i18n "search_placeholder" }}" autocomplete="off">
   </form>
   {{ end }}
 

+ 1 - 2
layouts/_default/baseof.html

@@ -2,8 +2,7 @@
 <html lang="{{ site.LanguageCode | default "en-us" }}">
 
 {{ partial "site_head.html" . }}
-
-<body id="top" data-spy="scroll" data-target="{{ if or .IsHome (eq .Type "widget_page") }}#navbar-main{{else}}#TableOfContents{{end}}" data-offset="71" {{ if not (.Scratch.Get "light") }}class="dark"{{end}}>
+<body id="top" data-spy="scroll" data-offset="70" data-target="{{ if or .IsHome (eq .Type "widget_page") }}#navbar-main{{else}}#TableOfContents{{end}}" {{ if not (.Scratch.Get "light") }}class="dark"{{end}}>
 
   {{ partial "search" . }}
 

+ 1 - 1
layouts/_default/list.html

@@ -4,7 +4,7 @@
 
 <div class="universal-wrapper">
   {{ with .Content }}
-  <div class="article-style" itemprop="articleBody">{{ . }}</div>
+  <div class="article-style">{{ . }}</div>
   {{ end }}
 
   {{ $paginator := .Paginate .Data.Pages }}

+ 18 - 13
layouts/_default/rss.xml

@@ -1,4 +1,5 @@
-{{/* Generate RSS with full page content rather than just summary. */}}
+{{- /* Generate RSS v2 with full page content. */ -}}
+{{- /* Upstream Hugo bug - RSS dates can be in future: https://github.com/gohugoio/hugo/issues/3918 */ -}}
 {{- $pages := .Data.Pages -}}
 {{- $limit := site.Config.Services.RSS.Limit -}}
 {{- if ge $limit 1 -}}
@@ -7,24 +8,28 @@
 {{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\" ?>" | safeHTML }}
 <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
   <channel>
-    <title>{{ if eq  .Title  site.Title }}{{ site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ site.Title }}{{ end }}</title>
+    <title>{{ if ne .Title site.Title }}{{ with .Title }}{{.}} | {{ end }}{{end}}{{ site.Title }}</title>
     <link>{{ .Permalink }}</link>
-    <description>Recent content {{ if ne  .Title  site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ site.Title }}</description>
-    <generator>Source Themes Academic (https://sourcethemes.com/academic/)</generator>{{ with site.LanguageCode }}
-    <language>{{.}}</language>{{end}}{{ with site.Author.email }}
-    <managingEditor>{{.}}{{ with site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with site.Author.email }}
-    <webMaster>{{.}}{{ with site.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with site.Copyright }}
-    <copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }}
-    <lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
-    {{ with .OutputFormats.Get "RSS" }}
-	    {{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
-    {{ end }}
+    {{- with .OutputFormats.Get "RSS" }}
+      {{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
+    {{ end -}}
+    <description>{{ .Title | default site.Title }}</description>
+    <generator>Source Themes Academic (https://sourcethemes.com/academic/)</generator>
+    {{- with site.LanguageCode }}<language>{{.}}</language>{{end -}}
+    {{- with site.Copyright }}<copyright>{{ replace (replace . "{year}" now.Year) "&copy;" "©" | plainify }}</copyright>{{end -}}
+    {{- if not .Date.IsZero }}<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end -}}
+    {{- if .Scratch.Get "og_image" }}
+    <image>
+      <url>{{ .Scratch.Get "og_image" }}</url>
+      <title>{{ .Title | default site.Title }}</title>
+      <link>{{ .Permalink }}</link>
+    </image>
+    {{end -}}
     {{ range $pages }}
     <item>
       <title>{{ .Title }}</title>
       <link>{{ .Permalink }}</link>
       <pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
-      {{ with site.Author.email }}<author>{{.}}{{ with site.Author.name }} ({{.}}){{end}}</author>{{end}}
       <guid>{{ .Permalink }}</guid>
       <description>{{ .Content | html }}</description>
     </item>

+ 9 - 7
layouts/_default/single.html

@@ -1,19 +1,21 @@
 {{- define "main" -}}
 
-<article class="article" itemscope itemtype="http://schema.org/Article">
+<article class="article">
 
-  {{ partial "page_header.html" . }}
+  {{ partial "page_header" . }}
 
   <div class="article-container">
 
-    <div class="article-style" itemprop="articleBody">
+    <div class="article-style">
       {{ .Content }}
     </div>
 
-    {{ partial "tags.html" . }}
+    {{ partial "page_edit" . }}
+
+    {{ partial "tags" . }}
 
     {{ if ne .Type "page" }}
-      {{ partial "page_author.html" . }}
+      {{ partial "page_author" . }}
       {{ $related := site.RegularPages.Related . | first 5 }}
       {{ with $related }}
       <div class="article-widget">
@@ -30,11 +32,11 @@
 
     {{ if site.Params.section_pager }}
     <div class="article-widget">
-      {{ partial "section_pager.html" . }}
+      {{ partial "section_pager" . }}
     </div>
     {{ end }}
 
-    {{ partial "comments.html" . }}
+    {{ partial "comments" . }}
 
   </div>
 </article>

+ 2 - 2
layouts/authors/list.html

@@ -5,7 +5,7 @@
 {{/* If an account has not been created for this user, just display their name as the title. */}}
 {{ if not .File }}
 <div class="universal-wrapper pt-3">
-  <h1 itemprop="name">{{ .Title }}</h1>
+  <h1>{{ .Title }}</h1>
 </div>
 {{ end }}
 
@@ -33,8 +33,8 @@
         {{ end }}
       </ul>
     </div>
+    {{ end }}
   </div>
-  {{ end }}
 </section>
 
 {{- end -}}

+ 1 - 1
layouts/authors/terms.html

@@ -6,7 +6,7 @@
 
 <div class="universal-wrapper">
   {{ with .Content }}
-  <div class="article-style" itemprop="articleBody">{{ . }}</div>
+  <div class="article-style">{{ . }}</div>
   {{ end }}
 
   <ul>

+ 12 - 1
layouts/index.html

@@ -1,9 +1,20 @@
 {{- define "main" -}}
 
-{{ if not (isset site.Params "color_theme") }}
+{{/* Check that user fully installed Academic. */}}
+{{ if not (isset site.Params "theme") }}
   {{ errorf "Please complete the installation of Academic by following the steps at https://sourcethemes.com/academic/docs/install/" }}
 {{ end }}
 
+{{/* Deprecation warnings */}}
+
+{{/* v4.5: Address changed from string to map. */}}
+{{ if isset site.Params "address" }}
+{{ if eq (reflect.IsMap site.Params.address) false }}
+  {{ errorf "Please upgrade the `address` field in `config/_default/params.toml`. Refer to all of the Breaking Changes in v4.5 at https://sourcethemes.com/academic/updates/v4.5.0/" }}
+{{ end }}
+{{ end }}
+
+{{/* Generate homepage. */}}
 {{ partial "widget_page.html" . }}
 
 {{- end -}}

+ 19 - 0
layouts/index.webmanifest

@@ -0,0 +1,19 @@
+{{- $scr := .Scratch -}}
+{
+  "name": "{{site.Title}}",
+  "short_name": "{{site.Title}}",
+  "lang": "{{site.LanguageCode}}",
+  "theme_color": "{{ $scr.Get "primary" }}",
+  "background_color": "{{ $scr.Get "primary" }}",
+  "icons": [{
+    "src": "img/icon-192.png",
+    "sizes": "192x192",
+    "type": "image/png"
+    }, {
+    "src": "img/icon-512.png",
+    "sizes": "512x512",
+    "type": "image/png"
+     }],
+  "display": "standalone",
+  "start_url": "{{ "/" | relLangURL }}?utm_source=web_app_manifest"
+}

+ 6 - 2
layouts/partials/comments.html

@@ -1,5 +1,9 @@
-{{ if and site.DisqusShortname (not (or site.Params.disable_comments .Params.disable_comments)) }}
+{{ if site.Params.comments.engine | and (index site.Params.comments.commentable .Type) | and (ne .Params.commentable false) | or .Params.commentable }}
 <section id="comments">
-  {{ template "_internal/disqus.html" . }}
+  {{ if eq site.Params.comments.engine 1 }}
+    {{ partial "comments/disqus.html" . }}
+  {{ else if eq site.Params.comments.engine 2 }}
+    {{ partial "comments/commento.html" . }}
+  {{ end }}
 </section>
 {{ end }}

+ 2 - 0
layouts/partials/comments/commento.html

@@ -0,0 +1,2 @@
+<div id="commento"></div>
+<script src="https://cdn.commento.io/js/commento.js" defer></script>

+ 22 - 0
layouts/partials/comments/disqus.html

@@ -0,0 +1,22 @@
+{{ if site.Params.comments.disqus.shortname }}
+<div id="disqus_thread"></div>
+<script>
+  let disqus_config = function () {
+    {{with .Params.disqus_identifier }}this.page.identifier = '{{ . }}';{{end}}
+    {{with .Params.disqus_title }}this.page.title = '{{ . }}';{{end}}
+    {{with .Params.disqus_url }}this.page.url = '{{ . | html  }}';{{end}}
+  };
+  (function() {
+    if (["localhost", "127.0.0.1"].indexOf(window.location.hostname) != -1) {
+      document.getElementById('disqus_thread').innerHTML = 'Disqus comments not available by default when the website is previewed locally.';
+      return;
+    }
+    var d = document, s = d.createElement('script'); s.async = true;
+    s.src = 'https://' + {{site.Params.comments.disqus.shortname}} + '.disqus.com/embed.js';
+    s.setAttribute('data-timestamp', +new Date());
+    (d.head || d.body).appendChild(s);
+  })();
+</script>
+<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
+<a href="https://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
+{{end}}

+ 1 - 1
layouts/partials/cookie_consent.html

@@ -1,7 +1,7 @@
 {{ if site.Params.privacy_pack }}
 {{ $scr := .Scratch }}
 <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.0.3/cookieconsent.min.css">
-<script src="//cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.0.3/cookieconsent.min.js"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.0.3/cookieconsent.min.js"></script>
 <script>
   window.addEventListener("load", function(){
     window.cookieconsent.initialise({

+ 8 - 4
layouts/partials/docs_layout.html

@@ -20,12 +20,12 @@
 
     <main class="col-12 col-md-9 col-xl-8 py-md-3 pl-md-5 docs-content" role="main">
 
-      <article class="article" itemscope itemtype="http://schema.org/Article">
+      <article class="article">
 
         <div class="docs-article-container">
-          <h1 itemprop="name">{{ .Title }}</h1>
+          <h1>{{ .Title }}</h1>
 
-          <div class="article-style" itemprop="articleBody">
+          <div class="article-style">
             {{ .Content }}
           </div>
 
@@ -39,7 +39,11 @@
         </div>
 
         <div class="body-footer">
-          {{ i18n "last_updated" }} {{ $.Lastmod.Format site.Params.date_format }}
+          <p>{{ i18n "last_updated" }} {{ $.Lastmod.Format site.Params.date_format }}</p>
+
+          {{ partial "page_edit" . }}
+
+          {{ partial "comments" . }}
         </div>
 
       </article>

+ 1 - 1
layouts/partials/docs_sidebar.html

@@ -12,7 +12,7 @@
   </button>
 
   {{ if eq site.Params.search.engine 1 }}
-  <input name="q" type="search" class="form-control" id="search-query" placeholder="{{ i18n "search_placeholder" }}" autocomplete="off">
+  <input name="q" type="search" class="form-control" placeholder="{{ i18n "search_placeholder" }}" autocomplete="off">
   {{ end }}
 </form>
 

+ 17 - 0
layouts/partials/functions/get_event_dates.html

@@ -0,0 +1,17 @@
+{{/* Function to get event start and end dates/times. */}}
+{{ $t1 := time .Date }}{{/* Start datetime. */}}
+{{ $str := slice ((time $t1).Format site.Params.date_format) }}{{/* Init return string with start date. */}}
+{{/* Show start time if not all day event. */}}
+{{ if not .Params.all_day }}{{ $str = $str | append ((time $t1).Format (site.Params.time_format)) }}{{ end }}
+{{/* Show event end date if provided. */}}
+{{ if .Params.date_end }}
+  {{ $str = $str | append "&mdash;" }}
+  {{ $t2 := time .Params.date_end}}{{/* End datetime. */}}
+  {{/* Show end date if it differs to start date. */}}
+  {{ if not (eq $t1.Year $t2.Year | and (eq $t1.Month $t2.Month) | and (eq $t1.Day $t2.Day)) }}
+    {{ $str = $str | append ((time $t2).Format site.Params.date_format) }}
+  {{ end }}
+  {{/* Show end time if not all day event. */}}
+  {{ if not .Params.all_day }}{{ $str = $str | append ((time $t2).Format (site.Params.time_format)) }}{{ end }}
+{{ end }}
+{{ return (delimit $str " ") }}

+ 51 - 47
layouts/partials/functions/parse_theme.html

@@ -1,53 +1,57 @@
 {{- $scr := .Scratch -}}
 
-{{/* Attempt to load font style specified by user. */}}
-{{- $font_index := site.Params.font | default "default" -}}
-{{ if (index site.Data.fonts $font_index) }}
-  {{- $font := index site.Data.fonts $font_index -}}
-  {{- $scr.Set "google_fonts" $font.google_fonts -}}
-  {{- $scr.Set "body_font" $font.body_font -}}
-  {{- $scr.Set "heading_font" $font.heading_font -}}
-  {{- $scr.Set "nav_font" $font.nav_font -}}
-  {{- $scr.Set "mono_font" $font.mono_font -}}
-  {{- $scr.Set "font_size" $font.font_size -}}
-  {{- $scr.Set "font_size_small" $font.font_size_small -}}
-{{ else }}
-  {{ errorf "The `%s` font theme was not found! Check that the `font` option in `config/_default/params.toml` matches the name of an installed font theme." $font_index }}
-{{ end }}
+{{/* Get name of site's Theme. Precedence: Params.toml > Default (Minimal) */}}
+{{- $theme_index := (site.Params.theme | lower | replaceRE "\\s" "_") | default "minimal" -}}
+
+{{/* Get name of site's Font Set. Precedence: Params.toml > Theme > Default (Minimal) */}}
+{{- $font_index := (site.Params.font | lower | replaceRE "\\s" "_") | default ((index site.Data.themes $theme_index).font | lower | replaceRE "\\s" "_") | default $theme_index -}}
+{{- $font_index := cond (isset site.Data.fonts $font_index) $font_index "minimal" -}}
+
+{{/* Get Font Size. */}}
+
+{{- $font_size := lower site.Params.font_size | default "l" -}}
+{{- $font_sizes := dict "xs" 14 "s" 16 "m" 18 "l" 21 "xl" 23 -}}
+{{- $font_size_numeric := (index $font_sizes $font_size) | default (index $font_sizes "l") -}}
+{{- $scr.Set "font_size" $font_size_numeric -}}
+{{- $scr.Set "font_size_small" (mul 0.77 $font_size_numeric) -}}
+
+{{/* Load Font Set. */}}
 
-{{/* Attempt to load color theme specified by user. */}}
-{{- $theme_index := site.Params.color_theme | default "default" -}}
-{{ if (index site.Data.themes $theme_index) }}
-  {{ $theme := index site.Data.themes $theme_index }}
-
-  {{- $scr.Set "light" ($theme.light | default true) -}}
-
-  {{ if $theme.light }}
-    {{- $scr.Set "background" ($theme.background | default "#fff") -}}
-    {{- $scr.Set "dark_background" "rgb(40, 42, 54)" -}}
-    {{- $scr.Set "home_section_odd" $theme.home_section_odd -}}
-    {{- $scr.Set "home_section_even" $theme.home_section_even -}}
-    {{- $scr.Set "dark_home_section_odd" "hsla(231, 15%, 18%, 1)" -}}
-    {{- $scr.Set "dark_home_section_even" "hsla(231, 15%, 16%, 1)" -}}
-  {{ else }}
-    {{- $scr.Set "background" ($theme.background | default "#fff") -}}
-    {{- $scr.Set "dark_background" ($theme.background | default "rgb(40, 42, 54)") -}}
-    {{- $scr.Set "home_section_odd" "rgb(255, 255, 255)" -}}
-    {{- $scr.Set "home_section_even" "rgb(247, 247, 247)" -}}
-    {{- $scr.Set "dark_home_section_odd" $theme.home_section_odd -}}
-    {{- $scr.Set "dark_home_section_even" $theme.home_section_even -}}
-  {{ end }}
-
-  {{- $scr.Set "link" ($theme.link | default $theme.primary) -}}
-  {{- $scr.Set "link_hover" ($theme.link_hover | default $theme.primary) -}}
-
-  {{- $scr.Set "primary" $theme.primary -}}
-
-  {{- $scr.Set "menu_primary" $theme.menu_primary -}}
-  {{- $scr.Set "menu_text" $theme.menu_text -}}
-  {{- $scr.Set "menu_text_active" $theme.menu_text_active -}}
-  {{- $scr.Set "menu_title" $theme.menu_title -}}
+{{- $font := index site.Data.fonts $font_index -}}
+{{- $scr.Set "google_fonts" $font.google_fonts -}}
+{{- $scr.Set "body_font" $font.body_font -}}
+{{- $scr.Set "heading_font" $font.heading_font -}}
+{{- $scr.Set "nav_font" $font.nav_font -}}
+{{- $scr.Set "mono_font" $font.mono_font -}}
 
+{{/* Load Theme. */}}
+
+{{ $theme := index site.Data.themes $theme_index }}
+
+{{- $scr.Set "light" ($theme.light | default true) -}}
+
+{{ if $theme.light }}
+  {{- $scr.Set "background" ($theme.background | default "#fff") -}}
+  {{- $scr.Set "dark_background" "rgb(40, 42, 54)" -}}
+  {{- $scr.Set "home_section_odd" $theme.home_section_odd -}}
+  {{- $scr.Set "home_section_even" $theme.home_section_even -}}
+  {{- $scr.Set "dark_home_section_odd" "hsla(231, 15%, 18%, 1)" -}}
+  {{- $scr.Set "dark_home_section_even" "hsla(231, 15%, 16%, 1)" -}}
 {{ else }}
-  {{ errorf "The `%s` color theme was not found! Check that the `color_theme` option in `config/_default/params.toml` matches the name of an installed color theme." $theme_index }}
+  {{- $scr.Set "background" ($theme.background | default "#fff") -}}
+  {{- $scr.Set "dark_background" ($theme.background | default "rgb(40, 42, 54)") -}}
+  {{- $scr.Set "home_section_odd" "rgb(255, 255, 255)" -}}
+  {{- $scr.Set "home_section_even" "rgb(247, 247, 247)" -}}
+  {{- $scr.Set "dark_home_section_odd" $theme.home_section_odd -}}
+  {{- $scr.Set "dark_home_section_even" $theme.home_section_even -}}
 {{ end }}
+
+{{- $scr.Set "link" ($theme.link | default $theme.primary) -}}
+{{- $scr.Set "link_hover" ($theme.link_hover | default $theme.primary) -}}
+
+{{- $scr.Set "primary" $theme.primary -}}
+
+{{- $scr.Set "menu_primary" $theme.menu_primary -}}
+{{- $scr.Set "menu_text" $theme.menu_text -}}
+{{- $scr.Set "menu_text_active" $theme.menu_text_active -}}
+{{- $scr.Set "menu_title" $theme.menu_title -}}

+ 60 - 0
layouts/partials/jsonld/article.html

@@ -0,0 +1,60 @@
+{{ $page := .page }}
+{{ $summary := .summary }}
+{{ $featured_image := ($page.Resources.ByType "image").GetMatch "*featured*" }}
+
+{{/* Get schema type. */}}
+{{ $schema := "Article" }}
+{{ if eq $page.Type "post" }}
+  {{ $schema = "BlogPosting" }}
+{{ end }}
+
+{{/* Get author name. */}}
+{{ $author_username := "" }}
+{{ if and (not $page.Params.authors) ($page.Scratch.Get "superuser_username") }}
+  {{ $author_username = $page.Scratch.Get "superuser_username" }}
+{{ else if $page.Params.authors }}
+  {{ $author_username = index $page.Params.authors 0 }}
+{{ end }}
+{{ $author := "" }}
+{{ $taxonomy := "authors" }}
+{{ $profile_page := site.GetPage (printf "/%s/%s" $taxonomy $author_username) }}
+{{ with $profile_page }}
+  {{ $author = .Params.name | default .Title }}
+{{ end }}
+
+{{ $publisher := site.Params.org_name | default site.Title }}
+{{ $logo_url := printf "img/%s" (site.Params.logo | default "icon-512.png") | absURL }}
+
+<script type="application/ld+json">
+{
+  "@context": "https://schema.org",
+  "@type": {{$schema}},
+  "mainEntityOfPage": {
+    "@type": "WebPage",
+    "@id": {{$page.Permalink}}
+  },
+  "headline": {{$page.Title}},
+  {{ if $featured_image }}
+  "image": [
+    {{$featured_image.Permalink}}
+  ],
+  {{end}}
+  "datePublished": {{ $page.PublishDate.Format "2006-01-02T15:04:05Z07:00" }},
+  "dateModified": {{ $page.Lastmod.Format "2006-01-02T15:04:05Z07:00" }},
+  {{with $author}}
+  "author": {
+    "@type": "Person",
+    "name": {{.}}
+  },
+  {{end}}
+  "publisher": {
+    "@type": "Organization",
+    "name": {{$publisher}},
+    "logo": {
+      "@type": "ImageObject",
+      "url": {{$logo_url}}
+    }
+  },
+  "description": {{$summary}}
+}
+</script>

+ 29 - 0
layouts/partials/jsonld/business.html

@@ -0,0 +1,29 @@
+<script type="application/ld+json">
+{
+  "@context": "https://schema.org",
+  "@type": {{site.Params.local_business_type | default site.Params.site_type}},
+  "@id": {{site.BaseURL}},
+  "name": {{site.Params.org_name | default site.Title}},
+  {{with site.Params.logo}}"logo": {{printf "img/%s" . | absURL}},{{end}}
+  {{with site.Params.sharing_image}}"image": {{printf "img/%s" . | absURL}},{{end}}
+  {{ if (eq site.Params.site_type "LocalBusiness") | and site.Params.coordinates }}
+  "geo": {
+    "@type": "GeoCoordinates",
+    "latitude": {{site.Params.coordinates.latitude}},
+    "longitude": {{site.Params.coordinates.longitude}}
+  },
+  {{end}}
+  {{ with site.Params.address }}
+  "address": {
+    "@type": "PostalAddress",
+    "streetAddress": {{ .street | default "" }},
+    "addressLocality": {{ .city | default "" }},
+    "addressRegion": {{ .region | default "" }},
+    "postalCode": {{ .postcode | default "" }},
+    "addressCountry": {{ .country_code | default .country | default "" }}
+  },
+  {{end}}
+  {{ with site.Params.phone }}"telephone": {{.}},{{end}}
+  "url": {{site.BaseURL}}
+}
+</script>

+ 60 - 0
layouts/partials/jsonld/event.html

@@ -0,0 +1,60 @@
+{{ $page := .page }}
+{{ $summary := .summary }}
+{{ $featured_image := ($page.Resources.ByType "image").GetMatch "*featured*" }}
+
+{{/* Get author name. */}}
+{{ $author_username := "" }}
+{{ if and (not $page.Params.authors) ($page.Scratch.Get "superuser_username") }}
+  {{ $author_username = $page.Scratch.Get "superuser_username" }}
+{{ else if $page.Params.authors }}
+  {{ $author_username = index $page.Params.authors 0 }}
+{{ end }}
+{{ $author := "" }}
+{{ $taxonomy := "authors" }}
+{{ $profile_page := site.GetPage (printf "/%s/%s" $taxonomy $author_username) }}
+{{ with $profile_page }}
+  {{ $author = .Params.name | default .Title }}
+{{ end }}
+
+<script type="application/ld+json">
+{
+  "@context": "https://schema.org",
+  "@type": "Event",
+  "mainEntityOfPage": {
+    "@type": "WebPage",
+    "@id": {{$page.Permalink}}
+  },
+  "name": {{$page.Title}},
+  {{ with $page.Params.location }}
+  "location": {
+    "@type": "Place",
+    "name": {{. | plainify}}{{if $page.Params.address}},
+    "address": {
+      "@type": "PostalAddress",
+      "streetAddress": {{$page.Params.address.street | default ""}},
+      "addressLocality": {{$page.Params.address.city | default ""}},
+      "postalCode": {{$page.Params.address.postcode | default ""}},
+      "addressRegion": {{$page.Params.address.region | default ""}},
+      "addressCountry": {{$page.Params.address.country | default ""}}
+    }
+    {{end}}
+  },
+  {{end}}
+  {{ if $featured_image }}
+  "image": [
+    {{$featured_image.Permalink}}
+  ],
+  {{end}}
+  "startDate": {{ $page.Date.Format "2006-01-02T15:04:05Z07:00" }},
+  {{with $page.Params.date_end}}
+  "endDate": {{ (time .).Format "2006-01-02T15:04:05Z07:00" }},
+  {{end}}
+  {{with $author}}
+  "performer": {
+    "@type": "Person",
+    "name": {{.}}
+  },
+  {{end}}
+  "description": {{$summary}}
+}
+</script>

+ 23 - 0
layouts/partials/jsonld/main.html

@@ -0,0 +1,23 @@
+{{ $page := .page }}
+{{ $summary := .summary }}
+{{ $site_type := site.Params.site_type | default "Person" }}
+
+{{- if $page.IsHome -}}
+
+  {{ partial "jsonld/website.html" $page }}
+
+  {{ if ne $site_type "Person" }}
+    {{ partial "jsonld/business.html" $page }}
+  {{ end }}
+
+{{- else if $page.IsPage -}}
+
+  {{ if (eq $page.Type "post") | or (eq $page.Type "publication") | or (eq $page.Type "project") }}
+    {{ partial "jsonld/article.html" (dict "page" $page "summary" $summary) }}
+  {{ end }}
+
+  {{ if eq $page.Type "talk" }}
+    {{ partial "jsonld/event.html" (dict "page" $page "summary" $summary) }}
+  {{ end }}
+
+{{- end }}

+ 14 - 0
layouts/partials/jsonld/website.html

@@ -0,0 +1,14 @@
+<script type="application/ld+json">
+{
+  "@context": "https://schema.org",
+  "@type": "WebSite",
+  {{- if site.Params.search.engine }}
+  "potentialAction": {
+    "@type": "SearchAction",
+    "target": {{ printf "%s?q={search_term_string}" site.BaseURL }},
+    "query-input": "required name=search_term_string"
+  },
+  {{end -}}
+  "url": {{site.BaseURL}}
+}
+</script>

+ 12 - 24
layouts/partials/li_card.html

@@ -1,16 +1,11 @@
 {{ $item := . }}
 
-{{ $microdata_type := "CreativeWork" }}
-{{ $show_buttons := false }}
 
 {{/* Dynamic view adjusts to content type. */}}
-{{ if eq $item.Type "post" }}
-  {{ $microdata_type = "BlogPosting" }}
-{{ else if eq $item.Type "talk" }}
-  {{ $microdata_type = "Event" }}
+{{ $show_buttons := false }}
+{{ if eq $item.Type "talk" }}
   {{ $show_buttons = true }}
 {{ else if eq $item.Type "publication" }}
-  {{ $microdata_type = "ScholarlyArticle" }}
   {{ $show_buttons = true }}
 {{ end }}
 
@@ -26,28 +21,21 @@
   {{ $summary = $item.Content }}
 {{ end }}
 
-<div class="card-simple" itemscope itemtype="http://schema.org/{{$microdata_type}}">
+<div class="card-simple">
 
   {{ if eq $item.Type "talk" }}
   <div class="article-metadata">
     {{ if $item.Params.authors }}
-    <div itemprop="author">
+    <div>
       {{ partial "page_metadata_authors" $item }}
     </div>
     {{ end }}
-    <span itemprop="startDate">
-      {{ $date := $item.Date }}
-      {{ (time $date).Format site.Params.date_format }}
-      {{ if not $item.Params.all_day }}
-        {{ (time $date).Format (site.Params.time_format | default "3:04 PM") }}
-        {{ with $item.Params.date_end }}
-        &mdash; {{ (time .).Format (site.Params.time_format | default "3:04 PM") }}
-        {{ end }}
-      {{ end }}
+    <span>
+      {{ partial "functions/get_event_dates" $item }}
     </span>
     {{ with $item.Params.location }}
     <span class="middot-divider"></span>
-    <span itemprop="location">{{ . }}</span>
+    <span>{{ . }}</span>
     {{ end }}
   </div>
   {{ else }}
@@ -59,17 +47,17 @@
   {{ with $resource }}
   {{ $image := .Fill (printf "918x517 q90 %s" $anchor) }}
   <a href="{{ $item.RelPermalink }}">
-      <img src="{{ $image.RelPermalink }}" class="article-banner" itemprop="image" alt="">
+      <img src="{{ $image.RelPermalink }}" class="article-banner" alt="">
   </a>
   {{end}}
 
-  <h3 class="article-title mb-1 mt-3" itemprop="name">
-    <a href="{{ $item.RelPermalink }}" itemprop="url">{{ $item.Title }}</a>
+  <h3 class="article-title mb-1 mt-3">
+    <a href="{{ $item.RelPermalink }}">{{ $item.Title }}</a>
   </h3>
 
   {{ with $summary }}
-  <div class="article-style" itemprop="articleBody">
-    {{ . }}
+  <div class="article-style">
+    <p>{{.}}</p>
   </div>
   {{ end }}
 

+ 5 - 5
layouts/partials/li_citation.html

@@ -1,14 +1,14 @@
-<div class="pub-list-item" style="margin-bottom: 1rem" itemscope itemtype="http://schema.org/CreativeWork">
+<div class="pub-list-item" style="margin-bottom: 1rem">
   <i class="far fa-file-alt pub-icon" aria-hidden="true"></i>
 
   {{/* APA Style */}}
   {{ if eq (site.Params.publications.citation_style | default "apa") "apa" }}
 
-  <span itemprop="author" class="article-metadata li-cite-author">
+  <span class="article-metadata li-cite-author">
     {{ partial "page_metadata_authors" . }}
   </span>
   ({{- .Date.Format "2006" -}}).
-  <a href="{{ .RelPermalink }}" itemprop="name">{{ .Title }}</a>.
+  <a href="{{ .RelPermalink }}">{{ .Title }}</a>.
   {{ if .Params.publication_short }}
   {{- .Params.publication_short | markdownify -}}.
   {{ else if .Params.publication }}
@@ -19,10 +19,10 @@
   {{/* MLA Style */}}
   {{ else }}
 
-  <span itemprop="author" class="article-metadata li-cite-author">
+  <span class="article-metadata li-cite-author">
     {{ partial "page_metadata_authors" . }}
   </span>.
-  <a href="{{ .RelPermalink }}" itemprop="name">{{ .Title }}</a>.
+  <a href="{{ .RelPermalink }}">{{ .Title }}</a>.
   {{ if .Params.publication_short }}
   {{- .Params.publication_short | markdownify -}},
   {{ else if .Params.publication }}

+ 21 - 25
layouts/partials/li_compact.html

@@ -1,18 +1,21 @@
 {{ $item := . }}
 
-{{ $microdata_type := "CreativeWork" }}
+{{/* Dynamic view adjusts to content type. */}}
 {{ $show_authors_only := false }}{{/* Show authors only or full metadata? */}}
 {{ $show_buttons := false }}
-
-{{/* Dynamic view adjusts to content type. */}}
-{{ if eq $item.Type "post" }}
-  {{ $microdata_type = "BlogPosting" }}
-{{ else if eq $item.Type "talk" }}
-  {{ $microdata_type = "Event" }}
+{{ $link := $item.RelPermalink }}
+{{ $target := "" }}
+{{ if $item.Params.external_link }}
+  {{ $link = $item.Params.external_link }}
+  {{ $target = "target=\"_blank\" rel=\"noopener\"" }}
+{{ end }}
+{{ if eq $item.Type "talk" }}
   {{ $show_authors_only = true }}
   {{ $show_buttons = true }}
 {{ else if eq $item.Type "publication" }}
-  {{ $microdata_type = "ScholarlyArticle" }}
+  {{ $show_authors_only = true }}
+  {{ $show_buttons = true }}
+{{ else if eq $item.Type "project" }}
   {{ $show_authors_only = true }}
   {{ $show_buttons = true }}
 {{ end }}
@@ -27,15 +30,15 @@
   {{ $summary = $item.Summary }}
 {{ end }}
 
-<div class="media stream-item" itemscope itemtype="http://schema.org/{{$microdata_type}}">
+<div class="media stream-item">
   <div class="media-body">
 
-    <h3 class="article-title mb-0 mt-0" itemprop="name">
-      <a href="{{ $item.RelPermalink }}" itemprop="url">{{ $item.Title }}</a>
+    <h3 class="article-title mb-0 mt-0">
+      <a href="{{$link}}" {{ $target | safeHTMLAttr }}>{{ $item.Title }}</a>
     </h3>
 
     {{ with $summary }}
-    <div class="article-style" itemprop="articleBody">
+    <div class="article-style">
       {{ . | truncate 135 }}
     </div>
     {{ end }}
@@ -44,25 +47,18 @@
 
       {{ if eq $item.Type "talk" }}
       <div>
-        <span itemprop="startDate">
-          {{ $date := $item.Date }}
-          {{ (time $date).Format site.Params.date_format }}
-          {{ if not $item.Params.all_day }}
-            {{ (time $date).Format (site.Params.time_format | default "3:04 PM") }}
-            {{ with $item.Params.date_end }}
-            &mdash; {{ (time .).Format (site.Params.time_format | default "3:04 PM") }}
-            {{ end }}
-          {{ end }}
+        <span>
+          {{ partial "functions/get_event_dates" $item }}
         </span>
         {{ with $item.Params.location }}
         <span class="middot-divider"></span>
-        <span itemprop="location">{{ . }}</span>
+        <span>{{ . }}</span>
         {{ end }}
       </div>
       {{ end }}
 
       {{ if and $show_authors_only $item.Params.authors }}
-      <div itemprop="author">
+      <div>
         {{ partial "page_metadata_authors" $item }}
       </div>
       {{ else if not $show_authors_only }}
@@ -81,8 +77,8 @@
     {{ $resource := ($item.Resources.ByType "image").GetMatch "*featured*" }}
     {{ with $resource }}
     {{ $image := .Resize "150x" }}
-    <a href="{{ $item.RelPermalink }}">
-      <img src="{{ $image.RelPermalink }}" itemprop="image">
+    <a href="{{$link}}" {{ $target | safeHTMLAttr }}>
+      <img src="{{ $image.RelPermalink }}" alt="">
     </a>
     {{end}}
   </div>

+ 20 - 20
layouts/partials/li_list.html

@@ -1,48 +1,48 @@
 {{ $item := . }}
 
-{{ $microdata_type := "CreativeWork" }}
+{{/* Dynamic view adjusts to content type. */}}
+{{ $icon_pack := "far" }}
 {{ $icon := "fa-file-alt" }}
 {{ $show_authors := false }}
 {{ $show_buttons := false }}
-
-{{/* Dynamic view adjusts to content type. */}}
+{{ $link := $item.RelPermalink }}
+{{ $target := "" }}
+{{ if $item.Params.external_link }}
+  {{ $link = $item.Params.external_link }}
+  {{ $target = "target=\"_blank\" rel=\"noopener\"" }}
+{{ end }}
 {{ if eq $item.Type "post" }}
-  {{ $microdata_type = "BlogPosting" }}
   {{ $icon = "fa-newspaper" }}
 {{ else if eq $item.Type "talk" }}
-  {{ $microdata_type = "Event" }}
   {{ $icon = "fa-calendar-alt" }}
 {{ else if eq $item.Type "publication" }}
-  {{ $microdata_type = "ScholarlyArticle" }}
+  {{ $show_authors = true }}
+  {{ $show_buttons = true }}
+{{ else if eq $item.Type "project" }}
+  {{ $icon_pack = "fas" }}
+  {{ $icon = "fa-project-diagram" }}
   {{ $show_authors = true }}
   {{ $show_buttons = true }}
 {{ end }}
 
-<div class="view-list-item" itemscope itemtype="http://schema.org/{{$microdata_type}}">
-  <i class="far {{$icon}} pub-icon" aria-hidden="true"></i>
-  <a href="{{ $item.RelPermalink }}" itemprop="url"><span itemprop="name">{{ $item.Title }}</span></a>
+<div class="view-list-item">
+  <i class="{{$icon_pack}} {{$icon}} pub-icon" aria-hidden="true"></i>
+  <a href="{{$link}}" {{ $target | safeHTMLAttr }}>{{ $item.Title }}</a>
 
   {{ if eq $item.Type "talk" }}
   <div class="article-metadata">
-    <span itemprop="startDate">
-      {{ $date := $item.Date }}
-      {{ (time $date).Format site.Params.date_format }}
-      {{ if not $item.Params.all_day }}
-        {{ (time $date).Format (site.Params.time_format | default "3:04 PM") }}
-        {{ with $item.Params.date_end }}
-        &mdash; {{ (time .).Format (site.Params.time_format | default "3:04 PM") }}
-        {{ end }}
-      {{ end }}
+    <span>
+      {{ partial "functions/get_event_dates" $item }}
     </span>
     {{ with $item.Params.location }}
     <span class="middot-divider"></span>
-    <span itemprop="location">{{ . }}</span>
+    <span>{{ . }}</span>
     {{ end }}
   </div>
   {{ end }}
 
   {{ if and $show_authors $item.Params.authors }}
-  <div class="article-metadata" itemprop="author">
+  <div class="article-metadata">
     {{ partial "page_metadata_authors" $item }}
   </div>
   {{ end }}

+ 2 - 3
layouts/partials/navbar.html

@@ -1,5 +1,5 @@
 {{ $current_page := . }}
-<nav class="navbar navbar-light fixed-top navbar-expand-lg py-0" id="navbar-main">
+<nav class="navbar navbar-light fixed-top navbar-expand-lg py-0 compensate-for-scrollbar" id="navbar-main">
   <div class="container">
 
     <!-- Brand and toggle get grouped for better mobile display -->
@@ -107,8 +107,7 @@
         {{ if .IsTranslated }}
         <li class="nav-item dropdown">
           <a href="#" class="nav-link dropdown-toggle" data-toggle="dropdown" aria-haspopup="true">
-            <i class="fas fa-globe" aria-hidden="true"></i>
-            <span>{{ index site.Data.i18n.languages .Lang }}</span>
+            <i class="fas fa-globe mr-1" aria-hidden="true"></i><span>{{ index site.Data.i18n.languages .Lang }}</span>
           </a>
           <ul class="dropdown-menu">
             {{ range .Translations }}

+ 8 - 8
layouts/partials/page_author.html

@@ -16,32 +16,32 @@
   {{ $author_urlized = urlize $first_author }}
 {{ end }}
 
-
 {{ range $key, $value := $.Params.authors }}
 {{ $author := $value }}
 {{ $author_urlized = urlize $author }}
 
+{{ $site_type := site.Params.site_type | default "Person" }}
 {{ $taxonomy := "authors" }}
 {{ $profile_page := site.GetPage (printf "/%s/%s" $taxonomy $author_urlized) }}
 {{ with $profile_page }}
   {{/* If it's a personal site and primary page author is superuser, link to the homepage rather than their profile page. */}}
   {{ $profile_url := .RelPermalink }}
-  {{ if and (not site.Data.organization.name) (eq .Params.superuser true) }}
+  {{ if and (eq $site_type "Person") (eq .Params.superuser true) }}
     {{ $profile_url = site.BaseURL }}
   {{ end }}
   {{ $avatar := (.Resources.ByType "image").GetMatch "*avatar*" }}
-  <div class="media author-card" itemscope itemtype="http://schema.org/Person">
+  <div class="media author-card">
     {{ if and site.Params.gravatar .Params.email }}
-      <img class="portrait mr-3" src="https://s.gravatar.com/avatar/{{ md5 .Params.email }}?s=200')" itemprop="image" alt="Avatar">
+      <img class="portrait mr-3" src="https://s.gravatar.com/avatar/{{ md5 .Params.email }}?s=200')" alt="Avatar">
     {{ else if $avatar }}
       {{ $avatar_image := $avatar.Fill "250x250 Center" }}
-      <img class="portrait mr-3" src="{{ $avatar_image.RelPermalink }}" itemprop="image" alt="Avatar">
+      <img class="portrait mr-3" src="{{ $avatar_image.RelPermalink }}" alt="Avatar">
     {{ end }}
 
     <div class="media-body">
-      <h5 class="card-title" itemprop="name"><a href="{{$profile_url}}">{{.Params.name}}</a></h5>
+      <h5 class="card-title"><a href="{{$profile_url}}">{{.Params.name}}</a></h5>
       {{ with .Params.role }}<h6 class="card-subtitle">{{. | markdownify | emojify}}</h6>{{end}}
-      {{ with .Params.bio }}<p class="card-text" itemprop="description">{{. | markdownify | emojify}}</p>{{end}}
+      {{ with .Params.bio }}<p class="card-text">{{. | markdownify | emojify}}</p>{{end}}
       <ul class="network-icon" aria-hidden="true">
         {{ range .Params.social }}
           {{ $pack := or .icon_pack "fas" }}
@@ -58,7 +58,7 @@
             {{ $target = "target=\"_blank\" rel=\"noopener\"" }}
           {{ end }}
           <li>
-            <a itemprop="sameAs" href="{{ $link | safeURL }}" {{ $target | safeHTMLAttr }}>
+            <a href="{{ $link | safeURL }}" {{ $target | safeHTMLAttr }}>
               <i class="{{ $pack }} {{ $pack_prefix }}-{{ .icon }}"></i>
             </a>
           </li>

+ 7 - 0
layouts/partials/page_edit.html

@@ -0,0 +1,7 @@
+{{ if site.Params.edit_page.repo_url | and (index site.Params.edit_page.editable .Type) | and (ne .Params.editable false) | or .Params.editable }}
+<p class="edit-page">
+  <a href="{{site.Params.edit_page.repo_url}}/edit/{{site.Params.edit_page.repo_branch | default "master"}}/content/{{.File.Path}}">
+    <i class="fas fa-pen pr-2"></i>{{ i18n "edit_page" | default "Edit this page" }}
+  </a>
+</p>
+{{ end }}

+ 33 - 36
layouts/partials/page_header.html

@@ -19,52 +19,41 @@
 <div class="article-header">
   {{ $img_src := urls.Parse .Params.header.image }}
   {{ if $img_src.Scheme }}
-  <img src="{{ .Params.header.image }}" class="article-banner" itemprop="image" alt="">
+  <img src="{{ .Params.header.image }}" class="article-banner" alt="">
   {{ else }}
-  <img src="{{ (printf "/img/%s" .Params.header.image) | relURL }}" class="article-banner" itemprop="image" alt="">
+  <img src="{{ (printf "/img/%s" .Params.header.image) | relURL }}" class="article-banner" alt="">
   {{ end }}
 
   {{ with .Params.header.caption }}<span class="article-header-caption">{{ . | markdownify | emojify }}</span>{{ end }}
 </div>
 {{end}}
 
-{{/* Featured image */}}
+{{/* Featured image layout */}}
 {{ if and $featured (not .Params.image.preview_only) }}
-{{ $image := $featured.Resize "800x" }}
-<div class="article-header d-xl-none">
-  <div class="featured-image" style="background-image: url('{{ $image.RelPermalink }}');"></div>
-  {{ with $.Params.image.caption }}<span class="article-header-caption">{{ . | markdownify | emojify }}</span>{{ end }}
-</div>
-
-{{ $image := $featured.Fill (printf "680x500 q90 %s" $anchor) }}
-<div class="container-fluid split-header d-none d-xl-block">
-  <div class="row">
-    <div class="col-6">
-      <div class="split-header-content">
-        <h1 itemprop="name">{{ $title }}</h1>
-
-        {{ with $page.Params.subtitle }}
-        <p class="page-subtitle">{{ . | markdownify | emojify }}</p>
-        {{end}}
 
-        {{ partial "page_metadata" (dict "page" $page "is_list" 0) }}
+{{/* Fit image within max size. */}}
+{{ $image := $featured }}
 
-        {{ partial "page_links_div.html" $page }}
-
-        {{ partial "share.html" $page }}
-      </div>
-    </div>
-    <div class="col-6">
-      <div class="split-header-image">
-        <img src="{{ $image.RelPermalink }}" itemprop="image" alt="">
-        {{ with $.Params.image.caption }}<span class="article-header-caption">{{ . | markdownify | emojify }}</span>{{ end }}
-      </div>
-    </div>
-  </div>
-</div>
+{{/* Determine image placement. */}}
+{{ $placement := .Params.image.placement | default 1 }}{{/* Default to full column width. */}}
+{{ $image_container := "" }}
+{{ if eq $placement 2}}
+  {{ $image_container = "container" }}
+  {{ if gt $featured.Width 1200 }}
+    {{ $image = $featured.Resize "1200x" }}
+  {{ end }}
+{{else if eq $placement 3}}
+  {{ $image_container = "container-fluid" }}
+  {{ $image := $featured.Fit "2560x2560" }}
+{{else}}
+  {{ $image_container = "article-container" }}
+  {{ if gt $featured.Width 720 }}
+    {{ $image = $featured.Resize "720x" }}
+  {{ end }}
+{{end}}
 
-<div class="article-container d-xl-none">
-  <h1 itemprop="name">{{ $title }}</h1>
+<div class="article-container pt-3">
+  <h1>{{ $title }}</h1>
 
   {{ with $page.Params.subtitle }}
   <p class="page-subtitle">{{ . | markdownify | emojify }}</p>
@@ -73,6 +62,14 @@
   {{ partial "page_metadata" (dict "page" $page "is_list" 0 "share" true) }}
   {{ partial "page_links_div.html" $page }}
 </div>
+
+{{/* Featured image */}}
+<div class="article-header {{$image_container}} featured-image-wrapper mt-4 mb-4" style="max-width: {{$image.Width}}px; max-height: {{$image.Height}}px;">
+  <div style="position: relative">
+    <img src="{{ $image.RelPermalink }}" alt="" class="featured-image">
+    {{ with $.Params.image.caption }}<span class="article-header-caption">{{ . | markdownify | emojify }}</span>{{ end }}
+  </div>
+</div>
 {{else}}
   {{/* Case when page has no image */}}
 
@@ -82,7 +79,7 @@
     {{ $ctnr = "universal-wrapper" }}
   {{end}}
 <div class="{{$ctnr}} pt-3">
-  <h1 itemprop="name">{{ $title }}</h1>
+  <h1>{{ $title }}</h1>
 
   {{ with $page.Params.subtitle }}
   <p class="page-subtitle">{{ . | markdownify | emojify }}</p>

+ 6 - 8
layouts/partials/page_metadata.html

@@ -2,9 +2,6 @@
 {{ $share := .share | default false }}
 {{ $page := .page }}
 
-<meta content="{{ $page.Params.Date }}" itemprop="datePublished">
-<meta content="{{ $page.Params.LastMod }}" itemprop="dateModified">
-
 <div class="article-metadata">
 
   {{/* If `authors` is set and is not empty. */}}
@@ -27,7 +24,7 @@
           {{ i18n "last_updated" }}
       {{ end }}
     {{ end }}
-    <time>{{ $date }}</time>
+    {{ $date }}
   </span>
   {{ end }}
 
@@ -49,8 +46,9 @@
   </span>
   {{ end }}
 
-  {{ $comments_enabled := and site.DisqusShortname (not (or site.Params.disable_comments (eq $page.Params.comments false))) }}
-  {{ if and $comments_enabled (site.Params.comment_count | default true) }}
+  {{/* Show Disqus comment count if enabled. */}}
+  {{ $disqus_enabled := eq site.Params.comments.engine 1 | and (index site.Params.comments.commentable $page.Type) | and (ne $page.Params.commentable false) | or $page.Params.commentable }}
+  {{ if and $disqus_enabled (site.Params.comments.disqus.show_count | default true) }}
   <span class="middot-divider"></span>
   <a href="{{ $page.RelPermalink }}#disqus_thread"><!-- Count will be inserted here --></a>
   {{ end}}
@@ -59,8 +57,8 @@
   {{ with $page.Param $taxonomy }}
   <span class="middot-divider"></span>
   <span class="article-categories">
-    <i class="fas fa-folder"></i>
-    {{ range $index, $value := . -}}
+    <i class="fas fa-folder mr-1"></i>
+    {{- range $index, $value := . -}}
       {{- if gt $index 0 }}, {{ end -}}
       <a href="{{ (site.GetPage (printf "/%s/%s" $taxonomy (. | urlize))).RelPermalink }}">{{ . }}</a>
     {{- end -}}

+ 1 - 1
layouts/partials/page_metadata_authors.html

@@ -6,7 +6,7 @@
     {{- $profile_page := site.GetPage (printf "/%s/%s" $taxonomy (. | urlize)) -}}
     {{- $name := $profile_page.Params.name | default ($value|markdownify) -}}
     {{- if gt $index 0 }}, {{ end -}}
-    <span itemprop="author name" itemtype="http://schema.org/Person">
+    <span>
       {{- with $profile_page -}}
         <a href="{{.RelPermalink}}">{{$name}}</a>
       {{- else -}}

+ 16 - 2
layouts/partials/project_li_card.html → layouts/partials/portfolio_li_card.html

@@ -4,6 +4,18 @@
 {{ $link := .link }}
 {{ $target := .target }}
 
+{{/* Get summary. */}}
+{{ $summary := "" }}
+{{ if $item.Params.summary }}
+  {{ $summary = $item.Params.summary | markdownify | emojify }}
+{{ else if .Params.abstract }}
+  {{ $summary = .Params.abstract | markdownify | emojify }}
+{{ else if $item.Truncated }}
+  {{ $summary = $item.Summary }}
+{{ else }}
+  {{ $summary = $item.Content }}
+{{ end }}
+
 {{ $resource := ($item.Resources.ByType "image").GetMatch "*featured*" }}
 {{ $js_tag_classes := delimit (apply (apply $item.Params.tags "replace" "." " " "-") "printf" "js-id-%s" ".") " " }}
 
@@ -17,9 +29,11 @@
     {{ end }}
     <div class="card-text">
       <h4><a href="{{ $link }}" {{ $target | safeHTMLAttr }}>{{ $item.Title | markdownify | emojify }}</a></h4>
-      <div class="card-desription">
-        {{ with $item.Params.summary }}<p>{{ . | markdownify | emojify }}</p>{{ end }}
+      {{ with $summary }}
+      <div class="article-style">
+        <p>{{ . | truncate 135 }}</p>
       </div>
+      {{ end }}
     </div>
   </div>
 </div>

+ 6 - 0
layouts/partials/portfolio_li_compact.html

@@ -0,0 +1,6 @@
+{{ $item := .item }}
+{{ $js_tag_classes := delimit (apply (apply $item.Params.tags "replace" "." " " "-") "printf" "js-id-%s" ".") " " }}
+
+<div class="col-12 isotope-item {{ $js_tag_classes | safeHTMLAttr }}">
+  {{ partial "li_compact" $item }}
+</div>

+ 6 - 0
layouts/partials/portfolio_li_list.html

@@ -0,0 +1,6 @@
+{{ $item := .item }}
+{{ $js_tag_classes := delimit (apply (apply $item.Params.tags "replace" "." " " "-") "printf" "js-id-%s" ".") " " }}
+
+<div class="col-12 isotope-item {{ $js_tag_classes | safeHTMLAttr }}">
+  {{ partial "li_list" $item }}
+</div>

+ 18 - 12
layouts/partials/project_li_showcase.html → layouts/partials/portfolio_li_showcase.html

@@ -11,6 +11,18 @@
 {{ $link := .link }}
 {{ $target := .target }}
 
+{{/* Get summary. */}}
+{{ $summary := "" }}
+{{ if $item.Params.summary }}
+  {{ $summary = $item.Params.summary | markdownify | emojify }}
+{{ else if .Params.abstract }}
+  {{ $summary = .Params.abstract | markdownify | emojify }}
+{{ else if $item.Truncated }}
+  {{ $summary = $item.Summary }}
+{{ else }}
+  {{ $summary = $item.Content }}
+{{ end }}
+
 {{ $order := "" }}
 {{ if and ($widget.Params.design.flip_alt_rows | default true) (not (modBool .index 2)) }}
   {{ $order = "order-md-2" }}
@@ -18,24 +30,18 @@
 
 {{ $js_tag_classes := delimit (apply (apply $item.Params.tags "replace" "." " " "-") "printf" "js-id-%s" ".") " " }}
 
-<div class="col-lg-12 project-item isotope-item {{ $js_tag_classes | safeHTMLAttr }}" itemscope itemtype="http://schema.org/CreativeWork">
+<div class="col-lg-12 project-item isotope-item {{ $js_tag_classes | safeHTMLAttr }}">
   <div class="row align-items-center">
     <div class="col-12 col-md-6">
-      <h3 class="article-title mb-0 mt-0" itemprop="name">
-        {{- if $do_link}}<a href="{{ $link }}" {{ $target | safeHTMLAttr }} itemprop="url">{{end -}}
+      <h3 class="article-title mb-0 mt-0">
+        {{- if $do_link}}<a href="{{ $link }}" {{ $target | safeHTMLAttr }}>{{end -}}
         {{ $item.Title | markdownify | emojify }}
         {{- if $do_link}}</a>{{end -}}
       </h3>
 
-      {{ $summary := "" }}
-      {{ if $item.Params.summary }}
-        {{ $summary = $item.Params.summary }}
-      {{ else if $item.Truncated }}
-        {{ $summary = $item.Summary }}
-      {{ end }}
       {{ with $summary }}
-      <div class="article-style" itemprop="articleBody">
-        {{ . | markdownify | emojify }}
+      <div class="article-style">
+        {{ . }}
       </div>
       {{ end }}
 
@@ -49,7 +55,7 @@
       {{ with $resource }}
       {{ $image := .Resize "540x" }}
       {{if $do_link}}<a href="{{ $link }}" {{ $target | safeHTMLAttr }}>{{end}}
-        <img src="{{ $image.RelPermalink }}" itemprop="image" alt="">
+        <img src="{{ $image.RelPermalink }}" alt="">
       {{if $do_link}}</a>{{end}}
       {{end}}
     </div>

+ 0 - 15
layouts/partials/project_li_list.html

@@ -1,15 +0,0 @@
-{{ $item := .item }}
-{{ $widget := .widget }}
-{{ $link := .link }}
-{{ $target := .target }}
-{{ $js_tag_classes := delimit (apply (apply $item.Params.tags "replace" "." " " "-") "printf" "js-id-%s" ".") " " }}
-
-<div class="col-lg-12 project-item isotope-item {{ $js_tag_classes | safeHTMLAttr }}" itemscope itemtype="http://schema.org/CreativeWork">
-  <i class="far fa-copy pub-icon" aria-hidden="true"></i>
-
-  <span class="project-title">
-    <a href="{{ $link }}" {{ $target | safeHTMLAttr }} itemprop="url">{{ $item.Title | markdownify | emojify }}</a>
-  </span>
-
-  {{ with $item.Params.summary }}<p class="project-summary">{{ . | markdownify | emojify }}</p>{{ end }}
-</div>

+ 1 - 1
layouts/partials/search.html

@@ -14,7 +14,7 @@
       <div id="search-box">
         {{ if eq site.Params.search.engine 1 }}
         <input name="q" id="search-query" placeholder="{{i18n "search_placeholder"}}" autocapitalize="off"
-        autocomplete="off" autocorrect="off" role="textbox" spellcheck="false" type="search">
+        autocomplete="off" autocorrect="off" spellcheck="false" type="search">
         {{ else }}
         <!-- Search box will appear here -->
         {{ end }}

+ 8 - 2
layouts/partials/site_footer.html

@@ -1,7 +1,13 @@
 <footer class="site-footer">
-  {{ with site.GetPage "privacy.md" }}
+  {{ if or (site.GetPage "terms.md") (site.GetPage "privacy.md") }}
   <p class="powered-by">
-    {{ printf "<a href=\"%s\">%s</a>" .RelPermalink .Title | safeHTML }}
+    {{ with site.GetPage "privacy.md" }}
+      {{ printf "<a href=\"%s\">%s</a>" .RelPermalink .Title | safeHTML }}
+    {{ end }}
+    {{ with site.GetPage "terms.md" }}
+      {{ if site.GetPage "privacy.md" }} &middot; {{ end }}
+      {{ printf "<a href=\"%s\">%s</a>" .RelPermalink .Title | safeHTML }}
+    {{ end }}    
   </p>
   {{ end }}
 

+ 22 - 13
layouts/partials/site_head.html

@@ -16,7 +16,7 @@
     {{ $superuser_username = path.Base (path.Split .Path).Dir }}
     {{ $superuser_role = .Params.role }}
   {{ end }}
-  {{ $scr.Set "superuser_username" $superuser_username }}{{/* For access from page_author.html. */}}
+  {{ $scr.Set "superuser_username" $superuser_username }}{{/* Set superuser globally for page_author.html. */}}
 
   {{ with $superuser_name }}<meta name="author" content="{{ . }}">{{ end }}
 
@@ -83,7 +83,7 @@
       {{ end }}
     {{ end }}
 
-    {{ if or (eq site.Params.map 2) (eq site.Params.map 3) }}
+    {{ if or (eq site.Params.map.engine 2) (eq site.Params.map.engine 3) }}
     {{ printf "<link rel=\"stylesheet\" href=\"%s\" integrity=\"%s\" crossorigin=\"anonymous\">" (printf $css.leaflet.url $css.leaflet.version) $css.leaflet.sri | safeHTML }}
     {{ end }}
 
@@ -95,8 +95,9 @@
   {{ end }}
 
   {{/* We cannot use SRI with Google Fonts because the CSS is dynamically generated according to the user agent. */}}
+  {{/* Hugo's htmlEscape cannot escape "|" in Google Font URIs so we implement our own escape functionality. */}}
   {{ with ($scr.Get "google_fonts") }}
-  <link rel="stylesheet" {{ printf "href=\"https://fonts.googleapis.com/css?family=%s&display=swap\"" . | safeHTMLAttr }}>
+  <link rel="stylesheet" {{ printf "href=\"https://fonts.googleapis.com/css?family=%s&display=swap\"" . | replaceRE "\\|" "%7C" | safeHTMLAttr }}>
   {{ end }}
 
   {{ $css_options := (dict "targetPath" "css/academic.css" "outputStyle" "compressed") }}
@@ -127,7 +128,7 @@
       ga('require', 'urlChangeTracker');
       ga('send', 'pageview');
     </script>
-    <script async src="//www.google-analytics.com/analytics.js"></script>
+    <script async src="https://www.google-analytics.com/analytics.js"></script>
     {{ if ($scr.Get "use_cdn") }}
     {{ printf "<script async src=\"%s\" integrity=\"%s\" crossorigin=\"anonymous\"></script>" (printf $js.autotrack.url $js.autotrack.version) $js.autotrack.sri | safeHTML }}
     {{ end }}
@@ -135,13 +136,12 @@
   {{ end }}
 
   {{ with .OutputFormats.Get "RSS" }}
-  <link rel="alternate" href="{{ .RelPermalink }}" type="application/rss+xml" title="{{ site.Title }}">
-  <link rel="feed" href="{{ .RelPermalink }}" type="application/rss+xml" title="{{ site.Title }}">
+  <link rel="alternate" href="{{.RelPermalink}}" type="application/rss+xml" title="{{site.Title}}">
   {{ end }}
 
-  <link rel="manifest" href="{{ "site.webmanifest" | relURL }}">
-  <link rel="icon" type="image/png" href="{{ "/img/icon.png" | relURL }}">
-  <link rel="apple-touch-icon" type="image/png" href="{{ "/img/icon-192.png" | relURL }}">
+  <link rel="manifest" href="{{ "index.webmanifest" | relLangURL }}">
+  <link rel="icon" type="image/png" href="{{ "img/icon-32.png" | relURL }}">
+  <link rel="apple-touch-icon" type="image/png" href="{{ "img/icon-192.png" | relURL }}">
 
   <link rel="canonical" href="{{ .Permalink }}">
 
@@ -154,6 +154,9 @@
     {{ $og_image = printf "img/%s" .Params.header.image | absURL }}
   {{ else if site.Params.sharing_image }}
     {{ $og_image = printf "img/%s" site.Params.sharing_image | absURL }}
+  {{ else if site.Params.logo }}
+    {{ $og_image = (printf "img/%s" site.Params.logo) | absURL }}
+    {{ $twitter_card = "summary" }}
   {{ else if site.Params.avatar }}
     {{ $og_image = (printf "img/%s" site.Params.avatar) | absURL }}
     {{ $twitter_card = "summary" }}
@@ -161,6 +164,7 @@
     {{ $og_image = "img/icon-192.png" | absURL }}
     {{ $twitter_card = "summary" }}
   {{ end }}
+  {{ $scr.Set "og_image" $og_image }}{{/* Set `og_image` globally for `rss.xml`. */}}
   <meta property="twitter:card" content="{{ $twitter_card }}">
   {{ with site.Params.twitter }}
   <meta property="twitter:site" content="@{{ . }}">
@@ -176,13 +180,18 @@
   {{- end -}}
   <meta property="og:locale" content="{{ site.LanguageCode | default "en-us" }}">
   {{ if .IsPage }}
-  {{ if not .PublishDate.IsZero }}<meta property="article:published_time" content="{{ .PublishDate.Format "2006-01-02T15:04:05-07:00" | safeHTML }}">
-  {{ else if not .Date.IsZero }}<meta property="article:published_time" content="{{ .Date.Format "2006-01-02T15:04:05-07:00" | safeHTML }}">{{ end }}
-  {{ if not .Lastmod.IsZero }}<meta property="article:modified_time" content="{{ .Lastmod.Format "2006-01-02T15:04:05-07:00" | safeHTML }}">{{ end }}
+    {{ if not .PublishDate.IsZero }}
+      <meta property="article:published_time" content="{{ .PublishDate.Format "2006-01-02T15:04:05-07:00" | safeHTML }}">
+    {{ else if not .Date.IsZero }}
+      <meta property="article:published_time" content="{{ .Date.Format "2006-01-02T15:04:05-07:00" | safeHTML }}">
+    {{ end }}
+    {{ if not .Lastmod.IsZero }}<meta property="article:modified_time" content="{{ .Lastmod.Format "2006-01-02T15:04:05-07:00" | safeHTML }}">{{ end }}
   {{ else }}
-  {{ if not .Date.IsZero }}<meta property="og:updated_time" content="{{ .Date.Format "2006-01-02T15:04:05-07:00" | safeHTML }}">{{ end }}
+    {{ if not .Date.IsZero }}<meta property="og:updated_time" content="{{ .Date.Format "2006-01-02T15:04:05-07:00" | safeHTML }}">{{ end }}
   {{ end }}
 
+  {{ partial "jsonld/main" (dict "page" . "summary" $desc) }}
+
   {{ partial "cookie_consent" . }}
 
   {{ partial "custom_head" . }}

+ 9 - 10
layouts/partials/site_js.html

@@ -24,7 +24,7 @@
         {{ $v := $js.highlight.version }}
         {{ printf "<script src=\"%s\" integrity=\"%s\" crossorigin=\"anonymous\"></script>" (printf $js.highlight.url $v) $js.highlight.sri | safeHTML }}
         {{ range site.Params.highlight_languages }}
-        <script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/{{ $v }}/languages/{{ . }}.min.js"></script>
+        <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/{{ $v }}/languages/{{ . }}.min.js"></script>
         {{ end }}
       {{ end }}
 
@@ -35,21 +35,15 @@
     {{ end }}
 
     {{/* Maps JS. */}}
-    {{ if eq site.Params.map 1 }}
-      <script async defer src="//maps.googleapis.com/maps/api/js?key={{ site.Params.map_api_key }}"></script>
+    {{ if eq site.Params.map.engine 1 }}
+      <script async defer src="https://maps.googleapis.com/maps/api/js?key={{ site.Params.map.api_key }}"></script>
       {{ if ($scr.Get "use_cdn") }}
       {{ printf "<script src=\"%s\" integrity=\"%s\" crossorigin=\"anonymous\"></script>" (printf $js.gmaps.url $js.gmaps.version) $js.gmaps.sri | safeHTML }}
       {{ end }}
-    {{ else if and (or (eq site.Params.map 2) (eq site.Params.map 3)) ($scr.Get "use_cdn") }}
+    {{ else if and (or (eq site.Params.map.engine 2) (eq site.Params.map.engine 3)) ($scr.Get "use_cdn") }}
       {{ printf "<script src=\"%s\" integrity=\"%s\" crossorigin=\"anonymous\"></script>" (printf $js.leaflet.url $js.leaflet.version) $js.leaflet.sri | safeHTML }}
     {{ end }}
 
-    {{/* Comments JS. */}}
-    {{ $comments_enabled := and site.DisqusShortname (not (or site.Params.disable_comments $.Params.disable_comments)) }}
-    {{ if and $comments_enabled (site.Params.comment_count | default true) }}
-    <script id="dsq-count-scr" src="//{{ site.DisqusShortname }}.disqus.com/count.js" async></script>
-    {{ end }}
-
     {{/* Initialise code highlighting. */}}
     {{ if $.Scratch.Get "highlight_enabled" }}
     <script>hljs.initHighlightingOnLoad();</script>
@@ -130,6 +124,11 @@
     </script>
     {{ end }}
 
+    {{/* Disqus Comment Count JS. */}}
+    {{ if and (eq site.Params.comments.engine 1) (site.Params.comments.disqus.show_count | default true) }}
+    <script id="dsq-count-scr" src="https://{{site.Params.comments.disqus.shortname}}.disqus.com/count.js" async></script>
+    {{ end }}
+
     {{ $js_comment := printf "/* Source Themes Academic v%s | https://sourcethemes.com/academic/ */\n" site.Data.academic.version }}
     {{ $js_bundle_head := $js_comment | resources.FromString "js/bundle-head.js" }}
     {{ $js_linebreak := "\n" | resources.FromString "js/linebreak.js" }}{{/* Fix no line break after Bootstrap JS causing error. */}}

+ 10 - 12
layouts/partials/widgets/about.html

@@ -17,32 +17,30 @@
 {{ $avatar := ($person_page.Resources.ByType "image").GetMatch "*avatar*" }}
 
 <!-- About widget -->
-<div class="row" itemprop="author" itemscope itemtype="http://schema.org/Person" itemref="{{ if site.Params.email }}person-email{{ end }}{{ if site.Params.phone }} person-telephone{{ end }}{{ if site.Params.address}} person-address{{ end }}">
+<div class="row">
   <div class="col-12 col-lg-4">
     <div id="profile">
 
       {{ if site.Params.gravatar }}
-      <img class="portrait" src="https://s.gravatar.com/avatar/{{ md5 $person.email }}?s=200')" itemprop="image" alt="Avatar">
+      <img class="portrait" src="https://s.gravatar.com/avatar/{{ md5 $person.email }}?s=200')" alt="Avatar">
       {{ else if $avatar }}
       {{ $avatar_image := $avatar.Fill "250x250 Center" }}
-      <img class="portrait" src="{{ $avatar_image.RelPermalink }}" itemprop="image" alt="Avatar">
+      <img class="portrait" src="{{ $avatar_image.RelPermalink }}" alt="Avatar">
       {{ end }}
 
       <div class="portrait-title">
-        <h2 itemprop="name">{{ $person.name }}</h2>
-        {{ with $person.role }}<h3 itemprop="jobTitle">{{ . | markdownify | emojify }}</h3>{{ end }}
+        <h2>{{ $person.name }}</h2>
+        {{ with $person.role }}<h3>{{ . | markdownify | emojify }}</h3>{{ end }}
 
         {{ range $person.organizations }}
-        <h3 itemprop="worksFor" itemscope itemtype="http://schema.org/Organization">
-          {{ with .url }}<a href="{{ . }}" target="_blank" itemprop="url" rel="noopener">{{ end }}
-          <span itemprop="name">{{ .name }}</span>
+        <h3>
+          {{ with .url }}<a href="{{ . }}" target="_blank" rel="noopener">{{ end }}
+          <span>{{ .name }}</span>
           {{ if .url }}</a>{{ end }}
         </h3>
         {{ end }}
       </div>
 
-      <link itemprop="url" href="{{ .Permalink }}">
-
       <ul class="network-icon" aria-hidden="true">
         {{ range $person.social }}
         {{ $pack := or .icon_pack "fas" }}
@@ -59,7 +57,7 @@
           {{ $target = "target=\"_blank\" rel=\"noopener\"" }}
         {{ end }}
         <li>
-          <a itemprop="sameAs" href="{{ $link | safeURL }}" {{ $target | safeHTMLAttr }}>
+          <a href="{{ $link | safeURL }}" {{ $target | safeHTMLAttr }}>
             <i class="{{ $pack }} {{ $pack_prefix }}-{{ .icon }} big-icon"></i>
           </a>
         </li>
@@ -68,7 +66,7 @@
 
     </div>
   </div>
-  <div class="col-12 col-lg-8" itemprop="description">
+  <div class="col-12 col-lg-8">
 
     {{/* Only display widget title in explicit instances of about widget, not in author pages. */}}
     {{ if and $page.Params.widget $page.Title }}<h1>{{ $page.Title | markdownify | emojify }}</h1>{{ end }}

+ 1 - 1
layouts/partials/widgets/accomplishments.html

@@ -8,7 +8,7 @@
     {{ with $page.Params.subtitle }}<p>{{ . | markdownify }}</p>{{ end }}
   </div>
   <div class="col-12 col-lg-8">
-    {{ with $page.Content }}<p>{{ . | markdownify }}</p>{{ end }}
+    {{ with $page.Content }}{{ . }}{{ end }}
 
     {{ if $page.Params.item }}
     {{ range $idx, $key := sort $page.Params.item ".date_start" "desc" }}

+ 47 - 25
layouts/partials/widgets/contact.html

@@ -1,6 +1,7 @@
 {{ $ := .root }}
 {{ $page := .page }}
 {{ $autolink := default true $page.Params.autolink }}
+{{ $data := site.Params }}
 
 <!-- Contact widget -->
 <div class="row contact-widget">
@@ -9,7 +10,7 @@
     {{ with $page.Params.subtitle }}<p>{{ . | markdownify }}</p>{{ end }}
   </div>
   <div class="col-12 col-lg-8">
-    {{ with $page.Content }}<p>{{ . | markdownify }}</p>{{ end }}
+    {{ with $page.Content }}{{ . }}{{ end }}
 
     {{ if $page.Params.email_form }}
 
@@ -17,10 +18,10 @@
     {{ if eq $page.Params.email_form 1 }}
       {{ $post_action = "netlify" }}
     {{ else }}
-      {{ if not site.Params.email }}
-        {{ errorf "Please set an email address for the contact form using the `email` parameter in `config.toml`. Otherwise, set `email_form = 0` to disable the contact form." }}
+      {{ if not $data.email }}
+        {{ errorf "Please set an email address for the contact form using the `email` parameter in `params.toml`. Otherwise, set `email_form = 0` to disable the contact form." }}
       {{ end }}
-      {{ $post_action = printf "action=\"https://formspree.io/%s\"" site.Params.email }}
+      {{ $post_action = printf "action=\"https://formspree.io/%s\"" $data.email }}
     {{end}}
 
     <div class="mb-3">
@@ -42,48 +43,69 @@
     </div>
     {{end}}
 
-    <ul class="fa-ul" itemscope>
+    <ul class="fa-ul">
 
-      {{ if and site.Params.email (not $page.Params.email_form) }}
+      {{ if and $data.email (not $page.Params.email_form) }}
       <li>
         <i class="fa-li fas fa-envelope fa-2x" aria-hidden="true"></i>
-        <span id="person-email" itemprop="email">
-        {{- if $autolink }}<a href="mailto:{{ site.Params.email }}">{{ site.Params.email }}</a>{{ else }}{{ site.Params.email }}{{ end -}}
+        <span id="person-email">
+        {{- if $autolink }}<a href="mailto:{{ $data.email }}">{{ $data.email }}</a>{{ else }}{{ $data.email }}{{ end -}}
         </span>
       </li>
       {{ end }}
 
-      {{ with site.Params.gnupg_key}}
+      {{ with $data.gnupg_key }}
       <li>
         <i class="fa-li fa fa-key fa-2x" aria-hidden="true"></i>
         <code>gpg --recv-keys {{ . }}</code>
       </li>
       {{ end }}
 
-      {{ with site.Params.phone }}
+      {{ with $data.phone }}
       <li>
         <i class="fa-li fas fa-phone fa-2x" aria-hidden="true"></i>
-        <span id="person-telephone" itemprop="telephone">
+        <span id="person-telephone">
         {{- if $autolink }}<a href="tel:{{ . }}">{{ . }}</a>{{ else }}{{ . }}{{ end -}}
         </span>
       </li>
       {{ end }}
 
-      {{ with site.Params.address }}
+      {{ $addr_formatted := "" }}{{/* Scoping for maps. */}}
+      {{ if $data.address }}
+        {{ $addr := slice }}
+        {{with $data.address.street}}{{$addr = $addr | append .}}{{end}}
+        {{with $data.address.city}}{{$addr = $addr | append .}}{{end}}
+        {{with $data.address.region}}{{$addr = $addr | append .}}{{end}}
+        {{with $data.address.postcode}}{{$addr = $addr | append .}}{{end}}
+        {{with $data.address.country}}{{$addr = $addr | append .}}{{end}}
+        {{ $addr_formatted = delimit $addr (site.Params.list_delimiter | default ", ") }}
+        <li>
+          <i class="fa-li fas fa-map-marker fa-2x" aria-hidden="true"></i>
+          <span id="person-address">{{ $addr_formatted }}</span>
+        </li>
+      {{ end }}
+
+      {{ with $data.directions }}
       <li>
-        <i class="fa-li fas fa-map-marker fa-2x" aria-hidden="true"></i>
-        <span id="person-address" itemprop="address">{{ . | markdownify | emojify }}</span>
+        <i class="fa-li fas fa-compass fa-2x" aria-hidden="true"></i>
+        <span>{{ . | markdownify | emojify }}</span>
       </li>
       {{ end }}
 
-      {{ with site.Params.office_hours }}
+      {{ with $data.office_hours }}
       <li>
         <i class="fa-li fas fa-clock fa-2x" aria-hidden="true"></i>
-        <span>{{ . | markdownify | emojify }}</span>
+        <span>
+          {{- if not (reflect.IsSlice .)}}{{/* Support legacy string format. */}}
+            {{- . | markdownify | emojify -}}
+          {{else}}
+            {{- delimit . "<br>" | markdownify | emojify -}}
+          {{end -}}
+        </span>
       </li>
       {{ end }}
 
-      {{ with site.Params.appointment_url }}
+      {{ with $data.appointment_url }}
       <li>
         <i class="fa-li fas fa-calendar-check fa-2x" aria-hidden="true"></i>
         <a href="{{ . }}" target="_blank" rel="noopener">{{ i18n "book_appointment" | default "Book an appointment" }}</a>
@@ -91,7 +113,7 @@
       {{ end }}
 
       {{/* Contact links. */}}
-      {{ range site.Params.contact_links }}
+      {{ range $data.contact_links }}
       {{ $pack := or .icon_pack "fas" }}
       {{ $pack_prefix := $pack }}
       {{ if in (slice "fab" "fas" "far" "fal") $pack }}
@@ -113,14 +135,14 @@
 
     </ul>
 
-    {{ if site.Params.map }}
+    {{ if and site.Params.map.engine $data.coordinates.latitude }}
     <div class="d-none">
-      <input id="map-provider" value="{{ site.Params.map }}">
-      <input id="map-lat" value="{{ site.Params.latitude }}">
-      <input id="map-lng" value="{{ site.Params.longitude }}">
-      <input id="map-dir" value="{{ site.Params.address }}">
-      <input id="map-zoom" value="{{ site.Params.zoom | default "15" }}">
-      <input id="map-api-key" value="{{ site.Params.map_api_key }}">
+      <input id="map-provider" value="{{ site.Params.map.engine }}">
+      <input id="map-lat" value="{{ $data.coordinates.latitude }}">
+      <input id="map-lng" value="{{ $data.coordinates.longitude }}">
+      <input id="map-dir" value="{{ $addr_formatted }}">
+      <input id="map-zoom" value="{{ site.Params.map.zoom | default "15" }}">
+      <input id="map-api-key" value="{{ site.Params.map.api_key }}">
     </div>
     <div id="map"></div>
     {{ end }}

+ 1 - 1
layouts/partials/widgets/experience.html

@@ -8,7 +8,7 @@
     {{ with $page.Params.subtitle }}<p>{{ . | markdownify }}</p>{{ end }}
   </div>
   <div class="col-12 col-lg-8">
-    {{ with $page.Content }}<p>{{ . | markdownify }}</p>{{ end }}
+    {{ with $page.Content }}{{ . }}{{ end }}
 
     {{ if $page.Params.experience }}
     {{ $exp_len := len $page.Params.experience }}

+ 1 - 1
layouts/partials/widgets/featured.html

@@ -38,7 +38,7 @@
   </div>
   <div class="col-12 col-lg-8">
 
-    {{ with $st.Content }}<p>{{ . }}</p>{{ end }}
+    {{ with $st.Content }}{{ . }}{{ end }}
 
     {{ range $post := $query }}
       {{ if eq $st.Params.design.view 1 }}

+ 1 - 1
layouts/partials/widgets/featurette.html

@@ -11,7 +11,7 @@
 
   {{ with $page.Content }}
   <div class="col-md-12">
-    <p>{{ . | markdownify }}</p>
+    {{ . }}
   </div>
   {{ end }}
 

+ 1 - 1
layouts/partials/widgets/hero.html

@@ -7,7 +7,7 @@
   <div class="col-md-6 order-md-1 text-center text-md-left">
 {{ end }}
 
-    <h1 class="hero-title" itemprop="headline">
+    <h1 class="hero-title">
       {{ with $page.Title }}{{ . | markdownify }}{{ end }}
     </h1>
 

+ 1 - 1
layouts/partials/widgets/pages.html

@@ -72,7 +72,7 @@
   </div>
   <div class="col-12 col-lg-8">
 
-    {{ with $st.Content }}<p>{{ . }}</p>{{ end }}
+    {{ with $st.Content }}{{ . }}{{ end }}
 
     {{ range $post := $query }}
       {{ if eq $st.Params.design.view 1 }}

Kaikkia tiedostoja ei voida näyttää, sillä liian monta tiedostoa muuttui tässä diffissä