Skip to content

Commit a48896f

Browse files
committed
lint and only reload API on debug
1 parent 234bd0d commit a48896f

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

src/Elastic.Documentation.Site/Assets/api-docs.css

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -71,15 +71,15 @@
7171
li {
7272
a {
7373
@apply text-grey-80 inline-block w-full p-2 pr-2 pl-2 no-underline;
74-
@apply border-white rounded-sm border;
74+
@apply rounded-sm border border-white;
7575
}
7676
a:hover {
7777
@apply bg-grey-10;
7878
@apply border-grey-20;
7979
}
8080
a.current {
8181
@apply text-grey-80 inline-block w-full p-2 pr-2 pl-2 no-underline;
82-
@apply border-white rounded-sm border;
82+
@apply rounded-sm border border-white;
8383
}
8484
a.current:hover {
8585
@apply bg-grey-10;
@@ -89,7 +89,7 @@
8989
li:only-child {
9090
a.current {
9191
@apply text-grey-80 inline-block w-full p-2 pr-2 pl-2 no-underline;
92-
@apply border-white rounded-sm border;
92+
@apply rounded-sm border border-white;
9393
}
9494
a.current:hover {
9595
@apply bg-grey-10;
@@ -103,7 +103,7 @@
103103
td:has(h2) {
104104
}
105105
td:has(h3) {
106-
@apply border-b-grey-20 border-b-1 pb-2 mb-2;
106+
@apply border-b-grey-20 mb-2 border-b-1 pb-2;
107107
}
108108
td.api-name {
109109
@apply pr-2;
@@ -114,7 +114,7 @@
114114
@apply border-b-grey-10 border-b-1;
115115
}
116116
tr:has(td.api-name) td {
117-
@apply pt-4 mt-4 pb-4 mb-4;
117+
@apply mt-4 mb-4 pt-4 pb-4;
118118
}
119119
}
120120
}
@@ -134,10 +134,7 @@
134134
'Courier New',
135135
monospace
136136
);
137-
font-feature-settings: var(
138-
--default-mono-font-feature-settings,
139-
normal
140-
);
137+
font-feature-settings: var(--default-mono-font-feature-settings, normal);
141138
font-variation-settings: var(
142139
--default-mono-font-variation-settings,
143140
normal

src/tooling/docs-builder/Http/DocumentationWebHost.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,9 @@ await context.Response.WriteAsync(@"
166166
private async Task<IResult> ServeApiFile(ReloadableGeneratorState holder, string slug, Cancel ctx)
167167
{
168168
#if DEBUG
169-
await holder.ReloadApiReferences(ctx);
169+
// only reload when actually debugging
170+
if (System.Diagnostics.Debugger.IsAttached)
171+
await holder.ReloadApiReferences(ctx);
170172
#endif
171173
var path = Path.Combine(holder.ApiPath.FullName, slug.Trim('/'), "index.html");
172174
var info = _writeFileSystem.FileInfo.New(path);

0 commit comments

Comments
 (0)