facebook / facebook/docusaurus

Theme gallery

Đang mở
#3,522 4 bình luận 4 reaction 0 người được giao Xem trên GitHub
proposal
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ả

## Theme gallery

We'd like to have multiple Docusaurus themes.

For now:
- only the classic theme is usable, which does not give many options to users.
- the bootstrap theme is a WIP but not really usable yet.
- the community would also appreciate a Tailwind theme: https://github.com/facebook/docusaurus/issues/2961

We agreed that those themes should all rather implement the same UX and work with docs, blog, pages...
This way, we can:
- Share some UI-related code across the 3 themes in a `@docusaurus/utils-client` package (edit: this is now `@docusaurus/theme-common`)
- Share the same integration test suite
- Share the same theme options, and validation/normalization
- Only implement styled components per theme

Related issues to read, as we already had theme-gallery related discussions with @fanny here:
- Cypress integration tests: https://github.com/facebook/docusaurus/pull/3468
- Sharing code between themes: https://github.com/facebook/docusaurus/pull/2714

The integration test suite will be handled in a separate issue https://github.com/facebook/docusaurus/issues/3523

---

**IMPORTANT**: Algolia crawlers use DOM selectors to understand the hierarchy of the pages. We'll have to also make sure the default Algolia Docusaurus config works fine for all themes, so we should find a way to make the selectors "stable" across themes, in the same way they should be stable for tests. We'll probably add explicit "lvl0-lvl6" markers in each theme so that we don't break these selectors in the future.

See our current config: https://github.com/algolia/docsearch-configs/tree/master/configs/docusaurus-2.json

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.