github 像在 Microsoft 文档上一样发布反馈

github issue feedback like on microsoft docs

例如,当您转到 https://docs.microsoft.com/en-gb/aspnet/core/getting-started/?view=aspnetcore-3.1&tabs=macos 或任何其他 Microsoft 文档时,页面末尾有 github 反馈 - 您可以直接在站点或 guthub 上打开问题,因为文档发布在 github.

我想为我的网站做这样的事情,阅读文章的人可以提出改进建议。这是制作类似 wiki 网站的好方法。有办法吗?

如果你只是想要一个 URL 来打开一个空白问题,你只需要提供一个 link 到 https://github.com/<user-name>/<repo-name>/issues/new

如果您希望问题具有预填充文本,您可以使用查询参数生成 URL。 This help page 描述了如何做到这一点。

最简单的方法是在 GitHub 上创建一个问题模板,然后使用 template 参数。正如 linked 文章中的 quoted

You can use the template query parameter to specify a template to automatically fill the issue or pull request body. The template query parameter works with templates stored in an ISSUE_TEMPLATE or PULL_REQUEST_TEMPLATE subdirectory within the root, docs/ or .github/ directory in a repository.

If a repository contains only the default pull request or issue template, any new issues or pull requests will have the default template in the body.

您还可以使用其他参数来自定义问题标题、文本、标签等。This project稍微简化了此任务。

感谢您的回答,但我找到了这个 https://utteranc.es/ 以及我想要的一切。而且它易于使用。我会把另一个留给正确的答案,但如果有人想要更多开箱即用的东西,你可以使用我的发现。