Skip to content

Commit 1213cc1

Browse files
authored
Upgrade vuepress (#167)
* Half-working * Colors working * Fixed lists and fine tuned Open API spec * Cleaned up config * fixed lint * added support comment * Set minimum node * Create .nvmrc
1 parent 3525abf commit 1213cc1

File tree

8 files changed

+3311
-2629
lines changed

8 files changed

+3311
-2629
lines changed

.eslintignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
node_modules
2+
dist
3+
.temp
4+
.cache
5+
src/.vuepress/dist
6+
src/.vuepress/.temp
7+
src/.vuepress/.cache
8+
*.min.js

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
20.10.0

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,7 @@ When contributing PRs, please do your best to follow these guidelines:
2727
- Always capitalize "Passwordless.dev" and "Bitwarden".
2828
- Feel free to use **bold** text to emphasize words or phrases, but please avoid italics or underlines.
2929
- Use numerals (e.g. 1, 2, 3) to represent numbers.
30+
31+
## Support
32+
33+
If you need help with your Passwordless.dev integration, please reach out to [email protected].

package-lock.json

Lines changed: 3248 additions & 2602 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,30 @@
88
"email": "[email protected]"
99
},
1010
"repository": "https://github.com/passwordless/docs",
11+
"engines": {
12+
"node": ">=20.10.0"
13+
},
1114
"scripts": {
1215
"dev": "vuepress dev src",
1316
"build": "vuepress build src",
14-
"lint": "vuepress check-md src --fix && prettier . --write && eslint \"**/*.{js,vue}\" --fix",
15-
"lint:check": "vuepress check-md src && prettier . --check && eslint \"**/*.{js,vue}\""
17+
"lint": "prettier . --write && eslint \"**/*.{js,ts,vue}\" --fix",
18+
"lint:check": "prettier . --check && eslint \"**/*.{js,ts,vue}\""
1619
},
1720
"dependencies": {
1821
"@passwordlessdev/passwordless-client": "1.1.2",
1922
"swagger-ui-dist": "5.12.3"
2023
},
2124
"devDependencies": {
22-
"@vuepress/plugin-docsearch": "2.0.0-rc.0",
23-
"@vuepress/plugin-register-components": "2.0.0-rc.0",
25+
"@vuepress/bundler-vite": "2.0.0-rc.26",
26+
"@vuepress/plugin-docsearch": "2.0.0-rc.115",
27+
"@vuepress/plugin-register-components": "2.0.0-rc.114",
28+
"@vuepress/theme-default": "2.0.0-rc.115",
2429
"eslint": "8.56.0",
2530
"eslint-config-prettier": "9.1.0",
2631
"eslint-plugin-vue": "9.20.1",
2732
"prettier": "3.2.4",
2833
"prettier-plugin-organize-imports": "4.0.0",
29-
"vuepress": "2.0.0-rc.0",
30-
"vuepress-plugin-code-switcher": "2.0.0",
31-
"vuepress-plugin-md-enhance": "2.0.0-rc.12"
34+
"sass-embedded": "^1.93.2",
35+
"vuepress": "2.0.0-rc.26"
3236
}
3337
}

src/.vuepress/config.ts

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { defaultTheme } from 'vuepress';
2-
import { mdEnhancePlugin } from 'vuepress-plugin-md-enhance';
1+
import { viteBundler } from '@vuepress/bundler-vite';
2+
import { defaultTheme } from '@vuepress/theme-default';
33
import { docsearchPlugin } from '@vuepress/plugin-docsearch';
44
import { registerComponentsPlugin } from '@vuepress/plugin-register-components';
55
import * as path from 'path';
@@ -10,6 +10,7 @@ export default {
1010
title: 'Passwordless.dev Documentation',
1111
base: '/',
1212
description: description,
13+
bundler: viteBundler(),
1314
head: [
1415
['link', { rel: 'icon', href: '/icon.svg' }],
1516
['meta', { name: 'apple-mobile-web-app-capable', content: 'yes' }],
@@ -72,7 +73,7 @@ export default {
7273
},
7374
{
7475
collapsible: true,
75-
link: '/guide/backend',
76+
link: '/guide/backend/',
7677
text: 'Backend',
7778
children: [
7879
{
@@ -107,7 +108,7 @@ export default {
107108
},
108109
{
109110
collapsible: true,
110-
link: '/guide/frontend',
111+
link: '/guide/frontend/',
111112
text: 'Frontend',
112113
children: [
113114
{
@@ -189,19 +190,12 @@ export default {
189190

190191
plugins: [
191192
docsearchPlugin({
193+
appId: 'H4XQ4LY5NY',
192194
apiKey: '76fc9fe901fe62268368f74e492ccbd0',
193195
indexName: 'passwordless',
194-
appId: 'H4XQ4LY5NY'
195-
}),
196-
mdEnhancePlugin({
197-
breaks: true,
198-
imgMark: true,
199-
imgSize: true,
200-
checkLinks: {
201-
status: 'dev'
202-
},
203-
codetabs: true,
204-
tabs: true
196+
searchParameters: {
197+
facetFilters: []
198+
}
205199
}),
206200
registerComponentsPlugin({
207201
componentsDir: path.resolve(__dirname, './components')

src/.vuepress/styles/palette.scss

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,23 @@
1-
@import 'docsearch';
1+
@use 'docsearch';
22

33
:root {
4-
// brand colors
4+
// brand colors (VuePress 2.x uses --vp-c-accent for primary brand color)
5+
--vp-c-accent: #175ddc;
6+
--vp-c-accent-bg: #175ddc;
7+
--vp-c-accent-hover: #1250c4;
8+
--vp-c-accent-text: #ffffff;
9+
--vp-c-accent-soft: rgba(23, 93, 220, 0.14);
10+
11+
// Legacy variable names for backward compatibility
512
--c-brand: #175ddc;
613
--c-brand-light: #175ddc;
714

8-
// background colors
15+
// background colors (VuePress 2.x naming)
16+
--vp-c-bg: #ffffff;
17+
--vp-c-bg-alt: #f3f4f5;
18+
--vp-c-bg-elv: #ffffff;
19+
20+
// Legacy background colors
921
--c-bg: #ffffff;
1022
--c-bg-light: #f3f4f5;
1123
--c-bg-lighter: #eeeeee;
@@ -15,15 +27,24 @@
1527
--c-bg-sidebar: var(--c-bg);
1628
--c-bg-arrow: #cccccc;
1729

18-
// text colors
30+
// text colors (VuePress 2.x naming)
31+
--vp-c-text: #2c3e50;
32+
--vp-c-text-mute: #4e6e8e;
33+
--vp-c-text-subtle: #6a8bad;
34+
35+
// Legacy text colors
1936
--c-text: #2c3e50;
2037
--c-text-accent: var(--c-brand);
2138
--c-text-light: #3a5169;
2239
--c-text-lighter: #4e6e8e;
2340
--c-text-lightest: #6a8bad;
2441
--c-text-quote: #999999;
2542

26-
// border colors
43+
// border colors (VuePress 2.x naming)
44+
--vp-c-border: #eaecef;
45+
--vp-c-divider: #dfe2e5;
46+
47+
// Legacy border colors
2748
--c-border: #eaecef;
2849
--c-border-dark: #dfe2e5;
2950

src/guide/api-documentation.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1+
# Open API
2+
3+
This page embeds the Open API Swagger spec.
4+
15
<swagger-component></swagger-component>

0 commit comments

Comments
 (0)