diplodoc-platform / diplodoc-platform/cli
Theme management for static documentation
- Dominant language
- TypeScript
- Stars
- 123
- Forks
- 51
- Avg merge
- 10h 50m
- Merged PRs (30d)
- 38
Description
Currently, our static documentation build supports both dark and light themes, along with a theme switcher. We'd like to enhance the configuration options in the .yfm file to give more control over theme management. Specifically, we need to add functionality to:
**1. Disable the Light Theme and Theme Switcher:**
Users should have the option to disable the light theme entirely, resulting in the removal of the theme switcher. This can be accomplished by setting the themes array to include only the 'dark' theme.
```yaml
themes: ['dark']
```
**2. Change the Default Theme:**
Users should be able to change the default theme by specifying their preference at the start of the themes array. For example, if someone prefers the dark theme as default, they should configure the array like this:
```yaml
themes: ['dark', 'light']
```
This ensures the dark theme loads by default while still allowing users to switch to the light theme.
Request:
- Update the .yfm configuration setup to reflect these changes.
- Ensure that the theme switcher can be conditionally disabled based on the presence of a single theme in the configuration.
- Validate theme names to avoid typos that might cause configuration errors.
- Add information about this change to the documentation
Contributor guide
Research direction
Start by locating the .yfm configuration setup and the static documentation theme-switcher entry point. Trace how the themes array is read, then check how configuration errors and documentation updates are tested. Done means single-theme configurations hide the switcher, the first theme is the default, invalid names are rejected, and the change is documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, yaml
- Domain
- cli, documentation
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100