prql icon indicating copy to clipboard operation
prql copied to clipboard

Nicer looking FAQ

Open max-sixty opened this issue 3 years ago • 4 comments

Does anyone have ideas for making the FAQ look better? Can we add a template for a clickable FAQ to our current theme, or would it conflict?

Currently it's not that elegant: https://prql-lang.org/faq/ — both not clickable, and very wide...

max-sixty avatar Jun 26 '22 22:06 max-sixty

It's a bit simple, but I think a ToC to jump to and from items could help. E.g.

## ToC

- [**Cool story Hansel, but what can I actually do with PRQL now?**](#cool-story-hansel-but-what-can-i-actually-do-with-prql-nowtoc)
- [**Something here reminds me of another project, did you take the idea from them?**](#something-here-reminds-me-of-another-project-did-you-take-the-idea-from-themtoc)

## [Cool story Hansel, but what can I actually do with PRQL now?](#toc)

...

## [Something here reminds me of another project, did you take the idea from them?](#toc)

Only issue is that this will put the linked sections at the top of the page, which currently means underneath the fixed-position header.

spenserblack avatar Jun 29 '22 13:06 spenserblack

That would be great! Can we create that in Hugo automatically?

It's possible we need to write our own template, but maybe we can leverage those already out there...

max-sixty avatar Jun 29 '22 19:06 max-sixty

I'm not familiar with Hugo, but I definitely agree that an auto-generated table of contents would be ideal. Just based on familiarity with similar tools, maybe each FAQ could be represented with a data format that points to FAQ contents, somewhat like this?

faqs:
  - title: "Cool story..."
    contents: partials/faqs/cool-story.md
<!-- partials/faqa/cool-story.md -->
We're still early...

Again, I'm not familiar with Hugo at the moment, so I may be way off the mark with this :slightly_smiling_face:

spenserblack avatar Jun 29 '22 20:06 spenserblack

Yes! That's exactly how hugo works actually — here's our front page: https://github.com/prql/prql/blob/main/website/content/_index.md?plain=1

max-sixty avatar Jun 30 '22 01:06 max-sixty

This was done by #1217, thanks @mklopets !

max-sixty avatar Feb 02 '23 20:02 max-sixty