diff --git a/themes/.gitkeep b/themes/.gitkeep
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/themes/knowledge-base/CHANGELOG.md b/themes/knowledge-base/CHANGELOG.md
new file mode 100644
index 0000000000..b5786af85f
--- /dev/null
+++ b/themes/knowledge-base/CHANGELOG.md
@@ -0,0 +1,117 @@
+# v2.1.1
+## 07/30/2020
+
+1. [](#new)
+ * If you reference media in the page content directly, then you may not want that media resummarized at the end of the post. You can now set a page header named `hide_mediasummary` to suppress the summary for that page.
+
+# v2.1.0
+## 03/16/2019
+
+1. [](#new)
+ * Categories can now have landing pages like authors do (optional), thanks to @awrog.
+ * Duth translation added, thanks to @awrog.
+
+1. [](#bugfix)
+ * Comments section hidden if `comments` plugin not present.
+ * The "Latest Articles" list now finds all articles regardless of folder structure.
+
+# v2.0.1
+## 12/11/2018
+
+1. [](#new)
+ * French translation added, thanks to @TheFlighteur.
+
+1. [](#bugfix)
+ * Fixed a dropdown bug, thanks to @Lipository.
+
+# v2.0.0
+## 08/09/2018
+
+1. [](#new)
+ * **This update is not necessarily backwards compatible!** If you have used theme inheritance to customize this theme, please carefully read the "Updating" section of the docs.
+ * Changed the way the templates pull information from the theme config files so that inheritance is properly supported.
+
+# v1.3.6
+## 07/17/2018
+
+1. [](#bugfix)
+ * Now works with the latest version of the `count-views` plugin.
+
+# v1.3.5
+## 04/24/2018
+
+1. [](#bugfix)
+ * Fixed duplicate "Related Articles" heading on the article page, thanks to @sebasvisser.
+
+# v1.3.4
+## 04/12/2018
+
+1. [](#bugfix)
+ * Added a check for the `published` header, thanks to @hctagalong.
+
+1. [](#new)
+ * Spanish and Galican translations added, thanks to @lucasvieites.
+
+# v1.3.3
+## 06/22/2017
+
+1. [](#bugfix)
+ * The "Popular Articles" sidebar now actually ignores deleted pages.
+ * The "Latest Articles" sidebar fixed to respect `articles.root`.
+
+# v1.3.2
+## 05/17/2017
+
+1. [](#new)
+ * Polish translation added thanks to @AvantaR.
+
+# v1.3.1
+## 05/14/2017
+
+1. [](#bugfix)
+ * Pages now sort as was originally intended.
+
+# v1.3.0
+## 05/14/2017
+
+1. [](#new)
+ * Added `params:articles:blacklist` setting to allow you to omit categories.
+
+# v1.2.1
+## 04/04/2017
+
+1. [](#new)
+ * Some styling refinements. Thanks, @rapsli!
+
+# v1.2.0
+## 02/25/2017
+
+1. [](#new)
+ * Made various components of the sidebar and article display optional. If all components of a specific unit are hidden, then the entire unit is hidden.
+ * The config variable `params:articleroot` is now deprecated. Use `params:articles:root` instead. Backwards compatibility will be removed at the next major release.
+
+# v1.1.1
+## 02/21/2017
+
+1. [](#new)
+ * Simplified Chinese tranlsation added. Thanks, @lazyyz!
+
+# v1.1.0
+## 02/19/2017
+
+1. [](#new)
+ * Theme now configured to allow for translations
+ * Czech translation added
+ * Many thanks to @rbukovansky for these changes!
+
+# v1.0.1
+## 11/05/2016
+
+1. [](#bugfix)
+ * Added plugin dependencies to the blueprint
+
+# v1.0.0
+## 10/22/2016
+
+1. [](#new)
+ * ChangeLog started...
diff --git a/themes/knowledge-base/LICENSE b/themes/knowledge-base/LICENSE
new file mode 100644
index 0000000000..ff905acd3f
--- /dev/null
+++ b/themes/knowledge-base/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2016 Aaron Dalton
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/themes/knowledge-base/README.md b/themes/knowledge-base/README.md
new file mode 100644
index 0000000000..44a3512912
--- /dev/null
+++ b/themes/knowledge-base/README.md
@@ -0,0 +1,191 @@
+# Knowledge Base Theme
+
+![](screenshot.jpg)
+
+This is a basic theme for a knowledge base for [Grav CMS](http://getgrav.org). It is minimal by design and is easy to customize. It is based on [Yahoo's Pure.css framework](http://purecss.io/).
+
+## Installation
+
+Installing the Knowledge Base theme can be done in one of two ways. The GPM (Grav Package Manager) installation method enables you to quickly and easily install the theme with a simple terminal command, while the manual method enables you to do so via a zip file.
+
+The theme by itself is useful, but you may have an easier time getting up and running by installing the skeleton. [The Knowledge Base skeleton](https://github.com/Perlkonig/grav-skeleton-knowledge-base) is a complete site with the theme itself, required plugins and configuration, and sample content.
+
+### GPM Installation (Preferred)
+
+The simplest way to install this theme is via the [Grav Package Manager (GPM)](http://learn.getgrav.org/advanced/grav-gpm) through your system's Terminal (also called the command line). From the root of your Grav install type:
+
+ bin/gpm install knowledge-base
+
+This will install the Knowledge Base theme into your `/user/themes` directory within Grav. Its files can be found under `/your/site/grav/user/themes/knowledge-base`.
+
+### Manual Installation
+
+To install this theme, just download the zip version of this repository and unzip it under `/your/site/grav/user/themes`. Then, rename the folder to `knowledge-base`. You can find these files either on [GitHub](https://github.com/Perlkonig/grav-theme-knowledge-base) or via [GetGrav.org](http://getgrav.org/downloads/themes).
+
+You should now have all the theme files under
+
+ /your/site/grav/user/themes/knowledge-base
+
+**NOTE:** This theme is a modular component for Grav which requires the [CMS itself](http://github.com/getgrav/grav) and the following plugins to properly function as written (you can of course modify the theme once installed):
+
+ * [Error](https://github.com/getgrav/grav-theme-error)
+ * [Problems](https://github.com/getgrav/grav-plugin-problems)
+ * [Simple Search](https://github.com/getgrav/grav-plugin-simplesearch)
+ * [Count Views](https://github.com/Perlkonig/grav-plugin-count-views) (for the "Popular Articles" sidebar)
+ * [Reading Time](https://github.com/getgrav/grav-plugin-readingtime) (for displaying the reading time at the top of each article)
+ * [Related Pages](https://github.com/getgrav/grav-plugin-relatedpages) (for the "Related Articles" section at the bottom of each article)
+
+## Updating
+
+**Backwards Compatibility Alert:** *If you are updating from 1.x and have used theme inheritance to customize the theme, then you must copy the contents of your customized `knowledge-base.yaml` file into your new theme's configuration file.*
+
+*Furthermore, if you have overridden any template files, please note the following change. All instances of `config.themes['knowledge-base']` have been replaced with `grav.theme.config`.*
+
+As development for the Knowledge Base theme continues, new versions may become available that add additional features and functionality, improve compatibility with newer Grav releases, and generally provide a better user experience. Updating Knowledge Base is easy, and can be done through Grav's GPM system or manually.
+
+### GPM Update (Preferred)
+
+The simplest way to update this theme is via the [Grav Package Manager (GPM)](http://learn.getgrav.org/advanced/grav-gpm). You can do this with this by navigating to the root directory of your Grav install using your system's terminal (also called command line) and typing the following:
+
+ bin/gpm update knowledge-base
+
+This command will check your Grav install to see if your Knowledge Base theme is due for an update. If a newer release is found, you will be asked whether or not you wish to update. To continue, type `y` and hit enter. The theme will automatically update and clear Grav's cache.
+
+### Manual Update
+
+Manually updating Knowledge Base is pretty simple. Here is what you will need to do to get this done:
+
+* Delete the `your/site/user/themes/knowledge-base` directory.
+* Download the new version of the Knowledge Base theme from either [GitHub](https://github.com/Perlkonig/grav-plugin-knowledge-base) or [GetGrav.org](http://getgrav.org/downloads/themes).
+* Unzip the zip file in `your/site/user/themes` and rename the resulting folder to `knowledge-base`.
+* Clear the Grav cache. The simplest way to do this is by going to the root Grav directory in terminal and typing `bin/grav clear-cache`.
+
+> Note: Any changes you have made to any of the files listed under this directory will also be removed and replaced by the new set. Any files located elsewhere (for example a YAML settings file placed in `user/config/themes`) will remain intact.
+
+## Customizing
+
+To modify or customize this theme, you must first [read and follow the documentation on theme inheritance](https://learn.getgrav.org/themes/customization#theme-inheritance). Following these instructions is the only way to ensure that your changes are not lost when the theme gets updated.
+
+**NOTE**: You will need to copy and paste the contents of `knowledge-base.yaml` into your newly created `.yaml`!
+
+### Configuration
+
+This theme can be configured in two places: `knowledge-base.yaml` and `site.yaml`.
+
+#### `knowledge-base.yaml`
+
+Here is the default configuration, which is commented to explain what the different settings do:
+
+```yaml
+params:
+ articles:
+ root: /home # the route where the articles themselves live
+ blacklist: ['scratch'] # list of categories to ignore
+ show: # if all are set to false, the article header is removed
+ date: true # show article date in the article header
+ authors: true # show article authors in the article header
+ topics: true # show assigned topics in the article header
+ time: true # show reading time in the article header
+ front: # params for the front page content
+ maxrows: 3 # the maximum number of rows on the front page
+ maxentries: 5 # maximum number of articles displayed for each category
+ sidebar: # params for the sidebar
+ maxentries: 5 # maximum number of articles to display in "Popular" and "Latest" sections
+ show: # if all are set to false, the sidebar is removed
+ categories: true # show Category list in the sidebar
+ popular: true # show the Popular Articles sidebar
+ latest: true # show the Latest Articles sidebar
+```
+
+**Notes on `params:articles:blacklist`:** Any articles containing a blacklisted category will not appear on the front page, in the sidebar, or in the list of articles by a given author.
+
+#### `site.yaml`
+
+Your `site.yaml` must specify three taxonomies:
+
+```yaml
+taxonomies: [category,tag,author]
+```
+
+The only theme-specific customization looked for here is the text for the footer. You can change the footer text without touching the templates by adding something like the following to `user/config/site.yaml`:
+
+```yaml
+footertext: |
+
+ First footer line.
+
+
+ Here's a second.
+
+```
+
+### CSS
+
+The template loads `theme://css/custom.css` if it exists. The simplest way to customize the CSS is to create this file in your inherited theme and add what styles you need. This way the base `css/knowledge-base.css` can be updated without losing your customizations.
+
+### Templates
+
+To override templates, simply copy the file from the base theme into the same place in your inherited theme and edit as desired. If you configured your inheritied theme correctly, the Grav system will first look for files in your inherited theme. If it's not present, it will pull the file from the base theme.
+
+## Content
+
+### Templates
+
+The following templates are available:
+
+ * `author` is used for displaying information about an author and articles they have authored.
+
+ * `default` is a blank template that just dumps a page's content.
+
+ * `error` is used for displaying error messages.
+
+ * `front` is only used for generating the front page. The front page is organzed by the `category` taxonomy.
+
+ * `item` is used for an article.
+
+ * `taxonomy` is used to display articles by taxonomy (i.e., category, tag, author).
+
+### Structure
+
+Hopefully you're working with [the skeleton packge that contains all the sample content](https://github.com/Perlkonig/grav-skeleton-knowledge-base). If not, at least have a look at that repository so you can follow along.
+
+The theme expects three routes under the `user/pages` folder:
+
+ * `/home` (or whatever was specified in `user/config/themes/knowledge-base.yaml` as `articleroot`)
+
+ This is where all the knowlege base articles live. Each article should have its own folder containing an `item.md` file. There are a few prerequisites for the page front matter:
+
+ * It must contain a `title` field.
+ * It must contain an explicit `date` field representing the published date.
+ * It must have at least one `category` assigned for it to appear on the front page. `tag` is completely optional. `author` is recommended. Multiple values are supported in any taxonomy.
+
+ Two different icons are currently supported. By default, all articles are marked with a "text" icon. If the article contains media (usually video), then add `media: video` to the front matter. The "video" icon should then be used.
+
+ * `/taxonomy`
+
+ This is where users can get lists of articles by taxonomy. The `taxonomy.md` file can be titled in any way you wish, and it is recommended that caching be disabled. If no query parameters are passed, then it will display a list of known taxonomies. If a taxonomy is passed via the `name` parameter, then it will list valid values for that taxonomy. If the taxonomy value is also passed (via the `val` parameter), then a list of *all* articles matching that specific taxonomy will be listed.
+
+ A note about authors: If a specific author page exists (see `/authors` route below), then the author's name will link to it. If no such page exists, then a generic list of articles will be generated.
+
+ * `/authors`
+
+ This folder should contain a top-level page that contains the following front matter:
+
+ ```yaml
+ redirect: taxonomy?name=author
+ ```
+
+ All other content and headers will be ignored.
+
+ The folder should then contain folders for each author (optional). The slug is determined by the built-in `hyphenize` twig filter. Each of those folders should contain an `author.md` file. *The page's front matter must include an `author` field containing the properly capitalized and spaced name of the author.* The template will create an initial heading, dump the page content (including images), and then follow with a list of articles this person authored. If no such folder exists, then the `/taxonomy` page will create a simple list of articles written by that author.
+
+The sample content also shows a "Contact Us" page that you will need to configure yourself.
+
+## Credits
+
+This is my first theme. Feedback and pull requests are warmly welcomed.
+
+I decided to try this after a forum post asking if such a template already existed. The poster linked to [a theme called "knowhow" by Hero Themes](http://demo.herothemes.com/#knowhow). That theme inspired this one, but this one was coded completely from scratch with no reference to the original code.
+
+
+
diff --git a/themes/knowledge-base/blueprints.yaml b/themes/knowledge-base/blueprints.yaml
new file mode 100644
index 0000000000..d66f1d7a4a
--- /dev/null
+++ b/themes/knowledge-base/blueprints.yaml
@@ -0,0 +1,21 @@
+name: Knowledge Base
+version: 2.1.1
+description: A theme for a knowledge base or FAQ
+icon: database
+author:
+ name: Aaron Dalton
+ email: aaron@daltons.ca
+homepage: https://github.com/Perlkonig/grav-theme-knowledge-base
+demo: http://perlkonig.com/knowledge-base
+keywords: grav, theme, faq, knowledge base, responsive, css3, html5, purecss
+bugs: https://github.com/Perlkonig/grav-theme-knowledge-base/issues
+readme: https://github.com/Perlkonig/grav-theme-knowledge-base/blob/master/README.md
+license: MIT
+
+dependencies:
+ - error
+ - problems
+ - relatedpages
+ - simplesearch
+ - readingtime
+ - 'count-views'
diff --git a/themes/knowledge-base/css/knowledge-base.css b/themes/knowledge-base/css/knowledge-base.css
new file mode 100644
index 0000000000..65e7a2f69e
--- /dev/null
+++ b/themes/knowledge-base/css/knowledge-base.css
@@ -0,0 +1,305 @@
+/* Core Stuff */
+* {
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+}
+
+#top {
+ max-width: 1200px;
+ margin: 0 auto;
+}
+
+body {
+ font-size: 1rem;
+ line-height: 1.7;
+ color: #606d6e;
+}
+
+h1,
+h2,
+h3,
+h4,
+h5,
+h6 {
+ color: #454B4D;
+}
+
+a {
+ color: #1F8CD6;
+ text-decoration: none;
+}
+
+a:hover {
+ color: #175E91;
+}
+
+pre {
+ background: #F0F0F0;
+ margin: 1rem 0;
+ border-radius: 2px;
+ font-family: 'Inconsolata', monospace;
+}
+
+code {
+ font-family: 'Inconsolata', monospace;
+}
+
+blockquote {
+ border-left: 10px solid #eee;
+ margin: 0;
+ padding: 0 2rem;
+}
+
+/* Utility Classes */
+.wrapper {
+ margin: 0 3rem;
+}
+
+.padding {
+ padding: 3rem 1rem;
+}
+
+.left {
+ float: left;
+}
+
+.right {
+ float: right
+}
+
+.rightpad {
+ padding-right: 1rem;
+}
+
+.text-center {
+ text-align: center;
+}
+
+.text-right {
+ text-align: right;
+}
+
+.text-left {
+ text-align: left;
+}
+
+/* Content Styling */
+.header .padding {
+ padding: 1rem 0;
+}
+
+.pure-g .header {
+ width: 100%
+}
+
+/*.header {
+ background-color: #1F8DD6;
+ color: #eee;
+}
+
+.header a {
+ color: #fff;
+}
+*/
+.header .logo {
+ font-size: 1.7rem;
+ /*text-transform: uppercase;*/
+}
+
+.footer {
+ padding: 1rem 0;
+ background-color: #eee;
+ text-align: center;
+}
+
+/* Font Family */
+html, button, input, select, textarea,
+.pure-g [class *= "pure-u"] {
+ /* Set your content font stack here: */
+ font-family: 'Lato', sans-serif;
+}
+
+.topiclist .count {
+ font-weight: normal;
+ font-size: smaller;
+ padding-left: 0.25rem;
+}
+
+.topiclist ul {
+ list-style-type: none;
+ margin-left: 0;
+ padding-left: 0;
+}
+
+.topiclist li.text:before {
+ content: "\f0f6";
+ font-family: FontAwesome;
+ display: inline-block;
+ vertical-align: middle;
+ padding-right: 0.5rem;
+}
+
+.topiclist li.video:before {
+ content: "\f1c8";
+ font-family: FontAwesome;
+ display: inline-block;
+ vertical-align: middle;
+ padding-right: 0.5rem;
+}
+
+/*.topiclist h2:before {
+ content: "\f114";
+ font-family: FontAwesome;
+ display: inline-block;
+ vertical-align: middle;
+ padding-left: -2rem;
+}
+*/
+
+#sidebar h1 {
+ font-size: 1.25rem;
+}
+
+.frontrow {
+ border-top: #eee solid 1px;
+}
+
+#sidebar h1 {
+ border-bottom: 3px double #eee;
+ line-height: 0;
+ padding-top: 1em;
+}
+
+#sidebar h1 span {
+ background: #fff;
+ padding-right: 0.5em;
+}
+
+.header .search {
+ background: #eee;
+ padding: 1em;
+}
+
+section.header .details {
+ border-top: 1px solid #eee;
+ border-bottom: 1px solid #eee;
+ padding: 0.5em 0;
+ font-size: smaller;
+}
+
+section.header .details span {
+ padding-right: 1rem;
+}
+
+
+/** tables */
+table {
+ table-layout: fixed;
+ width: 100%;
+}
+th {
+ color:#D5DDE5;;
+ background:#1b1e24;
+ border-bottom:4px solid #9ea7af;
+ border-right: 1px solid #343a45;
+
+ font-weight: 100;
+ padding:15px;
+ text-align:left;
+ text-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
+ vertical-align:middle;
+}
+
+th:first-child {
+ border-top-left-radius:3px;
+}
+
+th:last-child {
+ border-top-right-radius:3px;
+ border-right:none;
+}
+
+tr {
+ border-top: 1px solid #C1C3D1;
+ border-bottom-: 1px solid #C1C3D1;
+ color:#666B85;
+ font-weight:normal;
+ text-shadow: 0 1px 1px rgba(256, 256, 256, 0.1);
+}
+
+tr:hover td {
+ background:#4E5066;
+ color:#FFFFFF;
+ border-top: 1px solid #22262e;
+ border-bottom: 1px solid #22262e;
+}
+
+tr:first-child {
+ border-top:none;
+}
+
+tr:last-child {
+ border-bottom:none;
+}
+
+tr:nth-child(odd) td {
+ background:#EBEBEB;
+}
+
+tr:nth-child(odd):hover td {
+ background:#4E5066;
+}
+
+tr:last-child td:first-child {
+ border-bottom-left-radius:3px;
+}
+
+tr:last-child td:last-child {
+ border-bottom-right-radius:3px;
+}
+
+td {
+ background:#FFFFFF;
+ padding:10px;
+ text-align:left;
+ vertical-align:middle;
+ font-weight:300;
+ text-shadow: -1px -1px 1px rgba(0, 0, 0, 0.1);
+ border-right: 1px solid #C1C3D1;
+ word-wrap: break-word;
+}
+
+td:last-child {
+ border-right: 0px;
+}
+
+th.text-left {
+ text-align: left;
+}
+
+th.text-center {
+ text-align: center;
+}
+
+th.text-right {
+ text-align: right;
+}
+
+td.text-left {
+ text-align: left;
+}
+
+td.text-center {
+ text-align: center;
+}
+
+td.text-right {
+ text-align: right;
+}
+
+.itemscreenshot {
+ border:5px solid #666;
+ padding: 5px;
+ width: 100%;
+}
diff --git a/themes/knowledge-base/images/logo.png b/themes/knowledge-base/images/logo.png
new file mode 100644
index 0000000000..64be1a9633
Binary files /dev/null and b/themes/knowledge-base/images/logo.png differ
diff --git a/themes/knowledge-base/knowledge-base.php b/themes/knowledge-base/knowledge-base.php
new file mode 100644
index 0000000000..2fb68a2045
--- /dev/null
+++ b/themes/knowledge-base/knowledge-base.php
@@ -0,0 +1,9 @@
+This theme was with by Perlkönig.
+ CATEGORIES: Categories
+ POPULAR_ARTICLES: Popular Articles
+ LATEST_ARTICLES: Latest Articles
+ AUTHOR: "Author:"
+ ALL_AUTHOR_POSTS: All posts by this author
+ ERROR: Error!
+ ARTICLE_CATEGORIES: Article Categories
+ RELATED_ARTICLES: Related Articles
+ COMMENTS: Comments
+ CATEGORY: "Category:"
+fr:
+ FOOTER_TEXT:
+ CATEGORIES: Kategorie
+ POPULAR_ARTICLES: Oblíbené články
+ LATEST_ARTICLES: Poslední články
+ AUTHOR: "Autor:"
+ ALL_AUTHOR_POSTS: Všechny autorovy články
+ ERROR: Chyba!
+ ARTICLE_CATEGORIES: Kategorie článků
+ RELATED_ARTICLES: Související články
+ COMMENTS: Komentáře
+ CATEGORY: "Kategorie:"
+zh-CN:
+ FOOTER_TEXT:
+ {% if (grav.theme.config.params.articles.show.date) or (grav.theme.config.params.articles.show.authors) or (grav.theme.config.params.articles.show.topics) or (grav.theme.config.params.articles.show.time) %}
+
+ {% if grav.theme.config.params.articles.show.date %}
+ {{ page.date|date("F j, Y") }}
+ {% endif %}
+ {% if grav.theme.config.params.articles.show.authors %}
+ {% set authorlist = [] %}
+ {% for author in page.taxonomy['author'] %}
+ {# Check to see if a dedicated author page exists #}
+ {% set slug = author|hyphenize|url_encode %}
+ {% set p = page.find('/authors/'~slug) %}
+ {% if p == null %}
+ {% set authorlist = authorlist|merge([''~author~'']) %}
+ {% else %}
+ {% set authorlist = authorlist|merge([''~author~'']) %}
+ {% endif %}
+ {% endfor %}
+ {{ authorlist|join(', ') }}
+ {% endif %}
+ {% if grav.theme.config.params.articles.show.topics %}
+ {% set catlist = [] %}
+ {% for cat in page.taxonomy.category %}
+ {% set catlist = catlist|merge([''~cat~'']) %}
+ {% endfor %}
+ {{ catlist|join(', ') }}
+ {% endif %}
+ {% if grav.theme.config.params.articles.show.time %}
+ {{ page.content|readingtime }}
+ {% endif %}
+
+ {% endif %}
+
+
+ {{ page.content }}
+ {% if not page.header.hide_mediasummary %}
+
+ {% for image in page.media.images %}
+ {{ image.cropResize(700, 400).html("title", "alt", "itemscreenshot") }}
+ {% endfor %}
+ {% endif %}
+
+
+
+ {% if page.taxonomy.tag|length > 0 %}
+ {% set taglist = [] %}
+ {% for tag in page.taxonomy.tag %}
+ {% set taglist = taglist|merge([''~tag~'']) %}
+ {% endfor %}
+
+ {{ taglist|join(', ') }}
+
+ {% endif %}
+ {% if config.plugins.relatedpages.enabled and related_pages|length > 0 %}
+
+
{{ 'RELATED_ARTICLES'|t }}
+ {% include 'partials/relatedpages.html.twig' %}
+
+
diff --git a/themes/knowledge-base/templates/partials/relatedpages.html.twig b/themes/knowledge-base/templates/partials/relatedpages.html.twig
new file mode 100644
index 0000000000..109647c6b6
--- /dev/null
+++ b/themes/knowledge-base/templates/partials/relatedpages.html.twig
@@ -0,0 +1,17 @@
+
+ {% for related_path, score in related_pages %}
+ {% set related = grav['pages'].get(related_path) %}
+ {% if related %}
+ {% if related.header.media == 'video' %}
+
\ No newline at end of file
diff --git a/themes/knowledge-base/templates/partials/sidebar.html.twig b/themes/knowledge-base/templates/partials/sidebar.html.twig
new file mode 100644
index 0000000000..373cecf421
--- /dev/null
+++ b/themes/knowledge-base/templates/partials/sidebar.html.twig
@@ -0,0 +1,97 @@
+{% set homeroute = '/home' %}
+{% if grav.theme.config.params.articleroot is defined %}
+ {% set homeroute = grav.theme.config.params.articleroot %}
+{% endif %}
+{% if grav.theme.config.params.articles.root is defined %}
+ {% set homeroute = grav.theme.config.params.articles.root %}
+{% endif %}
+
+{% set options = { items: {'@page.descendants': homeroute}, 'order': {'by': 'date', 'dir': 'desc'}} %}
+{% set my_collection = page.collection(options) %}
+
+{% set catlist = taxonomy.taxonomy["category"]|keys %}
+{% set blist = [] %}
+{% if grav.theme.config.params.articles.blacklist is defined %}
+ {% set blist = grav.theme.config.params.articles.blacklist %}
+ {% set tmplst = [] %}
+ {% for cat in catlist %}
+ {% if cat not in blist %}
+ {% set tmplst = tmplst|merge([cat]) %}
+ {% endif %}
+ {% endfor %}
+ {% set catlist = tmplst %}
+{% endif %}
+
+{% if grav.theme.config.params.sidebar.show.categories %}
+
+
{{ 'CATEGORIES'|t }}
+
+ {% for cat in catlist|sort %}
+ {# Check to see if a dedicated category page exists #}
+ {% set slug = cat|hyphenize|url_encode %}
+ {% set p = page.find('/categories/'~slug) %}
+ {% if p == null %}
+
+{% endif %}
+
+{% set maxcount = 5 %}
+{% if grav.theme.config.params.sidebar.maxentries is defined %}
+ {% set maxcount = grav.theme.config.params.sidebar.maxentries %}
+{% endif %}
+
+{% if grav.theme.config.params.sidebar.show.popular %}
+
+ {% set counts = viewcounts|sort|reverse %}
+ {% set popular = [] %}
+ {% for route,views in counts %}
+ {% if route starts with homeroute %}
+ {% set thispage = page.find(route) %}
+ {% if thispage is not null %}
+ {% set popular = popular|merge([thispage]) %}
+ {% endif %}
+ {% endif %}
+ {% endfor %}
+ {% set tmplst = [] %}
+ {% for page in popular %}
+ {% set blisted = false %}
+ {% for bcat in blist %}
+ {% if bcat in page.taxonomy["category"] %}
+ {% set blisted = true %}
+ {% endif %}
+ {% endfor %}
+ {% if not blisted %}
+ {% set tmplst = tmplst|merge([page]) %}
+ {% endif %}
+ {% endfor %}
+ {% set popular = tmplst %}
+
{{ 'POPULAR_ARTICLES'|t }}
+ {% include 'partials/topiclist.html.twig' with {'articles': popular, 'maxcount': maxcount} %}
+
+{% endif %}
+
+{% if grav.theme.config.params.sidebar.show.latest %}
+
+
{{ 'LATEST_ARTICLES'|t }}
+ {% set tmplst = [] %}
+ {% for page in my_collection %}
+ {% set blisted = false %}
+ {% for bcat in blist %}
+ {% if bcat in page.taxonomy["category"] or (page.header.published is defined and not page.header.published) %}
+ {# Setting this to blacklisted when the category is in the blacklist OR if the page isn't yet published #}
+ {% set blisted = true %}
+ {% endif %}
+ {% endfor %}
+ {% if not blisted %}
+ {% set tmplst = tmplst|merge([page]) %}
+ {% endif %}
+ {% endfor %}
+ {% set articles = tmplst|slice(0,maxcount) %}
+ {% include 'partials/topiclist.html.twig' with {'articles': articles, 'maxcount': maxcount} %}
+
+{% endif %}
diff --git a/themes/knowledge-base/templates/partials/topiclist.html.twig b/themes/knowledge-base/templates/partials/topiclist.html.twig
new file mode 100644
index 0000000000..dc46ebdba3
--- /dev/null
+++ b/themes/knowledge-base/templates/partials/topiclist.html.twig
@@ -0,0 +1,17 @@
+{% if maxcount is not defined %}
+ {% set maxcount = (articles|length) + 1 %}
+{% endif %}
+
+{% for p in articles|slice(0,maxcount) %}
+ {# If the page isn't published, don't show it... #}
+ {% if not p.header.published is defined or p.header.published %}
+ {% if p.header.media == 'video' %}
+
diff --git a/themes/knowledge-base/templates/taxonomy.html.twig b/themes/knowledge-base/templates/taxonomy.html.twig
new file mode 100644
index 0000000000..3d08fe2366
--- /dev/null
+++ b/themes/knowledge-base/templates/taxonomy.html.twig
@@ -0,0 +1,93 @@
+{% extends 'partials/base.html.twig' %}
+
+{% block content %}
+
+{% set catlist = taxonomy.taxonomy["category"]|keys %}
+{% if grav.theme.config.params.articles.blacklist is defined %}
+ {% set blist = grav.theme.config.params.articles.blacklist %}
+ {% set tmplst = [] %}
+ {% for cat in catlist %}
+ {% if cat not in blist %}
+ {% set tmplst = tmplst|merge([cat]) %}
+ {% endif %}
+ {% endfor %}
+ {% set catlist = tmplst %}
+{% endif %}
+
+ {% set taxname = uri.query('name') %}
+ {% set taxval = uri.query('val') %}
+
+ {% if taxname %}
+ {% if taxname == 'category' %}
+ {% if taxval %}
+
+
{{ 'CATEGORY'|t }} {{ taxval }}
+ {% include 'partials/topiclist.html.twig' with {'articles': taxonomy.findTaxonomy({(taxname): taxval})} %}
+
+ {% else %}
+
+
Categories
+
+ {% for cat in catlist|sort %}
+ {# Check to see if a dedicated category page exists #}
+ {% set slug = cat|hyphenize|url_encode %}
+ {% set p = page.find('/categories/'~slug) %}
+ {% if p == null %}
+
+ {% include 'partials/topiclist.html.twig' with {'articles': taxonomy.findTaxonomy({(taxname): taxval})} %}
+
+ {% else %}
+
+
Authors
+
+ {% for author in taxonomy.taxonomy["author"]|keys|sort %}
+ {# Check to see if a dedicated author page exists #}
+ {% set slug = author|hyphenize|url_encode %}
+ {% set p = page.find('/authors/'~slug) %}
+ {% if p == null %}
+
{{ 'COMMENTS'|t }}
+