Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FAQ module #4

Open
overlordtm opened this issue Dec 31, 2020 · 0 comments
Open

FAQ module #4

overlordtm opened this issue Dec 31, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@overlordtm
Copy link
Contributor

Implement FAQ module.

Current state:
FAQ identifiers are stored in github.com/sledilnik/website/blob/master/src/content/faq.js and actual strings are stored in i18n jsons (src/locales/*.json). In JS, everything is compiled into searchable database, using fuse for client side search

Desired state:

  • FAQ will be available via APi endpoint e.g. /api/v1/faq
  • Import current questions in sl and en to database
  • API should return translated questions for given langiuage give as query param (lang) or Accept-Language header (query param overrides header).
  • Consider FAQ questions have to be ordered and grouped by sections (see how does current FAQ looks like)
  • Search will remain client side, so API return all objects
  • Add option to add keywords to question, for search

Example API response should look like:

{
  "meta" {...},
  "objects": {
    {
      "title": "Section title",
      "faq": [
        { "question": "Translated question", "answer": "translated answer", "keywords": ["some", "keyworrds", "for", "search"] }
        ...
        ]
    }, ...
}
@overlordtm overlordtm added the enhancement New feature or request label Dec 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant