facebook / facebook/docusaurus

Choose search page version with URL argument

Đang mở
#9,356 3 bình luận 1 reaction 0 người được giao Xem trên GitHub
domain: search feature
Ngôn ngữ chính
TypeScript
Star
66.2k
Fork
10k
Merge trung bình
1 ngày 3 giờ
Pull request đã merge (30 ngày)
52

Mô tả

### Have you read the Contributing Guidelines on issues?

- [X] I have read the [Contributing Guidelines on issues](https://github.com/facebook/docusaurus/blob/main/CONTRIBUTING.md#issues).

### Description

It would be very useful to be able to pre-select version number for the search page with a URL argument.

### Has this been requested on Canny?

Not that I found

### Motivation

This feature would allow embedding the search page on other tools (website, IDE, else) by pointing directly to the wanted page.

In my use-case, developing an IDE with a custom programming language, it would allow me to have the documentation and an open search box with the wanted version already pre-selected for a smoother UX

### API design

As it's simply a feature, it could be just enabled by default and not require any particular configuration.

### Have you tried building it?

I simply gathered GET arguments from the URL and try to match it with one element from the list of available version. The URL looks something like this `https://gama-platform.org/search?version=1.9.2`

### Self-service

- [ ] I'd be willing to contribute this feature to Docusaurus myself.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.