Hey folks, I have this YML file…
section:
- name: a
- questions:
- question: question 1a
answer: answer 1a
- question: question 2a
answer: answer 2a
- question: question 3a
answer: answer 3a
section:
- name: b
- questions:
- question: question 1b
answer: answer 1b
- question: question 2b
answer: answer 2b
- question: question 3b
answer: answer 3b
section:
- name: c
- questions:
- question: question 1c
answer: answer 1c
- question: question 2c
answer: answer 2c
- question: question 3c
answer: answer 3c
My goal is to be able to create a shortcode such that, in various content pages, I can say "{{<faq “a”>}} and have the ‘a’ section of questions listed out. The YML file is in my data folder, and I can access it, but I’m not sure how to select the specific set of questions I want (assume the YML is being added to, new sections being created, etc. without any modification to the shortcode)
I also considered having a /data/faq folder, and then a.yml, b.yml, c.yml … but I wasn’t sure how to access $.Site.Data.faq.