vitepress-linkcard 2.0.1 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -14
- package/package.json +47 -54
package/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
<h1 align="center">
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
vitepress-linkcard [](/LICENSE)
|
|
4
|
+
|
|
3
5
|
</h1>
|
|
4
6
|
|
|
5
7
|
<div align="center">
|
|
@@ -11,11 +13,9 @@ You can see: [A blog generated with this plugin](https://asumoranda.com/posts/10
|
|
|
11
13
|
[](https://www.npmjs.com/package/vitepress-linkcard)
|
|
12
14
|
[](https://www.npmjs.com/package/vitepress-linkcard)
|
|
13
15
|
[](https://vuejs.github.io/vitepress/v1]/)
|
|
14
|
-
[](/LICENSE)
|
|
15
16
|
|
|
16
17
|
[](https://yarnpkg.com/)
|
|
17
|
-
[](https://github.com/asumo-1xts/vitepress-linkcard/actions/workflows/prettier.yml)
|
|
18
|
+
[](https://oxc.rs/)
|
|
19
19
|
|
|
20
20
|
<img src="https://github.com/asumo-1xts/vitepress-linkcard/blob/main/.github/screen.gif?raw=true" width=90% alt="How it shows" />
|
|
21
21
|
|
|
@@ -38,9 +38,9 @@ pnpm add -D vitepress-linkcard # pnpm
|
|
|
38
38
|
#### `docs/.vitepress/config.ts`
|
|
39
39
|
|
|
40
40
|
```ts
|
|
41
|
-
import { defineConfig } from
|
|
42
|
-
import { linkToCardPlugin } from
|
|
43
|
-
import type { LinkToCardPluginOptions } from
|
|
41
|
+
import { defineConfig } from 'vitepress'
|
|
42
|
+
import { linkToCardPlugin } from 'vitepress-linkcard'
|
|
43
|
+
import type { LinkToCardPluginOptions } from 'vitepress-linkcard'
|
|
44
44
|
|
|
45
45
|
export default defineConfig({
|
|
46
46
|
// ...
|
|
@@ -48,11 +48,11 @@ export default defineConfig({
|
|
|
48
48
|
config: (md) => {
|
|
49
49
|
md.use<LinkToCardPluginOptions>(linkToCardPlugin, {
|
|
50
50
|
// target: "_self" // if needed
|
|
51
|
-
})
|
|
52
|
-
}
|
|
51
|
+
})
|
|
52
|
+
}
|
|
53
53
|
}
|
|
54
54
|
// ...
|
|
55
|
-
})
|
|
55
|
+
})
|
|
56
56
|
```
|
|
57
57
|
|
|
58
58
|
#### `*.md`
|
|
@@ -103,7 +103,7 @@ You can customize:
|
|
|
103
103
|
|
|
104
104
|
#### `docs/.vitepress/theme/index.ts`
|
|
105
105
|
|
|
106
|
-
```
|
|
106
|
+
```ts
|
|
107
107
|
import DefaultTheme from 'vitepress/theme-without-fonts'
|
|
108
108
|
import type { Theme as ThemeConfig } from 'vitepress'
|
|
109
109
|
import './custom.css'
|
|
@@ -129,7 +129,7 @@ You can move it to `.config` directory or edit it if needed.
|
|
|
129
129
|
|
|
130
130
|
When the domain is `github.com`, trimming is performed as shown in the following example to avoid duplication of the title and description.
|
|
131
131
|
|
|
132
|
-
|
|
|
133
|
-
|
|
|
132
|
+
| | Title | Description |
|
|
133
|
+
| ------ | ----------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
134
134
|
| Before | GitHub - asumo-1xts/vitepress-linkcard: A VitePress plugin to generate a pretty linkcard. | A VitePress plugin to generate a pretty linkcard. Contribute to asumo-1xts/vitepress-linkcard development by creating an account on GitHub. |
|
|
135
|
-
| After
|
|
135
|
+
| After | asumo-1xts/vitepress-linkcard | A VitePress plugin to generate a pretty linkcard. |
|
package/package.json
CHANGED
|
@@ -1,20 +1,49 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
"
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
"name": "vitepress-linkcard",
|
|
3
|
+
"version": "2.1.0",
|
|
4
|
+
"description": "A Vitepress plugin to generate a pretty linkcard with OGP.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"linkcard",
|
|
7
|
+
"markdown-it",
|
|
8
|
+
"ogp",
|
|
9
|
+
"thumbnail",
|
|
10
|
+
"vitepress",
|
|
11
|
+
"vitepress-plugin"
|
|
12
|
+
],
|
|
9
13
|
"bugs": {
|
|
10
14
|
"url": "https://github.com/asumo-1xts/vitepress-linkcard"
|
|
11
15
|
},
|
|
12
|
-
"
|
|
16
|
+
"license": "MIT",
|
|
17
|
+
"author": "aSumo",
|
|
18
|
+
"repository": {
|
|
19
|
+
"type": "git",
|
|
20
|
+
"url": "git+https://github.com/asumo-1xts/vitepress-linkcard.git"
|
|
21
|
+
},
|
|
22
|
+
"files": [
|
|
23
|
+
"dist",
|
|
24
|
+
"types"
|
|
25
|
+
],
|
|
26
|
+
"type": "module",
|
|
27
|
+
"main": "./dist/.esm.min.js",
|
|
28
|
+
"module": "./dist/.esm.min.js",
|
|
29
|
+
"types": "./types/index.d.ts",
|
|
30
|
+
"publishConfig": {
|
|
31
|
+
"registry": "https://registry.npmjs.org/"
|
|
32
|
+
},
|
|
33
|
+
"scripts": {
|
|
34
|
+
"build": "tsc && rollup -c",
|
|
35
|
+
"clean": "rm -rf dist types",
|
|
36
|
+
"dev": "rollup -c -w",
|
|
37
|
+
"docs": "typedoc",
|
|
38
|
+
"format": "oxfmt --write",
|
|
39
|
+
"lint": "oxlint",
|
|
40
|
+
"lint:github": "oxlint --format=github",
|
|
41
|
+
"type:dts": "tsc --emitDeclarationOnly"
|
|
42
|
+
},
|
|
13
43
|
"devDependencies": {
|
|
14
44
|
"@babel/core": "^7.28.5",
|
|
15
45
|
"@babel/preset-env": "^7.28.5",
|
|
16
46
|
"@babel/preset-typescript": "^7.28.5",
|
|
17
|
-
"@eslint/js": "^9.39.2",
|
|
18
47
|
"@luckrya/utility": "^0.1.1",
|
|
19
48
|
"@rollup/plugin-babel": "^6.1.0",
|
|
20
49
|
"@rollup/plugin-commonjs": "^29.0.0",
|
|
@@ -22,58 +51,22 @@
|
|
|
22
51
|
"@types/babel__core": "^7",
|
|
23
52
|
"@types/markdown-it": "^13.0.2",
|
|
24
53
|
"@types/node": "^25.0.3",
|
|
25
|
-
"eslint": "^9.39.2",
|
|
26
|
-
"eslint-plugin-vue": "^10.6.2",
|
|
27
54
|
"globals": "^16.5.0",
|
|
28
|
-
"jiti": "^2.6.1",
|
|
29
55
|
"markdown-it": "^13.0.2",
|
|
30
|
-
"
|
|
31
|
-
"
|
|
56
|
+
"oxfmt": "^0.26.0",
|
|
57
|
+
"oxlint": "^1.41.0",
|
|
32
58
|
"rollup": "^2.79.2",
|
|
33
59
|
"rollup-plugin-terser": "^7.0.2",
|
|
34
60
|
"typedoc": "^0.28.15",
|
|
35
61
|
"typedoc-theme-hierarchy": "^6.0.0",
|
|
36
62
|
"typescript": "^5.9.3",
|
|
37
|
-
"typescript-eslint": "^8.50.1",
|
|
38
|
-
"vue-eslint-parser": "^10.2.0",
|
|
39
63
|
"xmlhttprequest": "^1.8.0"
|
|
40
64
|
},
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
"thumbnail",
|
|
47
|
-
"typescript",
|
|
48
|
-
"markdown-it",
|
|
49
|
-
"metadata",
|
|
50
|
-
"ogp",
|
|
51
|
-
"linkcard",
|
|
52
|
-
"vite",
|
|
53
|
-
"vitepress"
|
|
54
|
-
],
|
|
55
|
-
"license": "MIT",
|
|
56
|
-
"main": "./dist/.esm.min.js",
|
|
57
|
-
"module": "./dist/.esm.min.js",
|
|
58
|
-
"name": "vitepress-linkcard",
|
|
59
|
-
"packageManager": "yarn@4.9.2",
|
|
60
|
-
"publishConfig": {
|
|
61
|
-
"registry": "https://registry.npmjs.org/"
|
|
62
|
-
},
|
|
63
|
-
"repository": {
|
|
64
|
-
"type": "git",
|
|
65
|
-
"url": "git+https://github.com/asumo-1xts/vitepress-linkcard.git"
|
|
66
|
-
},
|
|
67
|
-
"scripts": {
|
|
68
|
-
"build": "tsc && rollup -c",
|
|
69
|
-
"clean": "rm -rf dist types",
|
|
70
|
-
"dev": "rollup -c -w",
|
|
71
|
-
"docs": "yarn typedoc",
|
|
72
|
-
"format": "yarn prettier --config .vscode/.prettierrc.json --write .config/*.json .github/workflows .vscode src *.json && rm -rf node_modules",
|
|
73
|
-
"lint": "yarn eslint --config .vscode/eslint.config.ts src/**/*",
|
|
74
|
-
"type:dts": "tsc --emitDeclarationOnly"
|
|
65
|
+
"babel": {
|
|
66
|
+
"presets": [
|
|
67
|
+
"@babel/env",
|
|
68
|
+
"@babel/typescript"
|
|
69
|
+
]
|
|
75
70
|
},
|
|
76
|
-
"
|
|
77
|
-
|
|
78
|
-
"version": "2.0.1"
|
|
79
|
-
}
|
|
71
|
+
"packageManager": "yarn@4.9.2"
|
|
72
|
+
}
|