mirror of
https://github.com/facebook/docusaurus.git
synced 2025-08-03 16:59:06 +02:00
feat(theme): allow to load a Docusaurus page with theme from query-string: ?docusaurus-theme=dark (#8708)
This commit is contained in:
parent
50b1dc7db3
commit
0f7552accb
5 changed files with 78 additions and 7 deletions
|
@ -127,6 +127,17 @@ In light mode, the `<html>` element has a `data-theme="light"` attribute; in dar
|
|||
}
|
||||
```
|
||||
|
||||
:::tip
|
||||
|
||||
It is possible to initialize the Docusaurus theme directly from a `docusaurus-theme` query string parameter.
|
||||
|
||||
Examples:
|
||||
|
||||
- [`https://docusaurus.io/?docusaurus-theme=dark`](https://docusaurus.io/?docusaurus-theme=dark)
|
||||
- [`https://docusaurus.io/docs/configuration?docusaurus-theme=light`](https://docusaurus.io/docs/configuration?docusaurus-theme=light)
|
||||
|
||||
:::
|
||||
|
||||
### Mobile View {#mobile-view}
|
||||
|
||||
Docusaurus uses `996px` as the cutoff between mobile screen width and desktop. If you want your layout to be different in the mobile view, you can use media queries.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue