Skip to content

Commit 8482a4a

Browse files
Add CLI documentation (#301)
* docs: add CLI section to sphinx and add some style * docs: add missing help test to CLIs and make them work with sphinx * Refine Sphinx documentation generation Signed-off-by: Eike Waldt <waldt@b1-systems.de> Signed-off-by: Tobias Wolf <wolf@b1-systems.de> Co-authored-by: Tobias Wolf <wolf@b1-systems.de>
1 parent f420f50 commit 8482a4a

File tree

17 files changed

+882
-127
lines changed

17 files changed

+882
-127
lines changed

.github/workflows/docs.yml

Lines changed: 0 additions & 22 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,29 @@ env:
88
GIT_CLIFF_VERSION: 2.12.0
99

1010
jobs:
11+
docs:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
15+
- uses: gardenlinux/python-gardenlinux-lib/.github/actions/setup@main
16+
- run: make docs
17+
- if: ${{ github.ref_name != 'main' }}
18+
name: Upload as artifact
19+
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # pin@v6.0.0
20+
with:
21+
name: docs
22+
path: _build/
23+
- if: ${{ github.ref_name == 'main' }}
24+
name: Deploy to GitHub Pages
25+
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0
26+
with:
27+
publish_branch: gh-pages
28+
github_token: ${{ secrets.GITHUB_TOKEN }}
29+
publish_dir: _build
30+
force_orphan: true
31+
1132
create-pre-release:
33+
if: ${{ github.ref_name == 'main' }}
1234
runs-on: ubuntu-latest
1335
permissions:
1436
contents: write

docs/_static/custom.css

Lines changed: 318 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,318 @@
1+
/* Garden Linux Design System - Sphinx Theme Customization */
2+
3+
:root {
4+
/* Primary Green */
5+
--gardenlinux-primary-base: #027154;
6+
--gardenlinux-primary-dark: #015a43;
7+
--gardenlinux-primary-darker: #014332;
8+
--gardenlinux-primary-darkest: #012c21;
9+
--gardenlinux-primary-light: #038865;
10+
--gardenlinux-primary-lighter: #04a076;
11+
--gardenlinux-primary-lightest: #05b887;
12+
13+
/* Secondary Green */
14+
--gardenlinux-secondary-base: #009f76;
15+
--gardenlinux-secondary-dark: #008060;
16+
--gardenlinux-secondary-darker: #006149;
17+
--gardenlinux-secondary-darkest: #004232;
18+
--gardenlinux-secondary-light: #00be8c;
19+
--gardenlinux-secondary-lighter: #00dd9f;
20+
--gardenlinux-secondary-lightest: #00fcb2;
21+
22+
/* Accent Yellow/Gold */
23+
--gardenlinux-accent-base: #dfbe00;
24+
--gardenlinux-accent-dark: #b29900;
25+
--gardenlinux-accent-darker: #857400;
26+
--gardenlinux-accent-darkest: #584f00;
27+
--gardenlinux-accent-light: #ffd500;
28+
--gardenlinux-accent-lighter: #ffec33;
29+
--gardenlinux-accent-lightest: #fff366;
30+
31+
/* Semantic Colors */
32+
--gardenlinux-success: #009f76;
33+
--gardenlinux-success-light: #00be8c;
34+
--gardenlinux-success-dark: #008060;
35+
--gardenlinux-warning: #dfbe00;
36+
--gardenlinux-warning-light: #ffd500;
37+
--gardenlinux-warning-dark: #b29900;
38+
--gardenlinux-error: #d32f2f;
39+
--gardenlinux-error-light: #ef5350;
40+
--gardenlinux-error-dark: #c62828;
41+
--gardenlinux-info: #027154;
42+
--gardenlinux-info-light: #038865;
43+
--gardenlinux-info-dark: #015a43;
44+
}
45+
46+
/* Override Read the Docs theme colors with Garden Linux colors */
47+
.wy-side-nav-search {
48+
background-color: var(--gardenlinux-primary-base);
49+
}
50+
51+
.wy-side-nav-search > a {
52+
color: #ffffff !important;
53+
}
54+
55+
.wy-side-nav-search > div.version {
56+
color: rgba(255, 255, 255, 0.9) !important;
57+
}
58+
59+
/* Ensure all text in the search header is white */
60+
.wy-side-nav-search * {
61+
color: #ffffff !important;
62+
}
63+
64+
.wy-side-nav-search input[type="text"] {
65+
background-color: rgba(255, 255, 255, 0.2);
66+
border-color: rgba(255, 255, 255, 0.3);
67+
color: #ffffff;
68+
}
69+
70+
.wy-side-nav-search input[type="text"]::placeholder {
71+
color: rgba(255, 255, 255, 0.7);
72+
}
73+
74+
/* Menu colors - improved readability - white background */
75+
.wy-side-scroll {
76+
background-color: #ffffff;
77+
}
78+
79+
.wy-menu-vertical {
80+
background-color: #ffffff;
81+
}
82+
83+
.wy-menu-vertical a {
84+
color: #1a1a1a !important;
85+
font-weight: 500;
86+
}
87+
88+
/* Make unselected/collapsed menu items more readable */
89+
.wy-menu-vertical li:not(.current) > a {
90+
color: #1a1a1a !important;
91+
}
92+
93+
.wy-menu-vertical li.toctree-l1:not(.current) > a {
94+
color: #1a1a1a !important;
95+
font-weight: 500;
96+
}
97+
98+
.wy-menu-vertical a:hover {
99+
background-color: var(--gardenlinux-primary-lightest);
100+
color: var(--gardenlinux-primary-darkest) !important;
101+
}
102+
103+
.wy-menu-vertical li.current {
104+
background-color: var(--gardenlinux-primary-lightest);
105+
}
106+
107+
.wy-menu-vertical li.current > a {
108+
color: var(--gardenlinux-primary-darkest) !important;
109+
border-right: 3px solid var(--gardenlinux-primary-base);
110+
font-weight: 600;
111+
background-color: var(--gardenlinux-primary-lightest);
112+
}
113+
114+
.wy-menu-vertical li.toctree-l1.current > a {
115+
border-bottom: 1px solid var(--gardenlinux-primary-light);
116+
}
117+
118+
/* Improve nested menu items readability */
119+
.wy-menu-vertical li.toctree-l2 a,
120+
.wy-menu-vertical li.toctree-l3 a,
121+
.wy-menu-vertical li.toctree-l4 a {
122+
color: #1a1a1a !important;
123+
}
124+
125+
/* Make unselected nested items more readable */
126+
.wy-menu-vertical li.toctree-l2:not(.current) > a,
127+
.wy-menu-vertical li.toctree-l3:not(.current) > a,
128+
.wy-menu-vertical li.toctree-l4:not(.current) > a {
129+
color: #1a1a1a !important;
130+
font-weight: 400;
131+
}
132+
133+
.wy-menu-vertical li.toctree-l2.current > a,
134+
.wy-menu-vertical li.toctree-l3.current > a,
135+
.wy-menu-vertical li.toctree-l4.current > a {
136+
background-color: var(--gardenlinux-primary-lightest) !important;
137+
color: var(--gardenlinux-primary-darkest) !important;
138+
font-weight: 600;
139+
}
140+
141+
.wy-menu-vertical header,
142+
.wy-menu-vertical p.caption {
143+
color: #1a1a1a;
144+
font-weight: 600;
145+
background-color: #ffffff;
146+
}
147+
148+
/* Ensure all sidebar elements have white background */
149+
.wy-nav-side {
150+
background-color: #ffffff !important;
151+
}
152+
153+
.wy-nav-side .wy-menu-vertical {
154+
background-color: #ffffff !important;
155+
}
156+
157+
.wy-side-nav-search input[type="text"] {
158+
background-color: rgba(255, 255, 255, 0.2);
159+
border-color: rgba(255, 255, 255, 0.3);
160+
color: #ffffff;
161+
}
162+
163+
/* Override any black/dark backgrounds in sidebar */
164+
.wy-menu-vertical ul {
165+
background-color: #ffffff !important;
166+
}
167+
168+
.wy-menu-vertical li {
169+
background-color: transparent;
170+
}
171+
172+
/* Fix selected sub-sections - use light background with dark text */
173+
.wy-menu-vertical li.current a,
174+
.wy-menu-vertical li.current a:visited {
175+
color: var(--gardenlinux-primary-darkest) !important;
176+
background-color: var(--gardenlinux-primary-lightest) !important;
177+
}
178+
179+
.wy-menu-vertical li.current a:hover {
180+
color: var(--gardenlinux-primary-darkest) !important;
181+
background-color: var(--gardenlinux-primary-lighter) !important;
182+
}
183+
184+
/* Fix expand/collapse icon squares - make them dark and readable */
185+
.wy-menu-vertical .toctree-expand,
186+
.wy-menu-vertical span.toctree-expand,
187+
.wy-menu-vertical a .toctree-expand {
188+
color: #1a1a1a !important;
189+
border-color: #1a1a1a !important;
190+
opacity: 1 !important;
191+
font-weight: bold;
192+
}
193+
194+
.wy-menu-vertical .toctree-expand:before,
195+
.wy-menu-vertical span.toctree-expand:before,
196+
.wy-menu-vertical a .toctree-expand:before {
197+
color: #1a1a1a !important;
198+
border-color: #1a1a1a !important;
199+
}
200+
201+
/* Fix icon boxes for expandable items at all levels */
202+
.wy-menu-vertical li.toctree-l1 > a .toctree-expand,
203+
.wy-menu-vertical li.toctree-l2 > a .toctree-expand,
204+
.wy-menu-vertical li.toctree-l3 > a .toctree-expand,
205+
.wy-menu-vertical li.toctree-l4 > a .toctree-expand {
206+
color: #1a1a1a !important;
207+
border-color: #1a1a1a !important;
208+
background-color: transparent !important;
209+
}
210+
211+
/* Target the icon element directly */
212+
.wy-menu-vertical li .toctree-expand {
213+
color: #1a1a1a !important;
214+
border: 1px solid #1a1a1a !important;
215+
}
216+
217+
/* Make sure plus/minus signs are dark */
218+
.wy-menu-vertical .toctree-expand:after {
219+
color: #1a1a1a !important;
220+
}
221+
222+
/* Links */
223+
a {
224+
color: var(--gardenlinux-primary-base);
225+
}
226+
227+
a:hover {
228+
color: var(--gardenlinux-secondary-base);
229+
}
230+
231+
a:visited {
232+
color: var(--gardenlinux-primary-dark);
233+
}
234+
235+
/* Code blocks */
236+
.highlight {
237+
background-color: #f5f5f5;
238+
}
239+
240+
.highlight .hll {
241+
background-color: var(--gardenlinux-primary-lightest);
242+
}
243+
244+
/* Buttons and important elements */
245+
.btn-primary,
246+
.rst-content .btn-primary {
247+
background-color: var(--gardenlinux-primary-base);
248+
border-color: var(--gardenlinux-primary-base);
249+
color: #ffffff;
250+
}
251+
252+
.btn-primary:hover,
253+
.rst-content .btn-primary:hover {
254+
background-color: var(--gardenlinux-primary-dark);
255+
border-color: var(--gardenlinux-primary-dark);
256+
}
257+
258+
/* Admonitions */
259+
.rst-content .admonition {
260+
border-left: 4px solid;
261+
}
262+
263+
.rst-content .admonition.note {
264+
border-left-color: var(--gardenlinux-info);
265+
background-color: var(--gardenlinux-info-lightest);
266+
}
267+
268+
.rst-content .admonition.warning {
269+
border-left-color: var(--gardenlinux-warning);
270+
background-color: var(--gardenlinux-accent-lightest);
271+
}
272+
273+
.rst-content .admonition.danger,
274+
.rst-content .admonition.error {
275+
border-left-color: var(--gardenlinux-error);
276+
background-color: var(--gardenlinux-error-light);
277+
}
278+
279+
.rst-content .admonition.success,
280+
.rst-content .admonition.tip {
281+
border-left-color: var(--gardenlinux-success);
282+
background-color: var(--gardenlinux-secondary-lightest);
283+
}
284+
285+
/* Headers */
286+
h1,
287+
h2,
288+
h3,
289+
h4,
290+
h5,
291+
h6 {
292+
color: var(--gardenlinux-primary-base);
293+
}
294+
295+
/* Table of contents */
296+
.rst-content .toctree-wrapper > p.caption {
297+
color: var(--gardenlinux-primary-base);
298+
font-weight: bold;
299+
}
300+
301+
/* Logo styling */
302+
.logo {
303+
max-width: 250px;
304+
height: auto;
305+
margin: 10px 0;
306+
}
307+
308+
/* Footer */
309+
footer {
310+
border-top: 1px solid var(--gardenlinux-primary-light);
311+
}
312+
313+
/* Responsive adjustments */
314+
@media screen and (max-width: 768px) {
315+
.wy-side-nav-search {
316+
padding: 0.809em;
317+
}
318+
}

0 commit comments

Comments
 (0)