Skip to content

Commit

Permalink
guides: hide guides with skip_listing: true
Browse files Browse the repository at this point in the history
Adds a frontmatter attribute that hides an entry from being listed
in the main guides page.
  • Loading branch information
thimy committed Sep 2, 2024
1 parent 4866f1e commit 0d81d2d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/_components/guides/category/section.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ def initialize(category:, title: nil, css_classes: "")
@category_name = category.name
@description = category.description
@resources = @site.collections.guides.resources.select do |guide|
guide.data.categories.find do |category|
!guide.data.skip_listing && guide.data.categories.find { |category|
Bridgetown::Utils.slugify(category) == Bridgetown::Utils.slugify(@category_name)
end
}
end
@remaining_count = @resources.count - 3
end
Expand Down
1 change: 1 addition & 0 deletions src/_guides/openapi/specification/_defaults.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
layout: indepth_guide
page_class: guide indepth-guide with-sidebar
sidebar_title: OpenAPI Specification
skip_listing: true

0 comments on commit 0d81d2d

Please sign in to comment.