Categories are defined in docs/.vuepress/config.js
in the options object that is
passed to the FAQ plugin. The order of the keys is the same as the order of display.
For each category defined in the config file, there is also a corresponding directory
in faqs/
and that is where you will be putting the FAQ items.
NOTE: Remember, if you need to create a new category, you must both define the category in the config file as well as create a directory in
faqs/
.
Every .md
file within a category's directory corresponds to an FAQ item.
An FAQ item comprises:
question
- The question, used as the title/headingorder
- An integer, used to determine the orderinglinks
- Optional links to related internal/external resources
---
question: How do I create an FAQ?
links:
Meta:
- href: https://github.com/dobromir-hristov/vuecommunity/tree/master/faqs/README.md
text: A link to the file you're already reading.
order: 1
---
Creating an FAQ *couldn't* be **easier**!
The question
is essentially the title but is also used to build the slug.
It should be phrased as a question and is required.
The links
object maps <useful-links-section>
titles to links.
The links will automatically be inserted below the content, if present.
A link object should contain a href
and a text
.
You can have as many sections and as many links as you want.
links:
Section One:
- href: https://www.example.com/foo
text: Foo
- href: https://www.example.com/bar
text: Bar
Section Two:
- href: https://www.example.com/baz
text: Baz
Everything below the YAML Front Matter is just Markdown.
NOTE For now, you cannot use Vue components (such as badges) inside the Markdown but this will be rectified as soon as possible.