Skip to content

Commit e74a50e

Browse files
Hugo/Docsy site for documentation (#137)
* initial site * remove logos * remove test leftovers, disable analytics * remove localisation, other fixes * remove lsync script * make the docs button forward to the repo * add exclusion for the hugo site files
1 parent 110ef1c commit e74a50e

35 files changed

+2135
-4
lines changed

dev/tools/fix-boilerplate

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ def main():
3030

3131
excludes = [
3232
"**/zz_generated.*",
33+
#TODO: make hugo files work with the necessary headers
34+
"**/site/**",
3335
]
3436

3537
print(f"Scanning for license headers in {repo_root}")

netlify.toml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,17 @@
11
[build]
22
base = "site/"
33
publish = "public/"
4+
command = "npm ci && hugo build -e production"
45

5-
# A placeholder command that creates the publish directory and a single index.html file.
6-
# This ensures the build succeeds without needing a full site generator like Hugo yet.
7-
command = "mkdir -p public && echo 'Placeholder Page' > public/index.html"
6+
[build.environment]
7+
HUGO_VERSION = "0.150.0"
8+
9+
[context.production.environment]
10+
HUGO_ENV = "production"
11+
HUGO_BASEURL = "https://agent-sandbox.sigs.k8s.io/"
12+
13+
[context.deploy-preview]
14+
command = "hugo --enableGitInfo --buildFuture -b $DEPLOY_PRIME_URL"
15+
16+
[context.branch-deploy]
17+
command = "hugo --enableGitInfo --buildFuture -b $DEPLOY_PRIME_URL"

site/.gitignore

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,7 @@
1-
public/
1+
public/
2+
# Modules generated by node.js for CSS editing
3+
node_modules/
4+
# Resources directory generated by Hugo local build
5+
resources/
6+
#
7+
.hugo_build.lock
Lines changed: 215 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,215 @@
1+
a {
2+
text-decoration: none;
3+
}
4+
5+
// --------------------------------------------------
6+
// remove whitespace after footer
7+
// --------------------------------------------------
8+
footer {
9+
min-height: auto;
10+
}
11+
12+
// --------------------------------------------------
13+
// prevent overflow of long names in sidebar
14+
// --------------------------------------------------
15+
.td-sidebar-nav__section > ul {
16+
overflow-wrap: break-word;
17+
}
18+
19+
.td-overlay--dark::after {
20+
background-color: rgba(33, 61, 122, 0.6);
21+
}
22+
23+
#main_navbar {
24+
justify-content: end;
25+
padding-right: 16px;
26+
}
27+
28+
.row > * {
29+
flex-shrink: 1;
30+
}
31+
32+
.row > .container {
33+
max-width: 1200px;
34+
}
35+
36+
// --------------------------------------------------
37+
// custom navbar with larger logo, dropdown on mobile
38+
// --------------------------------------------------
39+
.td-navbar {
40+
min-height: auto;
41+
42+
.navbar-brand {
43+
margin: 0;
44+
padding: 0;
45+
46+
.text-uppercase {
47+
display: none;
48+
}
49+
50+
.navbar-logo {
51+
svg {
52+
display: inline-block;
53+
position: absolute;
54+
top: 0;
55+
z-index: 33;
56+
padding: 10px;
57+
height: 95px;
58+
background: white;
59+
border: 2px solid #4279f4;
60+
border-top: none;
61+
62+
@include media-breakpoint-down(md) {
63+
width: 80px;
64+
height: auto;
65+
padding: 6px;
66+
}
67+
}
68+
}
69+
}
70+
71+
.navbar-nav {
72+
@include media-breakpoint-down(md) {
73+
font-size: .875rem;
74+
.dropdown {
75+
min-width: inherit;
76+
}
77+
}
78+
}
79+
}
80+
81+
.td-sidebar {
82+
padding-bottom: 0.5rem;
83+
84+
.td-sidebar__inner {
85+
padding-top: 30px;
86+
87+
@include media-breakpoint-down(md) {
88+
padding-top: 10px;
89+
}
90+
}
91+
}
92+
93+
.td-sidebar-toc {
94+
@supports (position: sticky) {
95+
position: sticky;
96+
top: 60px;
97+
height: calc(100vh - 120px);
98+
overflow-y: auto;
99+
}
100+
}
101+
102+
103+
// --------------------------------------------------
104+
// 404 page
105+
// --------------------------------------------------
106+
.error-page {
107+
margin-top: 120px;
108+
109+
ul {
110+
margin-bottom: 50px;
111+
list-style-type: none;
112+
display: flex;
113+
align-items: center;
114+
justify-content: center;
115+
flex-wrap: wrap;
116+
padding-left: 0;
117+
}
118+
119+
li {
120+
margin-left: 10px;
121+
margin-right: 10px;
122+
}
123+
124+
h1 {
125+
text-align: center;
126+
margin-bottom: 20px;
127+
}
128+
129+
@media (min-width: 768px) and (max-width: 991px) {
130+
margin-top: 100px;
131+
}
132+
133+
@media (max-width: 767px) {
134+
margin-top: 50px;
135+
}
136+
}
137+
138+
figcaption {
139+
font-size: 0.8rem;
140+
text-align: center;
141+
font-style: italic;
142+
color: #6c757d;
143+
}
144+
145+
// --------------------------------------------------
146+
// for tabbed code blocks
147+
// --------------------------------------------------
148+
.nav-tabs {
149+
border-bottom: none !important;
150+
}
151+
152+
.td-content > ul li,
153+
.td-content > ol li.nav-item {
154+
margin-bottom: 0px;
155+
}
156+
157+
.td-content .tab-content .highlight {
158+
margin: 0;
159+
}
160+
161+
.tab-pane {
162+
border-radius: 0.25rem;
163+
padding: 0 16px 16px;
164+
165+
border: 1px solid #dee2e6;
166+
167+
&:first-of-type.active {
168+
border-top-left-radius: 0;
169+
}
170+
}
171+
172+
nav.foldable-nav .ul-1 .with-child>label:hover:before {
173+
transform: none;
174+
}
175+
176+
nav.foldable-nav .ul-1 .with-child>input:checked~label:hover:before {
177+
transform: rotate(90deg) !important;
178+
}
179+
180+
div.feature-state-notice {
181+
background-color: #daeaf9;
182+
border-radius: 0.75rem;
183+
padding: 1rem;
184+
margin-bottom: 1em;
185+
186+
font-size: 1.2em;
187+
188+
> .feature-state-name::before {
189+
content: '';
190+
color: #326ce5; // Kubernetes blue
191+
}
192+
> .feature-state-name {
193+
display: inline-block;
194+
font-size: 0.95em;
195+
font-weight: bold;
196+
color: #000;
197+
}
198+
199+
code {
200+
color: #000;
201+
font-size: 1em;
202+
background-color: #daeaf9;
203+
}
204+
205+
margin-right: 2em;
206+
max-width: 80%;
207+
208+
&.feature-deprecated {
209+
> .feature-state-name::before {
210+
color: #ed6a5a;
211+
}
212+
213+
background-color: #fbe1de;
214+
}
215+
}

0 commit comments

Comments
 (0)