Skip to content

Commit c6b8257

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

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
@@ -50,10 +50,39 @@ export default withMermaid(
5050
ignoreDeadLinks: true,
5151

5252
head: [
53-
['meta', { name: 'theme-color', content: '#1f6feb' }],
53+
['meta', { name: 'theme-color', content: '#0073e6' }],
54+
['link', { rel: 'icon', type: 'image/png', href: '/logo.png' }],
55+
['meta', { property: 'og:type', content: 'website' }],
56+
['meta', { property: 'og:title', content: 'MTConnect.NET' }],
57+
[
58+
'meta',
59+
{
60+
property: 'og:description',
61+
content:
62+
'The .NET implementation of the MTConnect Standard — 100% public-surface API coverage, 100% MTConnect Standard compliance.',
63+
},
64+
],
65+
['meta', { property: 'og:image', content: '/logo.png' }],
66+
['meta', { name: 'twitter:card', content: 'summary_large_image' }],
67+
['meta', { name: 'twitter:title', content: 'MTConnect.NET' }],
68+
[
69+
'meta',
70+
{
71+
name: 'twitter:description',
72+
content: 'The .NET implementation of the MTConnect Standard.',
73+
},
74+
],
75+
['meta', { name: 'twitter:image', content: '/logo.png' }],
5476
],
5577

5678
themeConfig: {
79+
// The maintainer-supplied logo (`docs/img/mtconnect-net-03-md.png`,
80+
// copied into `docs/public/logo.png`) already carries the
81+
// 'mtconnect .NET' wordmark, so the text site title is hidden to
82+
// avoid the wordmark rendering twice in the top nav.
83+
logo: '/logo.png',
84+
siteTitle: false,
85+
5786
// Top nav: Compliance / Configure & Use / API / Concepts / Wire
5887
// formats / Modules / CLI / Cookbook / Troubleshooting.
5988
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)