Skip to content

Commit 94f7903

Browse files
authored
Merge pull request #241 from Yubico/dennisdyallo/docfx-updates
feat: Improved documentation site with search, dark mode, sitemap.xml and less cluttered navigation
2 parents b169aa2 + df6257e commit 94f7903

18 files changed

+563
-10981
lines changed

docfx.json

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"disableGitFeatures": true,
1212
"disableDefaultFilter": false,
1313
"namespaceLayout": "flattened",
14-
"memberLayout": "separatePages",
14+
"memberLayout": "samePage",
1515
"filter": "./docs/filterConfig.yml",
1616
"output": "./docs/core-api",
1717
"properties": { "TargetFramework": "netstandard2.0" }
@@ -26,15 +26,15 @@
2626
"disableGitFeatures": true,
2727
"disableDefaultFilter": false,
2828
"namespaceLayout": "flattened",
29-
"memberLayout": "separatePages",
29+
"memberLayout": "samePage",
3030
"filter": "./docs/filterConfig.yml",
3131
"output": "./docs/yubikey-api",
3232
"properties": { "TargetFramework": "netstandard2.0" }
3333
}
3434
],
3535
"build": {
3636
"sitemap": {
37-
"baseUrl": "https://dotnet.github.io/docfx",
37+
"baseUrl": "https://docs.yubico.com/yesdk",
3838
"changefreq": "monthly"
3939
},
4040
"content": [
@@ -68,11 +68,19 @@
6868
"output": "./docs/_site/",
6969
"globalMetadataFiles": [],
7070
"globalMetadata": {
71-
"_appFaviconPath": "images/favicon.ico",
72-
"_enableSearch": false
71+
"_googleAnalyticsTagId": "6195355",
72+
"_appFaviconPath": "./images/favicon.ico",
73+
"_enableSearch": true,
74+
"_appName" : "Yubico",
75+
"_appLogoPath" : "./images/yubico-circle-y-mark-white.png",
76+
"_lang": "en",
77+
"_gitContribute": {
78+
"repo":"https://github.com/Yubico/Yubico.NET.SDK",
79+
"branch":"develop"
80+
}
7381
},
7482
"fileMetadataFiles": [],
75-
"template": ["default", "./docs/yubikeysdk-template"],
83+
"template": ["default", "modern", "docs/custom-template"],
7684
"postProcessors": ["ExtractSearchIndex"],
7785
"disableGitFeatures": false
7886
}

docs/custom-template/public/main.css

Lines changed: 154 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,154 @@
1+
/* =============================================================================
2+
DOCFX CUSTOM STYLES
3+
============================================================================= */
4+
5+
/* =============================================================================
6+
HEADER & NAVIGATION
7+
============================================================================= */
8+
9+
/* Logo styling */
10+
#logo {
11+
width: 50px;
12+
height: 50px;
13+
margin-right: 16px;
14+
}
15+
16+
/* Header background */
17+
header.bg-body {
18+
background-color: #8cc041 !important;
19+
}
20+
21+
[data-bs-theme="dark"] header.bg-body {
22+
background-color: #6a9b2a !important;
23+
}
24+
25+
/* Remove redundant Home header */
26+
#navbar > ul > li:nth-child(1) > a {
27+
display: none;
28+
}
29+
30+
/* Navbar base styling */
31+
.navbar {
32+
--bs-navbar-bg: #8cc041 !important;
33+
--bs-navbar-color: #ffffff !important;
34+
--bs-navbar-hover-color: rgba(255, 255, 255, 0.8) !important;
35+
--bs-navbar-active-color: #e0e0e0 !important;
36+
--bs-navbar-brand-color: #e0e0e0 !important;
37+
--bs-navbar-brand-hover-color: rgba(255, 255, 255, 0.8) !important;
38+
--bs-navbar-toggler-color: #e0e0e0 !important;
39+
background-color: #8cc041 !important;
40+
}
41+
42+
/* Navbar text and interactive elements */
43+
.navbar .nav-link,
44+
.navbar .navbar-brand,
45+
.navbar .btn,
46+
.navbar .dropdown-toggle {
47+
color: #ffffff !important;
48+
}
49+
50+
/* Active nav link styling */
51+
.navbar .nav-link.active {
52+
font-weight: 600;
53+
background-color: rgba(0, 0, 0, 0.1) !important;
54+
border-radius: 4px;
55+
}
56+
57+
/* Dark mode navbar adjustments */
58+
[data-bs-theme="dark"] .navbar {
59+
--bs-navbar-color: #e0e0e0 !important;
60+
--bs-navbar-bg: #6a9b2a !important;
61+
background-color: #6a9b2a !important;
62+
}
63+
64+
[data-bs-theme="dark"] .navbar .nav-link,
65+
[data-bs-theme="dark"] .navbar .navbar-brand,
66+
[data-bs-theme="dark"] .navbar .btn,
67+
[data-bs-theme="dark"] .navbar .dropdown-toggle,
68+
[data-bs-theme="dark"] .navbar .bi {
69+
color: #e0e0e0 !important;
70+
}
71+
72+
[data-bs-theme="dark"] .navbar .nav-link.active {
73+
background-color: rgba(0, 0, 0, 0.2) !important;
74+
}
75+
76+
/* =============================================================================
77+
BREADCRUMB
78+
============================================================================= */
79+
80+
/* Remove single-item breadcrumb */
81+
.breadcrumb:has(li:first-child:last-child) {
82+
display: none;
83+
}
84+
85+
/* =============================================================================
86+
API DOCUMENTATION
87+
============================================================================= */
88+
89+
/* Namespace and assembly names */
90+
.namespace-name,
91+
.assembly-name {
92+
display: block;
93+
font-size: 14px;
94+
color: rgb(94, 94, 94);
95+
word-wrap: break-word;
96+
word-break: break-word;
97+
}
98+
99+
.namespace-name {
100+
margin-top: 20px;
101+
}
102+
103+
.assembly-name {
104+
margin-bottom: 30px;
105+
}
106+
107+
/* Class inheritance */
108+
.derivedClasses {
109+
margin-top: 20px;
110+
}
111+
112+
.derivedClasses-label {
113+
font-weight: 600;
114+
}
115+
116+
.derivedClasses dd {
117+
display: block;
118+
margin-inline-start: 20px;
119+
}
120+
121+
/* Member info tables */
122+
.memberinfo {
123+
font-size: 14px;
124+
margin: 10px 0;
125+
}
126+
127+
.memberinfo td:first-child {
128+
width: 30%;
129+
}
130+
131+
.memberinfo thead {
132+
background-color: #f2f2f2;
133+
}
134+
135+
/* =============================================================================
136+
CODE BLOCKS
137+
============================================================================= */
138+
139+
/* Code language label */
140+
.codewrapper .language {
141+
color: rgb(23, 23, 23);
142+
border: 1px solid rgb(227, 227, 227);
143+
border-bottom: 0;
144+
background-color: rgb(242, 242, 242);
145+
padding: 2px 16px;
146+
font-size: 12px;
147+
}
148+
149+
/* Code block container */
150+
.codewrapper pre {
151+
border: 1px solid rgb(227, 227, 227);
152+
border-radius: 0;
153+
background-color: rgb(250, 250, 250);
154+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"summary": "Summary",
3+
"note": "<h5>Note</h5>",
4+
"warning": "<h5>Warning</h5>",
5+
"tip": "<h5>Tip</h5>",
6+
"important": "<h5>Important</h5>",
7+
"caution": "<h5>Caution</h5>"
8+
}

docs/filterConfig.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,6 @@ apiRules:
1616
- exclude:
1717
uidRegex: ^System\.*
1818
type: Type
19+
- exclude:
20+
hasAttribute:
21+
uid: System.ObsoleteAttribute

0 commit comments

Comments
 (0)