You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: Update examples to reflect real-world usage patterns
Updated all code examples in README and documentation to use more
realistic scenarios:
- Replaced generic examples with practical use cases
- Added clear organizational vs standalone project patterns
- Included proper comments in YAML examples
- Used realistic project names and URLs (your-org/your-project)
- Emphasized shared config approach for organizations
- Added step-by-step guides for common workflows
- Made nested dropdown examples more comprehensive
This makes it easier for new users to understand how to apply
the plugin to their specific use case.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
**Live Example**: The "CMS POG Docs" dropdown in this site's header is loaded from the [cms-docs-common](https://github.com/cms-cat/cms-docs-common) repository via git submodule!
@@ -79,44 +115,59 @@ plugins:
79
115
You can combine shared config with site-specific dropdowns:
Both will appear in the header - check this example site to see it in action!
133
+
Both shared and project-specific dropdowns will appear in the header - check this example site to see it in action!
93
134
94
135
## Nested Dropdowns
95
136
96
137
You can create nested dropdowns (submenus) by using the `submenu` key instead of `url`:
97
138
98
139
```yaml
140
+
# mkdocs.yml
99
141
plugins:
100
142
- header-dropdown:
101
143
dropdowns:
102
144
- title: "Resources"
103
145
links:
104
-
- text: "GitHub"
105
-
url: "https://github.com/example"
106
-
- text: "Documentation" # This will have an arrow
146
+
- text: "GitHub Repository"
147
+
url: "https://github.com/your-org/your-project"
148
+
target: "_blank"
149
+
- text: "Documentation" # This will have an arrow →
107
150
submenu:
108
151
- text: "User Guide"
109
152
url: "/guide/"
110
153
- text: "API Reference"
111
154
url: "/api/"
112
-
- text: "FAQ"
113
-
url: "/faq/"
155
+
- text: "Tutorials"
156
+
url: "/tutorials/"
157
+
- text: "Community" # Another nested menu
158
+
submenu:
159
+
- text: "Forum"
160
+
url: "https://forum.example.com"
161
+
target: "_blank"
162
+
- text: "Chat"
163
+
url: "https://chat.example.com"
164
+
target: "_blank"
114
165
```
115
166
116
-
**Live Example**: Hover over the "Resources" dropdown and then hover over "Documentation" to see a nested submenu appear to the right!
167
+
**Live Example**: Hover over the "Resources" dropdown in this site's header, then hover over "Documentation" to see a nested submenu appear to the right!
117
168
118
169
Features:
119
-
- Arrow indicator (▶) shows which items have submenus
120
-
- Submenus appear on hover to the right
170
+
- **Arrow indicator** (▶) shows which items have submenus
0 commit comments