Skip to content

Commit

Permalink
Update vitepress
Browse files Browse the repository at this point in the history
- Upgrade theme styling overrides
- Add mathjax support to markdown
- Update from vitepress 1.0.0-beta.1 to vitepress 1.3.4
  • Loading branch information
sturnclaw committed Sep 12, 2024
1 parent de1ed69 commit c05283f
Show file tree
Hide file tree
Showing 4 changed files with 1,362 additions and 605 deletions.
3 changes: 2 additions & 1 deletion .vitepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ export default {

markdown: {
config: mdConfig,
theme: 'material-theme-palenight'
theme: 'material-theme-palenight',
math: true
},

vite: {
Expand Down
40 changes: 14 additions & 26 deletions .vitepress/theme/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,46 +3,34 @@
*/

:root:not(.dark) {
--vp-c-brand: #3b469c;
--vp-c-brand-light: #545fbf;
--vp-c-brand-lighter: #7782e5;
--vp-c-brand-dark: #2f3673;
--vp-c-brand-darker: #1c214d;
--vp-c-brand-1: #4747B8;
--vp-c-brand-2: #1c214d;
--vp-c-brand-3: #3646A1;
--vp-c-brand-4: #6477D8;

/* tweak sidebar colors slightly darker */
--vp-c-bg-alt: #efefef;
--vp-c-text-2: rgba(60, 60, 60, 0.8);
}

:root.dark {
--vp-c-brand: #8792f9;
--vp-c-brand-light: #a1a9ff;
--vp-c-brand-lighter: #b3baff;
--vp-c-brand-dark: #545fbf;
--vp-c-brand-darker: #3b469c;
--vp-c-brand-1: #8792f9;
--vp-c-brand-2: #a1a9ff;
--vp-c-brand-3: #5863c7;
--vp-c-brand-4: #3b469c;
}

/* invert hover behavior of dark theme branded buttons */
--vp-button-brand-bg: var(--vp-c-brand-dark);
--vp-button-brand-border: var(--vp-c-brand-dark);
--vp-button-brand-hover-bg: var(--vp-c-brand-darker);
--vp-button-brand-hover-border: var(--vp-c-brand-darker);
/* invert hover behavior of branded buttons */
:root {
--vp-button-brand-bg: var(--vp-c-brand-3);
--vp-button-brand-hover-bg: var(--vp-c-brand-4);
}

/* Site title animates towards brand color rather than fades out */
:root .title {
transition: color 0.25s;
}
:root .title:hover {
color: var(--vp-c-brand);
color: var(--vp-c-brand-1);
opacity: 1.0;
}

/* light theme links get darker when hovered */
:root:not(.dark) .vp-doc a:hover {
color: var(--vp-c-brand-darker);
}

/* dark theme links get lighter when hovered */
:root.dark .vp-doc a:hover {
color: var(--vp-c-brand-lighter);
}
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@
"repository": "https://github.com/pioneerspacesim/pioneer-dev-docs",
"author": "Pioneer Developers",
"devDependencies": {
"fast-glob": "^3.2.12",
"fast-glob": "^3.3.0",
"gray-matter": "^4.0.3",
"markdown-it-footnote": "^3.0.3",
"vitepress": "^1.0.0-beta.1",
"vue": "^3.3.0"
"markdown-it-mathjax3": "^4.3.2",
"vitepress": "^1.3.0",
"vue": "^3.4.0"
},
"scripts": {
"dev": "vitepress dev .",
Expand Down
Loading

0 comments on commit c05283f

Please sign in to comment.