freeCodeCamp / freeCodeCamp/devdocs
Filter documentation via a query parameter for better browser interoperability
- 主要语言
- Ruby
- 星标
- 39.5k
- 派生
- 2.6k
- 平均合并
- 4 天 32 分钟
- 30 天内合并 PR
- 13
描述
# Feature request
Filter documentation via an optional query parameter
## Summary
DevDocs makes it really easy to filter on a specific set of docs in the UI, which is great. I use this in conjunction with browser site search to pass queries directly to the DevDocs search endpoint to skip landing on the main page first. However, there is one disadvantage: I can't seem to filter the documentation from the search endpoint directly. If want to search for a ruby-specific method from site search, I need to land on the main DevDocs page and filter manually.
[Browsers are embracing custom site search functionality](https://resources.arc.net/en/articles/7183263-site-search-directly-search-any-website) to allow quick access to search endpoints that can be invoked via a shortcut and this has become an important part of my workflow. It would be great to have documentation filtering in the search API to improve the interoperability of DevDocs search.
## Examples
The query endpoint looks like this:
`https://devdocs.io/#q=%s` where `%s` is replaced with my query string
It would be great to be able to do something like this to search only within Ruby 3.1:
`https://devdocs.io/#q=%s&doc=ruby3-1`
贡献指南
调研方向
从 issue 中显示的 DevDocs 查询端点 https://devdocs.io/#q=%s 开始,跟踪浏览器如何处理 q 参数和文档过滤。完成的标准是 URL 可以包含 doc=ruby3-1,使搜索仅针对请求的文档集执行。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- ruby
- 领域
- search, web-dev
- Issue 类型
- 功能
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 38/100