diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2022-12-08 15:46:14 +0300 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2022-12-08 15:46:14 +0300 |
commit | ae4f7f4129e4593dc829614b7ea19330e2937c5c (patch) | |
tree | a18be881efa785402012b3063b11c3b93a7c6b03 /lib | |
parent | b38ed6773a9ec2bcf85e660848bbf3150ccf1602 (diff) |
Fix how we find blueprints to generate index page for
Diffstat (limited to 'lib')
-rw-r--r-- | lib/helpers/blueprints.rb | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/helpers/blueprints.rb b/lib/helpers/blueprints.rb index 2e889732..2e12cc0b 100644 --- a/lib/helpers/blueprints.rb +++ b/lib/helpers/blueprints.rb @@ -2,8 +2,14 @@ module Nanoc::Helpers module Blueprints + BLUEPRINTS_PATH = '/ee/architecture/blueprints/*/index.md'.freeze + def all_blueprints - @items.find_all('/ee/architecture/blueprints/**/*.md').sort_by { |i| blueprint_creation_date(i) }.reverse + blueprints = @items.find_all(BLUEPRINTS_PATH).sort_by do |i| + blueprint_creation_date(i) + end + + blueprints.reverse end def author_link(author) @@ -18,7 +24,7 @@ module Nanoc::Helpers # TODO: this is generic, should live elsewhere def gl_label(label) return if label.nil? - + scope, text = label.tr('~', '').split('::') is_scoped = !text.nil? |