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

support markdown for FAQ component #85

Open
logonoff opened this issue Aug 4, 2023 · 2 comments
Open

support markdown for FAQ component #85

logonoff opened this issue Aug 4, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@logonoff
Copy link
Member

logonoff commented Aug 4, 2023

Is your feature request related to a problem? Please describe.
As an FAQ author, I may want to add links for some of the answers in the FAQ page, or format some of the text, however there are currently no mechanisms for that to happen

Describe the solution you'd like
I would like the FAQ to become a markdown document, similar to CSSC's implementation (although I would much prefer headings instead of pipes to delimit questions and answers, e.g.,

## Category 1
### Question 1
Answer 1

### Question 2
Answer 2

## Category 2
### Question 1
Answer 1

)

Describe alternatives you've considered

  • the answer value in the JSON file to be pared differently such that answer can parse markdown syntax

I think a md document would be more readable in the long run however there are still questions on where to place the document, whether the FAQ deserves a separate page after this change, etc

Additional context
Add any other context or screenshots about the feature request here.

@logonoff logonoff added the enhancement New feature or request label Aug 4, 2023
@pandyah5
Copy link

pandyah5 commented Nov 6, 2023

I do have an idea that can help you implement this with minimal code change. Precisely this can be done in two steps:

  • Update the src/data/faq.json file to contain text data in the markdown format. Be mindful that you will have to escape special characters like quotes (")

  • Update the src/app/resources/page.jsx file to wrap the FAQs in a markdown div: <div class="name" markdown="1">

@logonoff
Copy link
Member Author

logonoff commented Nov 6, 2023

great idea!! but i'm not sure if we current have packages installed which have support for markdown divs. definitely will need to think about it though :)

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

2 participants