Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-docs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/Rules
diff options
context:
space:
mode:
authorMarshall Cottrell <mcottrell@gitlab.com>2022-11-09 00:22:59 +0300
committerSarah German <sgerman@gitlab.com>2022-11-09 00:22:59 +0300
commit1ae27a79d2086275b5ca3a1f60c5d67103dbadcb (patch)
tree4796c2cba286a35392846cb6f78f889a3ca0d391 /Rules
parent618007f8e9cc711a616e6186e178f429e1e656b2 (diff)
Add layout and styling for blueprint index page
Diffstat (limited to 'Rules')
-rw-r--r--Rules11
1 files changed, 11 insertions, 0 deletions
diff --git a/Rules b/Rules
index d9390f9a..695deb3e 100644
--- a/Rules
+++ b/Rules
@@ -6,6 +6,9 @@ TITLE_FILTER_REGEXP = /(#\s|#{BadgesFilter::BADGES_MARKDOWN_PATTERN})/.freeze
preprocess do
badges_filter = BadgesFilter.new
+ # Do not process Markdown files with an underscore prefix
+ @items.delete_if { |i| i.identifier.match?('/**/_*.md') }
+
@items.each do |item|
if item.identifier.to_s.end_with?(".md") && !item.binary?
# If there isn't already a 'redirect_to' defined in the yaml frontmatter,
@@ -38,6 +41,14 @@ preprocess do
# Run badges filter with title fragment
item[:title_badge] = badges_filter.run_from_markdown(raw_title.match(BadgesFilter::BADGES_MARKDOWN_PATTERN).to_s)
end
+
+ if item.identifier.match?('/ee/architecture/**/*.md')
+ item[:layout] = 'blueprints/index'
+ item[:feedback] = false
+ item[:comments] = false
+
+ item[:status] ||= 'proposed'
+ end
end
config[:algolia] = ENV['ALGOLIA_SEARCH'] || 'true'