godot-docs icon indicating copy to clipboard operation
godot-docs copied to clipboard

Add initial integration for questions & answers in relevant pages

Open Calinou opened this issue 5 years ago • 2 comments

Alpine.js is used on the frontend.

The backend is a static REST API generated by https://github.com/Calinou/godot-qa-api-generator.

Pages should have a .. questions-answers:: tag1 tag2 directive at the bottom when relevant. I've edited some pages to add such tags, but we should probably go over all pages in a future PR.

The API should allow CORS requests (*) since the JSON files will be hosted on a different domain (docs.godotengine.org/godot.readthedocs.io to godotengine.org).

Questions are sorted by popularity (highest score first) and the top 10 questions are displayed on relevant pages. The "(from Godot Q&A)"* link can be clicked to view all questions.

This closes https://github.com/godotengine/godot-proposals/issues/481.

Preview

Light theme

Q&A integration

Dark theme

Q&A integration

Calinou avatar Dec 01 '20 22:12 Calinou

Will we merge this soonish?

seppoday avatar Aug 13 '22 10:08 seppoday

Will we merge this soonish?

reduz wanted to do this differently (with an invisible tag per page), so probably not. For this to work, the Q&A website would have to be modified to hide tags that start with a specific prefix.

The other issue is that we're not 100% sure if we want to continue using Question2Answer in the future, as it's no longer really maintained upstream. There are a lot of unresolved spam and performance issues with it, which platforms like GitHub Discussions don't have.

Calinou avatar Aug 13 '22 10:08 Calinou

  • Superseded by https://github.com/godotengine/godot-docs/pull/7520, which is a different approach we've discussed during Godot Sprint 2023 in Valencia.

Unlike this PR, the approach linked above doesn't rely on the slow Question2Answer backend and doesn't require hosting a dedicated service to expose a REST API. It also goes for a php.net-style "user notes" as opposed to questions & answers. User notes displayed at the bottom of a manual or class reference page are usually more suited to bring clarifications, rather than asking support questions.

Calinou avatar Jun 15 '23 02:06 Calinou