feat(faq): link siblings FAQs of same category
This commit is contained in:
parent
1e3c70feb8
commit
ae78224bac
5 changed files with 31 additions and 0 deletions
|
@ -16,6 +16,12 @@ class FAQsLoaderService
|
|||
FrontMatterParser::Parser.parse_file(file_path)
|
||||
end
|
||||
|
||||
def faqs_for_category(category)
|
||||
@faqs_by_path.values
|
||||
.filter { |faq| faq[:category] == category }
|
||||
.group_by { |faq| faq[:subcategory] }
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def load_faqs
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue