Skip to content

Commit 7888c7c

Browse files
committed
feat(docs): apply TrakHound brand colour and logo to the VitePress theme
1 parent f6d1938 commit 7888c7c

3 files changed

Lines changed: 69 additions & 1 deletion

File tree

docs/.vitepress/config.ts

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,39 @@ export default withMermaid(
4444
ignoreDeadLinks: true,
4545

4646
head: [
47-
['meta', { name: 'theme-color', content: '#1f6feb' }],
47+
['meta', { name: 'theme-color', content: '#0073e6' }],
48+
['link', { rel: 'icon', type: 'image/png', href: '/logo.png' }],
49+
['meta', { property: 'og:type', content: 'website' }],
50+
['meta', { property: 'og:title', content: 'MTConnect.NET' }],
51+
[
52+
'meta',
53+
{
54+
property: 'og:description',
55+
content:
56+
'The .NET implementation of the MTConnect Standard — 100% public-surface API coverage, 100% MTConnect Standard compliance.',
57+
},
58+
],
59+
['meta', { property: 'og:image', content: '/logo.png' }],
60+
['meta', { name: 'twitter:card', content: 'summary_large_image' }],
61+
['meta', { name: 'twitter:title', content: 'MTConnect.NET' }],
62+
[
63+
'meta',
64+
{
65+
name: 'twitter:description',
66+
content: 'The .NET implementation of the MTConnect Standard.',
67+
},
68+
],
69+
['meta', { name: 'twitter:image', content: '/logo.png' }],
4870
],
4971

5072
themeConfig: {
73+
// The maintainer-supplied logo (`docs/img/mtconnect-net-03-md.png`,
74+
// copied into `docs/public/logo.png`) already carries the
75+
// 'mtconnect .NET' wordmark, so the text site title is hidden to
76+
// avoid the wordmark rendering twice in the top nav.
77+
logo: '/logo.png',
78+
siteTitle: false,
79+
5180
// Top nav: Compliance / Configure & Use / API / Concepts / Wire
5281
// formats / Modules / CLI / Cookbook / Troubleshooting.
5382
nav: [

docs/.vitepress/theme/index.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/**
2+
* VitePress theme entry for the MTConnect.NET documentation site.
3+
*
4+
* Extends the default theme and layers a small CSS override that
5+
* remaps the brand palette to the TrakHound accent (`#0073e6`).
6+
* Keeping the override in `./style.css` (rather than inlining a
7+
* `<style>` block) lets VitePress hash the asset for cache-busting
8+
* on each build.
9+
*
10+
* @see {@link https://vitepress.dev/guide/extending-default-theme}
11+
*/
12+
import DefaultTheme from 'vitepress/theme';
13+
import './style.css';
14+
15+
export default DefaultTheme;

docs/.vitepress/theme/style.css

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/*
2+
* Brand-palette override for the MTConnect.NET documentation site.
3+
*
4+
* The maintainer-supplied accent is #0073e6 (confirmed in discussion
5+
* #184). VitePress derives the navigation highlight, link colour,
6+
* active-state border, and CTA button fill from --vp-c-brand-1, with
7+
* -2 and -3 used for hover / pressed states. Light mode darkens the
8+
* shade as the index grows; dark mode lightens it. The soft variant
9+
* is the same hue at ~14-16% alpha for surface tints.
10+
*/
11+
12+
:root {
13+
--vp-c-brand-1: #0073e6;
14+
--vp-c-brand-2: #1f86eb;
15+
--vp-c-brand-3: #4ba0f0;
16+
--vp-c-brand-soft: rgba(0, 115, 230, 0.14);
17+
}
18+
19+
.dark {
20+
--vp-c-brand-1: #4ba0f0;
21+
--vp-c-brand-2: #1f86eb;
22+
--vp-c-brand-3: #0073e6;
23+
--vp-c-brand-soft: rgba(75, 160, 240, 0.16);
24+
}

0 commit comments

Comments
 (0)