Skip to content

Commit

Permalink
add support for manually specifying faq dir
Browse files Browse the repository at this point in the history
  • Loading branch information
shiltemann committed Mar 15, 2021
1 parent e6a6a2c commit 7c8372c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion _layouts/faq-page.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@
layout: faqs
---


{% if page.snippets_dir %}
{% assign snippets_dir = page.snippets_dir %}
{% else %}
{% assign snippets_dir = page.dir | remove_first: '/' %}
{% endif %}

{% assign faqs = site.pages | where: "layout", "faq" %}
{% assign topic_faqs = faqs | where_exp: "item", "item.path contains snippets_dir "%}
Expand Down
1 change: 0 additions & 1 deletion all-faq.md

This file was deleted.

4 changes: 4 additions & 0 deletions all-faq.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
layout: faq-page
snippets_dir: faqs/
---

0 comments on commit 7c8372c

Please sign in to comment.