From 7c8372c8933217153f5b4af1970c3fee28856646 Mon Sep 17 00:00:00 2001 From: Saskia Hiltemann Date: Mon, 15 Mar 2021 18:53:15 +0100 Subject: [PATCH] add support for manually specifying faq dir --- _layouts/faq-page.md | 5 ++++- all-faq.md | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) mode change 120000 => 100644 all-faq.md diff --git a/_layouts/faq-page.md b/_layouts/faq-page.md index 7d824bd7f90994..0bddf2f258fcda 100644 --- a/_layouts/faq-page.md +++ b/_layouts/faq-page.md @@ -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 "%} diff --git a/all-faq.md b/all-faq.md deleted file mode 120000 index f3967d68d82414..00000000000000 --- a/all-faq.md +++ /dev/null @@ -1 +0,0 @@ -faqs/galaxy/index.md \ No newline at end of file diff --git a/all-faq.md b/all-faq.md new file mode 100644 index 00000000000000..eea4f5bb97a519 --- /dev/null +++ b/all-faq.md @@ -0,0 +1,4 @@ +--- +layout: faq-page +snippets_dir: faqs/ +---