vitepress-linkcard 1.2.0 → 1.2.2

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/dist/.cjs.min.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * vitepress-linkcard v1.2.0
2
+ * vitepress-linkcard v1.2.2
3
3
  * (c) 2022 - 2025 luckrya
4
4
  * Released under the MIT License.
5
5
  */
package/dist/.esm.min.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * vitepress-linkcard v1.2.0
2
+ * vitepress-linkcard v1.2.2
3
3
  * (c) 2022 - 2025 luckrya
4
4
  * Released under the MIT License.
5
5
  */
package/package.json CHANGED
@@ -60,6 +60,7 @@
60
60
  "publishConfig": {
61
61
  "registry": "https://registry.npmjs.org/"
62
62
  },
63
+ "readme": "./.github/README.md",
63
64
  "repository": {
64
65
  "type": "git",
65
66
  "url": "git+https://github.com/asumo-1xts/vitepress-linkcard.git"
@@ -75,5 +76,5 @@
75
76
  },
76
77
  "type": "module",
77
78
  "types": "./types/index.d.ts",
78
- "version": "1.2.0"
79
+ "version": "1.2.2"
79
80
  }
package/README.md DELETED
@@ -1,119 +0,0 @@
1
- <h1 align="center">
2
- vitepress-linkcard
3
- </h1>
4
-
5
- <div align="center">
6
-
7
- **A Vitepress plugin to generate a pretty linkcard with OGP.**
8
-
9
- Slightly more readable README created with this plugin is [here](https://asumoranda.com/posts/10-vitepress-linkcard.html).
10
-
11
- [![NPM Version](https://img.shields.io/npm/v/vitepress-linkcard?style=flat&logo=npm&logoColor=white&label=npmjs&color=%23CB3837)](https://www.npmjs.com/package/vitepress-linkcard)
12
- [![NPM bundle size](https://img.shields.io/bundlephobia/min/vitepress-linkcard)](https://www.npmjs.com/package/vitepress-linkcard)
13
- [![NPM License](https://img.shields.io/npm/l/vitepress-linkcard)](/LICENSE)
14
-
15
- [![VitePress](https://img.shields.io/badge/For_VitePress-v1.6.4-%235C73E7?logo=vitepress&logoColor=white)](https://vuejs.github.io/vitepress/v1/)
16
- [![Yarn](https://img.shields.io/badge/Built_with_Yarn-v4.9.2-%232C8EBB?logo=yarn&logoColor=white)](https://yarnpkg.com/)
17
- [![ESLint](https://img.shields.io/badge/Lint_with-ESLint-%234B32C3?style=flat&logo=eslint&logoColor=white&labelColor=gray)](https://github.com/asumo-1xts/vitepress-linkcard/actions/workflows/eslint.yml)
18
- [![Prettier](https://img.shields.io/badge/Format_with-Prettier-%23F7B93E?style=flat&logo=prettier&logoColor=white&labelColor=gray)](https://github.com/asumo-1xts/vitepress-linkcard/actions/workflows/prettier.yml)
19
-
20
- </div>
21
-
22
- <p align="center">
23
- <a href="https://github.com/asumo-1xts/vitepress-linkcard/blob/main/image/screen.webp?raw=true">
24
- <img src="https://github.com/asumo-1xts/vitepress-linkcard/blob/main/.config/screen.webp?raw=true" alt="How it shows"/>
25
- </a>
26
- </p>
27
-
28
- <div align="center">
29
-
30
- This plugin was forked from [markdown-it-link-to-card](https://github.com/luckrya/markdown-it-link-to-card).
31
-
32
- </div>
33
-
34
- ## Getting started
35
-
36
- ### Install
37
-
38
- ```shell
39
- npm i -D vitepress-linkcard # npm
40
- yarn add -D vitepress-linkcard # yarn
41
- pnpm add -D vitepress-linkcard # pnpm
42
- ```
43
-
44
- ### Usage
45
-
46
- #### `docs/.vitepress/config.ts`
47
-
48
- ```ts
49
- import { defineConfig } from "vitepress";
50
- import { linkToCardPlugin } from "vitepress-linkcard";
51
- import type { LinkToCardPluginOptions } from "vitepress-linkcard";
52
-
53
- export default defineConfig({
54
- // ...
55
- markdown: {
56
- config: (md) => {
57
- md.use<LinkToCardPluginOptions>(linkToCardPlugin, {
58
- // // Supported options:
59
- // target: "_self",
60
- // borderColor: "#039393",
61
- // bgColor: "#CB3837"
62
- });
63
- },
64
- }
65
- // ...
66
- });
67
- ```
68
-
69
- #### `*.md`
70
-
71
- Generates a linkcard when `@:` appended.
72
-
73
- ```md
74
- [example](@:https://example.com)
75
- ```
76
-
77
- ## Supported options
78
-
79
- ### borderColor
80
-
81
- Specifies the border color of linkcards with a color code. For exmaple:
82
-
83
- - `#7d7d7dff` (default)
84
- - `rgba(3, 147, 147, 0.39)`
85
- - ...
86
-
87
- ### bgColor
88
-
89
- Specifies the background color of linkcards with a color code. For exmaple:
90
-
91
- - `#7d7d7d00` (default)
92
- - `rgba(3, 147, 147, 0.39)`
93
- - ...
94
-
95
- ### target
96
-
97
- Specifies the target window in which to open a link.
98
-
99
- - `_blank` (default)
100
- - `_self`
101
- - `_top`
102
- - `_parent`
103
-
104
- ## Other specifications
105
-
106
- ### `.linkcard_cache.json`
107
-
108
- It is generated automatically in root dir and cache all the parsed metadata.
109
-
110
- You can move it to `.config` directory or edit it if needed.
111
-
112
- ### Special handling for `github.com`
113
-
114
- When the domain is `github.com`, trimming is performed as shown in the following example to avoid duplication of the title and description.
115
-
116
- | | Title | Description |
117
- | - | - | - |
118
- | 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. |
119
- | After | asumo-1xts/vitepress-linkcard | A VitePress plugin to generate a pretty linkcard. |