diff --git a/CHANGELOG.md b/CHANGELOG.md index b51d87d..fad2035 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,11 +2,12 @@ ## 03/16/2019 1. [](#new) - * Categories can now have landing pages like authors do (optional), thanks again to @awrog. + * 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 diff --git a/templates/partials/sidebar.html.twig b/templates/partials/sidebar.html.twig index ef12226..373cecf 100644 --- a/templates/partials/sidebar.html.twig +++ b/templates/partials/sidebar.html.twig @@ -1,3 +1,14 @@ +{% 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 %} @@ -11,14 +22,6 @@ {% set catlist = tmplst %} {% endif %} -{% 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 %} - {% if grav.theme.config.params.sidebar.show.categories %}