@md-plugins/md-plugin-link 0.1.0-beta.2 → 0.1.0-beta.21
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 +16 -7
- package/dist/index.mjs +1 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -16,6 +16,8 @@ Install the plugin via your preferred package manager:
|
|
|
16
16
|
```bash
|
|
17
17
|
# with pnpm:
|
|
18
18
|
pnpm add @md-plugins/md-plugin-link
|
|
19
|
+
# with bun:
|
|
20
|
+
bun add @md-plugins/md-plugin-link
|
|
19
21
|
# with Yarn:
|
|
20
22
|
yarn add @md-plugins/md-plugin-link
|
|
21
23
|
# with npm:
|
|
@@ -35,7 +37,7 @@ const md = new MarkdownIt();
|
|
|
35
37
|
md.use(linkPlugin, {
|
|
36
38
|
linkTag: 'MarkdownLink', // Custom link tag (e.g., Vue Router component)
|
|
37
39
|
linkToKeyword: 'to', // Attribute to use for internal links
|
|
38
|
-
pageScript: 'import MarkdownLink from "
|
|
40
|
+
pageScript: 'import MarkdownLink from "@/.q-press/components/MarkdownLink.vue";',
|
|
39
41
|
});
|
|
40
42
|
|
|
41
43
|
const markdownContent = `
|
|
@@ -64,18 +66,18 @@ For the example above, the plugin produces the following output:
|
|
|
64
66
|
Additionally, the `pageScripts` property in the `env` object will contain:
|
|
65
67
|
|
|
66
68
|
```js
|
|
67
|
-
Set(['import MarkdownLink from "
|
|
69
|
+
Set(['import MarkdownLink from "@/.q-press/components/MarkdownLink.vue";'])
|
|
68
70
|
```
|
|
69
71
|
|
|
70
72
|
## Options
|
|
71
73
|
|
|
72
74
|
The `md-plugin-link` plugin supports the following options:
|
|
73
75
|
|
|
74
|
-
| Option | Type | Default
|
|
75
|
-
| ------------- | ------ |
|
|
76
|
-
| linkTag | string | 'MarkdownLink'
|
|
77
|
-
| linkToKeyword | string | 'to'
|
|
78
|
-
| pageScript | string | 'import MarkdownLink from "
|
|
76
|
+
| Option | Type | Default | Description |
|
|
77
|
+
| ------------- | ------ | -------------------------------------------------------------------- | --------------------------------------------------------------- |
|
|
78
|
+
| linkTag | string | 'MarkdownLink' | Custom tag to use for internal links. |
|
|
79
|
+
| linkToKeyword | string | 'to' | Attribute to use for internal links (e.g., to for router-link). |
|
|
80
|
+
| pageScript | string | 'import MarkdownLink from "@/.q-press/components/MarkdownLink.vue";' | Import statement for required components. |
|
|
79
81
|
|
|
80
82
|
## Testing
|
|
81
83
|
|
|
@@ -89,6 +91,13 @@ pnpm test
|
|
|
89
91
|
|
|
90
92
|
In case this README falls out of date, please refer to the [documentation](https://md-plugins.netlify.app/md-plugins/link/overview) for the latest information.
|
|
91
93
|
|
|
94
|
+
## Support
|
|
95
|
+
|
|
96
|
+
If md-plugin-link is useful in your workflow and you want to support ongoing maintenance:
|
|
97
|
+
|
|
98
|
+
GitHub Sponsors: https://github.com/sponsors/hawkeye64
|
|
99
|
+
PayPal: https://paypal.me/hawkeye64
|
|
100
|
+
|
|
92
101
|
## License
|
|
93
102
|
|
|
94
103
|
This project is licensed under the MIT License. See the [LICENSE](LICENSE.md) file for details.
|
package/dist/index.mjs
CHANGED
|
@@ -8,7 +8,7 @@ function resolvePluginOptions(options, key, defaults) {
|
|
|
8
8
|
const DEFAULT_LINK_PLUGIN_OPTIONS = {
|
|
9
9
|
linkTag: "MarkdownLink",
|
|
10
10
|
linkToKeyword: "to",
|
|
11
|
-
pageScript: 'import MarkdownLink from "
|
|
11
|
+
pageScript: 'import MarkdownLink from "@/.q-press/components/MarkdownLink.vue"'
|
|
12
12
|
};
|
|
13
13
|
const linkPlugin = (md, options) => {
|
|
14
14
|
const {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@md-plugins/md-plugin-link",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.21",
|
|
4
4
|
"description": "A markdown-it plugin for handling links.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"markdown-it",
|
|
@@ -37,11 +37,11 @@
|
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@types/markdown-it": "^14.1.2",
|
|
40
|
-
"markdown-it": "^14.
|
|
41
|
-
"@md-plugins/shared": "0.1.0-beta.
|
|
40
|
+
"markdown-it": "^14.2.0",
|
|
41
|
+
"@md-plugins/shared": "0.1.0-beta.21"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
|
-
"markdown-it": "^14.
|
|
44
|
+
"markdown-it": "^14.2.0"
|
|
45
45
|
},
|
|
46
46
|
"scripts": {
|
|
47
47
|
"build": "unbuild",
|