@md-plugins/quasar-app-extension-q-press 0.1.0-alpha.10
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/LICENSE.md +21 -0
- package/README.md +230 -0
- package/old/prompts.js +44 -0
- package/old/uninstall.js +9 -0
- package/package.json +60 -0
- package/scripts/build.js +33 -0
- package/src/index.js +63 -0
- package/src/install.js +49 -0
- package/src/templates/.gitkeep +0 -0
- package/src/templates/init/src/_q-press/.gitkeep +0 -0
- package/src/templates/init/src/_q-press/api/components/DarkModeToggle.json +37 -0
- package/src/templates/init/src/_q-press/api/components/MarkdownApi.json +67 -0
- package/src/templates/init/src/_q-press/api/components/MarkdownApiEntry.json +76 -0
- package/src/templates/init/src/_q-press/api/components/MarkdownCardLink.json +28 -0
- package/src/templates/init/src/_q-press/api/components/MarkdownCardTitle.json +48 -0
- package/src/templates/init/src/_q-press/api/components/MarkdownCode.json +37 -0
- package/src/templates/init/src/_q-press/api/components/MarkdownCodePrism.json +29 -0
- package/src/templates/init/src/_q-press/api/components/MarkdownCodepen.json +21 -0
- package/src/templates/init/src/_q-press/api/components/MarkdownCopyButton.json +36 -0
- package/src/templates/init/src/_q-press/api/components/MarkdownDrawerSidebar.json +17 -0
- package/src/templates/init/src/_q-press/api/components/MarkdownDrawerToc.json +17 -0
- package/src/templates/init/src/_q-press/api/components/MarkdownExample.json +22 -0
- package/src/templates/init/src/_q-press/api/components/MarkdownHeader.json +28 -0
- package/src/templates/init/src/_q-press/api/components/MarkdownHeaderIconLinks.json +16 -0
- package/src/templates/init/src/_q-press/api/components/MarkdownHeaderMenu.json +77 -0
- package/src/templates/init/src/_q-press/api/components/MarkdownHeaderTextLinks.json +33 -0
- package/src/templates/init/src/_q-press/api/components/MarkdownInstallation.json +33 -0
- package/src/templates/init/src/_q-press/api/components/MarkdownLayout.json +52 -0
- package/src/templates/init/src/_q-press/api/components/MarkdownLink.json +23 -0
- package/src/templates/init/src/_q-press/api/components/MarkdownPage.json +71 -0
- package/src/templates/init/src/_q-press/api/components/MarkdownPageFooter.json +21 -0
- package/src/templates/init/src/_q-press/api/components/MarkdownPageSidebar.json +56 -0
- package/src/templates/init/src/_q-press/api/components/MarkdownPageToc.json +17 -0
- package/src/templates/init/src/_q-press/api/components/MarkdownPrerender.json +25 -0
- package/src/templates/init/src/_q-press/api/components/MarkdownTree.json +27 -0
- package/src/templates/init/src/_q-press/api/composables/dark.json +29 -0
- package/src/templates/init/src/_q-press/api/composables/scroll.json +34 -0
- package/src/templates/init/src/_q-press/assets/get-meta.ts +29 -0
- package/src/templates/init/src/_q-press/components/DarkModeToggle.vue +105 -0
- package/src/templates/init/src/_q-press/components/MarkdownApi.vue +588 -0
- package/src/templates/init/src/_q-press/components/MarkdownApiEntry.ts +594 -0
- package/src/templates/init/src/_q-press/components/MarkdownCardLink.vue +25 -0
- package/src/templates/init/src/_q-press/components/MarkdownCardTitle.vue +21 -0
- package/src/templates/init/src/_q-press/components/MarkdownCode.vue +25 -0
- package/src/templates/init/src/_q-press/components/MarkdownCodePrism.ts +36 -0
- package/src/templates/init/src/_q-press/components/MarkdownCodepen.vue +183 -0
- package/src/templates/init/src/_q-press/components/MarkdownCopyButton.vue +104 -0
- package/src/templates/init/src/_q-press/components/MarkdownExample.vue +221 -0
- package/src/templates/init/src/_q-press/components/MarkdownInstallation.vue +166 -0
- package/src/templates/init/src/_q-press/components/MarkdownLink.vue +38 -0
- package/src/templates/init/src/_q-press/components/MarkdownPrerender.ts +82 -0
- package/src/templates/init/src/_q-press/components/MarkdownTree.vue +105 -0
- package/src/templates/init/src/_q-press/components/markdown-utils.ts +105 -0
- package/src/templates/init/src/_q-press/composables/dark.ts +39 -0
- package/src/templates/init/src/_q-press/composables/scroll.ts +115 -0
- package/src/templates/init/src/_q-press/css/app.scss +662 -0
- package/src/templates/init/src/_q-press/css/fonts.scss +100 -0
- package/src/templates/init/src/_q-press/css/prism-theme.scss +298 -0
- package/src/templates/init/src/_q-press/css/themes/default.scss +68 -0
- package/src/templates/init/src/_q-press/css/themes/newspaper.scss +69 -0
- package/src/templates/init/src/_q-press/css/themes/sunrise.scss +67 -0
- package/src/templates/init/src/_q-press/css/themes/tawny.scss +69 -0
- package/src/templates/init/src/_q-press/layouts/MarkdownDrawerSidebar.vue +32 -0
- package/src/templates/init/src/_q-press/layouts/MarkdownDrawerToc.vue +37 -0
- package/src/templates/init/src/_q-press/layouts/MarkdownHeader.vue +412 -0
- package/src/templates/init/src/_q-press/layouts/MarkdownHeaderIconLinks.vue +31 -0
- package/src/templates/init/src/_q-press/layouts/MarkdownHeaderMenu.ts +93 -0
- package/src/templates/init/src/_q-press/layouts/MarkdownHeaderTextLinks.vue +37 -0
- package/src/templates/init/src/_q-press/layouts/MarkdownLayout.vue +239 -0
- package/src/templates/init/src/_q-press/layouts/MarkdownPage.vue +307 -0
- package/src/templates/init/src/_q-press/layouts/MarkdownPageFooter.vue +187 -0
- package/src/templates/init/src/_q-press/layouts/MarkdownPageSidebar.scss +54 -0
- package/src/templates/init/src/_q-press/layouts/MarkdownPageSidebar.ts +218 -0
- package/src/templates/init/src/_q-press/layouts/MarkdownPageToc.vue +23 -0
- package/src/templates/init/src/_q-press/layouts/MarkdownSearch.vue +449 -0
- package/src/templates/init/src/_q-press/stores/markdown.ts +101 -0
- package/src/templates/init/src/components/LandingPage/LandingPage.vue +341 -0
- package/src/templates/init/src/components/Releases/PackageReleases.vue +164 -0
- package/src/templates/init/src/components/Releases/PublicReleases.vue +149 -0
- package/src/templates/init/src/components/Releases/ReleasesAvailable.vue +74 -0
- package/src/templates/init/src/examples/QAvatar/BasicExample.vue +11 -0
- package/src/templates/init/src/markdown/__elements.md +548 -0
- package/src/templates/init/src/markdown/__elements2.md +347 -0
- package/src/templates/init/src/markdown/faq/best-practices.md +0 -0
- package/src/templates/init/src/markdown/faq/general.md +0 -0
- package/src/templates/init/src/markdown/faq/troubleshooting.md +0 -0
- package/src/templates/init/src/markdown/getting-started/introduction.md +67 -0
- package/src/templates/init/src/markdown/guides/contributing.md +101 -0
- package/src/templates/init/src/markdown/guides/faq.md +115 -0
- package/src/templates/init/src/markdown/guides/release-notes.md +0 -0
- package/src/templates/init/src/markdown/guides/style-guide.md +0 -0
- package/src/templates/init/src/markdown/landing-page.md +11 -0
- package/src/templates/init/src/markdown/listing.ts +3 -0
- package/src/templates/init/src/markdown/md-plugins/blockquote/advanced.md +83 -0
- package/src/templates/init/src/markdown/md-plugins/blockquote/overview.md +183 -0
- package/src/templates/init/src/markdown/md-plugins/codeblocks/advanced.md +210 -0
- package/src/templates/init/src/markdown/md-plugins/codeblocks/overview.md +616 -0
- package/src/templates/init/src/markdown/md-plugins/containers/advanced.md +301 -0
- package/src/templates/init/src/markdown/md-plugins/containers/overview.md +206 -0
- package/src/templates/init/src/markdown/md-plugins/frontmatter/advanced.md +164 -0
- package/src/templates/init/src/markdown/md-plugins/frontmatter/overview.md +131 -0
- package/src/templates/init/src/markdown/md-plugins/headers/advanced.md +236 -0
- package/src/templates/init/src/markdown/md-plugins/headers/overview.md +134 -0
- package/src/templates/init/src/markdown/md-plugins/image/advanced.md +114 -0
- package/src/templates/init/src/markdown/md-plugins/image/overview.md +124 -0
- package/src/templates/init/src/markdown/md-plugins/imports/advanced.md +105 -0
- package/src/templates/init/src/markdown/md-plugins/imports/overview.md +80 -0
- package/src/templates/init/src/markdown/md-plugins/inline-code/advanced.md +133 -0
- package/src/templates/init/src/markdown/md-plugins/inline-code/overview.md +101 -0
- package/src/templates/init/src/markdown/md-plugins/link/advanced.md +157 -0
- package/src/templates/init/src/markdown/md-plugins/link/overview.md +126 -0
- package/src/templates/init/src/markdown/md-plugins/shared/overview.md +175 -0
- package/src/templates/init/src/markdown/md-plugins/table/advanced.md +190 -0
- package/src/templates/init/src/markdown/md-plugins/table/overview.md +186 -0
- package/src/templates/init/src/markdown/md-plugins/title/advanced.md +88 -0
- package/src/templates/init/src/markdown/md-plugins/title/overview.md +99 -0
- package/src/templates/init/src/markdown/other/release-notes.md +12 -0
- package/src/templates/init/src/markdown/privacy-policy.md +12 -0
- package/src/templates/init/src/markdown/quasar-app-extensions/qpress/advanced.md +101 -0
- package/src/templates/init/src/markdown/quasar-app-extensions/qpress/components.md +69 -0
- package/src/templates/init/src/markdown/quasar-app-extensions/qpress/overview.md +254 -0
- package/src/templates/init/src/markdown/quasar-app-extensions/qpress/themes.md +4 -0
- package/src/templates/init/src/markdown/quasar-app-extensions/vitemdpluginappext/advanced.md +4 -0
- package/src/templates/init/src/markdown/quasar-app-extensions/vitemdpluginappext/overview.md +103 -0
- package/src/templates/init/src/markdown/vite-plugins/index.md +6 -0
- package/src/templates/init/src/markdown/vite-plugins/viteexamplesplugin/advanced.md +138 -0
- package/src/templates/init/src/markdown/vite-plugins/viteexamplesplugin/overview.md +88 -0
- package/src/templates/init/src/markdown/vite-plugins/vitemdplugin/advanced.md +226 -0
- package/src/templates/init/src/markdown/vite-plugins/vitemdplugin/index.md +6 -0
- package/src/templates/init/src/markdown/vite-plugins/vitemdplugin/overview.md +166 -0
- package/src/templates/init/src/q-press.globals.d.ts +36 -0
- package/src/templates/init/src/siteConfig/index.ts +440 -0
- package/src/templates/update/src/_q-press/.gitkeep +0 -0
- package/src/templates/update/src/_q-press/api/components/DarkModeToggle.json +37 -0
- package/src/templates/update/src/_q-press/api/components/MarkdownApi.json +67 -0
- package/src/templates/update/src/_q-press/api/components/MarkdownApiEntry.json +76 -0
- package/src/templates/update/src/_q-press/api/components/MarkdownCardLink.json +28 -0
- package/src/templates/update/src/_q-press/api/components/MarkdownCardTitle.json +48 -0
- package/src/templates/update/src/_q-press/api/components/MarkdownCode.json +37 -0
- package/src/templates/update/src/_q-press/api/components/MarkdownCodePrism.json +29 -0
- package/src/templates/update/src/_q-press/api/components/MarkdownCodepen.json +21 -0
- package/src/templates/update/src/_q-press/api/components/MarkdownCopyButton.json +36 -0
- package/src/templates/update/src/_q-press/api/components/MarkdownDrawerSidebar.json +17 -0
- package/src/templates/update/src/_q-press/api/components/MarkdownDrawerToc.json +17 -0
- package/src/templates/update/src/_q-press/api/components/MarkdownExample.json +22 -0
- package/src/templates/update/src/_q-press/api/components/MarkdownHeader.json +28 -0
- package/src/templates/update/src/_q-press/api/components/MarkdownHeaderIconLinks.json +16 -0
- package/src/templates/update/src/_q-press/api/components/MarkdownHeaderMenu.json +77 -0
- package/src/templates/update/src/_q-press/api/components/MarkdownHeaderTextLinks.json +33 -0
- package/src/templates/update/src/_q-press/api/components/MarkdownInstallation.json +33 -0
- package/src/templates/update/src/_q-press/api/components/MarkdownLayout.json +52 -0
- package/src/templates/update/src/_q-press/api/components/MarkdownLink.json +23 -0
- package/src/templates/update/src/_q-press/api/components/MarkdownPage.json +71 -0
- package/src/templates/update/src/_q-press/api/components/MarkdownPageFooter.json +21 -0
- package/src/templates/update/src/_q-press/api/components/MarkdownPageSidebar.json +56 -0
- package/src/templates/update/src/_q-press/api/components/MarkdownPageToc.json +17 -0
- package/src/templates/update/src/_q-press/api/components/MarkdownPrerender.json +25 -0
- package/src/templates/update/src/_q-press/api/components/MarkdownTree.json +27 -0
- package/src/templates/update/src/_q-press/api/composables/dark.json +29 -0
- package/src/templates/update/src/_q-press/api/composables/scroll.json +34 -0
- package/src/templates/update/src/_q-press/assets/get-meta.ts +29 -0
- package/src/templates/update/src/_q-press/components/DarkModeToggle.vue +105 -0
- package/src/templates/update/src/_q-press/components/MarkdownApi.vue +588 -0
- package/src/templates/update/src/_q-press/components/MarkdownApiEntry.ts +594 -0
- package/src/templates/update/src/_q-press/components/MarkdownCardLink.vue +25 -0
- package/src/templates/update/src/_q-press/components/MarkdownCardTitle.vue +21 -0
- package/src/templates/update/src/_q-press/components/MarkdownCode.vue +25 -0
- package/src/templates/update/src/_q-press/components/MarkdownCodePrism.ts +36 -0
- package/src/templates/update/src/_q-press/components/MarkdownCodepen.vue +183 -0
- package/src/templates/update/src/_q-press/components/MarkdownCopyButton.vue +104 -0
- package/src/templates/update/src/_q-press/components/MarkdownExample.vue +221 -0
- package/src/templates/update/src/_q-press/components/MarkdownInstallation.vue +166 -0
- package/src/templates/update/src/_q-press/components/MarkdownLink.vue +38 -0
- package/src/templates/update/src/_q-press/components/MarkdownPrerender.ts +82 -0
- package/src/templates/update/src/_q-press/components/MarkdownTree.vue +105 -0
- package/src/templates/update/src/_q-press/components/markdown-utils.ts +105 -0
- package/src/templates/update/src/_q-press/composables/dark.ts +39 -0
- package/src/templates/update/src/_q-press/composables/scroll.ts +115 -0
- package/src/templates/update/src/_q-press/css/app.scss +662 -0
- package/src/templates/update/src/_q-press/css/fonts.scss +100 -0
- package/src/templates/update/src/_q-press/css/prism-theme.scss +298 -0
- package/src/templates/update/src/_q-press/css/themes/default.scss +68 -0
- package/src/templates/update/src/_q-press/css/themes/newspaper.scss +69 -0
- package/src/templates/update/src/_q-press/css/themes/sunrise.scss +67 -0
- package/src/templates/update/src/_q-press/css/themes/tawny.scss +69 -0
- package/src/templates/update/src/_q-press/layouts/MarkdownDrawerSidebar.vue +32 -0
- package/src/templates/update/src/_q-press/layouts/MarkdownDrawerToc.vue +37 -0
- package/src/templates/update/src/_q-press/layouts/MarkdownHeader.vue +412 -0
- package/src/templates/update/src/_q-press/layouts/MarkdownHeaderIconLinks.vue +31 -0
- package/src/templates/update/src/_q-press/layouts/MarkdownHeaderMenu.ts +93 -0
- package/src/templates/update/src/_q-press/layouts/MarkdownHeaderTextLinks.vue +37 -0
- package/src/templates/update/src/_q-press/layouts/MarkdownLayout.vue +239 -0
- package/src/templates/update/src/_q-press/layouts/MarkdownPage.vue +307 -0
- package/src/templates/update/src/_q-press/layouts/MarkdownPageFooter.vue +187 -0
- package/src/templates/update/src/_q-press/layouts/MarkdownPageSidebar.scss +54 -0
- package/src/templates/update/src/_q-press/layouts/MarkdownPageSidebar.ts +218 -0
- package/src/templates/update/src/_q-press/layouts/MarkdownPageToc.vue +23 -0
- package/src/templates/update/src/_q-press/layouts/MarkdownSearch.vue +449 -0
- package/src/templates/update/src/_q-press/stores/markdown.ts +101 -0
- package/src/templates/update/src/q-press.globals.d.ts +36 -0
|
@@ -0,0 +1,347 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Design Elements
|
|
3
|
+
desc: The elements for markdown design.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Lorem ipsum dolor sit amet, **consectetur adipiscing** elit, sed do _eiusmod_ tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu `fugiat nulla` pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa [qui officia](/vue-components/badge) deserunt mollit anim id est laborum.
|
|
7
|
+
|
|
8
|
+
## Heading H2
|
|
9
|
+
|
|
10
|
+
Lorem ipsum dolor sit amet, **consectetur adipiscing** elit, sed do _eiusmod_ tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu `fugiat nulla` pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa [qui officia](/vue-components/badge) deserunt mollit anim id est laborum.
|
|
11
|
+
|
|
12
|
+
### Heading H3
|
|
13
|
+
|
|
14
|
+
Lorem ipsum dolor sit amet, **consectetur adipiscing** elit, sed do _eiusmod_ tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu `fugiat nulla` pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa [qui officia](/vue-components/badge) deserunt mollit anim id est laborum.
|
|
15
|
+
|
|
16
|
+
#### Heading H4
|
|
17
|
+
|
|
18
|
+
Lorem ipsum dolor sit amet, **consectetur adipiscing** elit, sed do _eiusmod_ tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu `fugiat nulla` pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa [qui officia](/vue-components/badge) deserunt mollit anim id est laborum.
|
|
19
|
+
|
|
20
|
+
##### Heading H5
|
|
21
|
+
|
|
22
|
+
Lorem ipsum dolor sit amet, **consectetur adipiscing** elit, sed do _eiusmod_ tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu `fugiat nulla` pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa [qui officia](/vue-components/badge) deserunt mollit anim id est laborum.
|
|
23
|
+
|
|
24
|
+
###### Heading H6
|
|
25
|
+
|
|
26
|
+
Lorem ipsum dolor sit amet, **consectetur adipiscing** elit, sed do _eiusmod_ tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu `fugiat nulla` pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa [qui officia](/vue-components/badge) deserunt mollit anim id est laborum.
|
|
27
|
+
|
|
28
|
+
### Heading with badge <q-badge label="badge" />
|
|
29
|
+
|
|
30
|
+
Lorem ipsum dolor sit amet, **consectetur adipiscing** elit, sed do _eiusmod_ tempor incididunt ut labore et dolore magna aliqua.
|
|
31
|
+
|
|
32
|
+
## Containers
|
|
33
|
+
|
|
34
|
+
> Block container
|
|
35
|
+
> <br><br>
|
|
36
|
+
>
|
|
37
|
+
> This Website collects some `Personal Data` from its Users.
|
|
38
|
+
|
|
39
|
+
::: tip Tip container title
|
|
40
|
+
This Website collects some `Personal Data` from its Users.
|
|
41
|
+
:::
|
|
42
|
+
|
|
43
|
+
::: warning Warning container title
|
|
44
|
+
This Website collects some `Personal Data` from its Users.
|
|
45
|
+
:::
|
|
46
|
+
|
|
47
|
+
::: danger Danger container title
|
|
48
|
+
This Website collects some `Personal Data` from its Users.
|
|
49
|
+
:::
|
|
50
|
+
|
|
51
|
+
::: details Details container title
|
|
52
|
+
This Website collects some `Personal Data` from its Users.
|
|
53
|
+
:::
|
|
54
|
+
|
|
55
|
+
## Keyboard tokens
|
|
56
|
+
|
|
57
|
+
- macOS: <kbd>Cmd</kbd> <kbd>Alt</kbd> <kbd>I</kbd> or <kbd>F12</kbd>
|
|
58
|
+
- Linux: <kbd>Ctrl</kbd> <kbd>Shift</kbd> <kbd>I</kbd> or <kbd>F12</kbd>
|
|
59
|
+
- Windows: <kbd>Ctrl</kbd> <kbd>Shift</kbd> <kbd>I</kbd> or <kbd>F12</kbd>
|
|
60
|
+
|
|
61
|
+
## Code containers
|
|
62
|
+
|
|
63
|
+
### Plain (internal highlight on `prod:`)
|
|
64
|
+
|
|
65
|
+
```js
|
|
66
|
+
export default function (ctx) { // can be async too
|
|
67
|
+
console.log(ctx)
|
|
68
|
+
|
|
69
|
+
// Example output on console:
|
|
70
|
+
{
|
|
71
|
+
dev: true,
|
|
72
|
+
prod: false [[! highlight]]
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
const { FOO } = process.env // ❌ It doesn't allow destructuring or similar
|
|
76
|
+
process.env.FOO // ✅ It can only replace direct usage like this
|
|
77
|
+
|
|
78
|
+
// context gets generated based on the parameters
|
|
79
|
+
// with which you run "quasar dev" or "quasar build"
|
|
80
|
+
}
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### Highlight [2,5]
|
|
84
|
+
|
|
85
|
+
```js [highlight=2,5]
|
|
86
|
+
export default function (ctx) { // can be async too
|
|
87
|
+
console.log(ctx)
|
|
88
|
+
|
|
89
|
+
// Example output on console:
|
|
90
|
+
{
|
|
91
|
+
dev: true,
|
|
92
|
+
prod: false
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
const { FOO } = process.env // ❌ It doesn't allow destructuring or similar
|
|
96
|
+
process.env.FOO // ✅ It can only replace direct usage like this
|
|
97
|
+
|
|
98
|
+
// context gets generated based on the parameters
|
|
99
|
+
// with which you run "quasar dev" or "quasar build"
|
|
100
|
+
}
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### Highlight [2,5,9,10] add [3,6-7] rem [15] with numbered lines
|
|
104
|
+
|
|
105
|
+
```js [highlight=2,5,9,10 numbered add=3,6-7 rem=15]
|
|
106
|
+
export default function (ctx) { // can be async too
|
|
107
|
+
console.log(ctx)
|
|
108
|
+
|
|
109
|
+
// Example output on console:
|
|
110
|
+
{
|
|
111
|
+
dev: true,
|
|
112
|
+
prod: false
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
const { FOO } = process.env // ❌ It doesn't allow destructuring or similar
|
|
116
|
+
process.env.FOO // ✅ It can only replace direct usage like this
|
|
117
|
+
|
|
118
|
+
// context gets generated based on the parameters
|
|
119
|
+
// with which you run "quasar dev" or "quasar build"
|
|
120
|
+
// Additionally, ...
|
|
121
|
+
}
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
### Titled code
|
|
125
|
+
|
|
126
|
+
```js Titled code
|
|
127
|
+
export default function (ctx) { // can be async too
|
|
128
|
+
console.log(ctx)
|
|
129
|
+
|
|
130
|
+
// Example output on console:
|
|
131
|
+
{
|
|
132
|
+
dev: true,
|
|
133
|
+
prod: false
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
const { FOO } = process.env // ❌ It doesn't allow destructuring or similar
|
|
137
|
+
process.env.FOO // ✅ It can only replace direct usage like this
|
|
138
|
+
|
|
139
|
+
// context gets generated based on the parameters
|
|
140
|
+
// with which you run "quasar dev" or "quasar build"
|
|
141
|
+
}
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
### bash
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
sudo apt update
|
|
148
|
+
sudo apt upgrade
|
|
149
|
+
sudo apt autoremove
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
### bash numbered
|
|
153
|
+
|
|
154
|
+
```bash [numbered]
|
|
155
|
+
sudo apt update
|
|
156
|
+
sudo apt upgrade
|
|
157
|
+
sudo apt autoremove
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
### CSS
|
|
161
|
+
|
|
162
|
+
```css
|
|
163
|
+
.my-class {
|
|
164
|
+
color: red;
|
|
165
|
+
background-color: blue;
|
|
166
|
+
}
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
### CSS numbered
|
|
170
|
+
|
|
171
|
+
```css [numbered]
|
|
172
|
+
.my-class {
|
|
173
|
+
color: red;
|
|
174
|
+
background-color: blue;
|
|
175
|
+
}
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
### JSON
|
|
179
|
+
|
|
180
|
+
```json
|
|
181
|
+
{
|
|
182
|
+
"min": 0,
|
|
183
|
+
"super": false,
|
|
184
|
+
"max": 100
|
|
185
|
+
}
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
### JSON (internal rem/add)
|
|
189
|
+
|
|
190
|
+
```json [rem=1]
|
|
191
|
+
{
|
|
192
|
+
"min": 0,
|
|
193
|
+
"super": false, [[! rem]]
|
|
194
|
+
"super": true, [[! add]]
|
|
195
|
+
"max": 100
|
|
196
|
+
}
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
### JSON (internal rem/add and numbered)
|
|
200
|
+
|
|
201
|
+
```json [numbered]
|
|
202
|
+
{
|
|
203
|
+
"min": 0,
|
|
204
|
+
"super": false, [[! rem]]
|
|
205
|
+
"super": true, [[! add]]
|
|
206
|
+
"max": 100
|
|
207
|
+
}
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
### JSON (numbered/highlight)
|
|
211
|
+
|
|
212
|
+
```json [numbered]
|
|
213
|
+
{
|
|
214
|
+
"min": 0,
|
|
215
|
+
"super": false, [[! highlight]]
|
|
216
|
+
"max": 100
|
|
217
|
+
}
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
### diff
|
|
221
|
+
|
|
222
|
+
```diff
|
|
223
|
+
@@ -13,6 +13,8 @@ const langList = [
|
|
224
|
+
{ name: 'xml' },
|
|
225
|
+
{ name: 'nginx' },
|
|
226
|
+
{ name: 'html' },
|
|
227
|
+
+
|
|
228
|
+
+ // special grammars:
|
|
229
|
+
{ name: 'diff' }
|
|
230
|
+
]
|
|
231
|
+
|
|
232
|
+
@@ -20,6 +22,12 @@ loadLanguages(langList.map(l => l.name))
|
|
233
|
+
|
|
234
|
+
const langMatch = langList.map(l => l.aliases || l.name).join('|')
|
|
235
|
+
|
|
236
|
+
+/**
|
|
237
|
+
+ * lang -> one of the supported languages (langList)
|
|
238
|
+
+ * attrs -> optional attributes:
|
|
239
|
+
+ * * numbered - lines are numbered
|
|
240
|
+
+ * title -> optional card title
|
|
241
|
+
+ */
|
|
242
|
+
const definitionLineRE = new RegExp(
|
|
243
|
+
'^' +
|
|
244
|
+
`(?<lang>(tabs|${ langMatch }))` + // then a language name
|
|
245
|
+
@@ -28,6 +36,10 @@ const definitionLineRE = new RegExp(
|
|
246
|
+
'$'
|
|
247
|
+
)
|
|
248
|
+
|
|
249
|
+
+/**
|
|
250
|
+
+ * <<| lang [attrs] [title] |>>
|
|
251
|
+
+ * ...content...
|
|
252
|
+
+ */
|
|
253
|
+
const tabsLineRE = new RegExp(
|
|
254
|
+
'^<<\\|\\s+' + // starts with "<<|" + at least one space char
|
|
255
|
+
`(?<lang>${ langMatch })` + // then a language name
|
|
256
|
+
@@ -72,29 +84,65 @@ function extractTabs (content) {
|
|
257
|
+
const props = tabMap[ tabName ]
|
|
258
|
+
return (
|
|
259
|
+
`<q-tab-panel class="q-pa-none" name="${ tabName }">` +
|
|
260
|
+
- `<pre v-pre class="markdown-code">${ highlight(props.content.join('\n'), props.attrs) }</pre>` +
|
|
261
|
+
- '<copy-button />' +
|
|
262
|
+
+ highlight(props.content.join('\n'), props.attrs) +
|
|
263
|
+
'</q-tab-panel>'
|
|
264
|
+
)
|
|
265
|
+
}).join('\n')
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
-function highlight (content, attrs) {
|
|
270
|
+
- const { lang, numbered } = attrs
|
|
271
|
+
- const highlightedText = prism.highlight(content, prism.languages[ lang ], lang)
|
|
272
|
+
+const magicCommentRE = / *\/\/\[! (?<klass>[\w-]+)\] */
|
|
273
|
+
+const magicCommentGlobalRE = new RegExp(magicCommentRE, 'g')
|
|
274
|
+
|
|
275
|
+
- if (numbered === true) {
|
|
276
|
+
- const lines = highlightedText.split('\n')
|
|
277
|
+
- const lineCount = ('' + highlightedText.length).length
|
|
278
|
+
+function getLineClasses (content, highlightedLines) {
|
|
279
|
+
+ const lines = content.split('\n')
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
### Tabs
|
|
283
|
+
|
|
284
|
+
```tabs
|
|
285
|
+
<<| js [numbered] Config file |>>
|
|
286
|
+
export default function (ctx) { // can be async too
|
|
287
|
+
console.log(ctx)
|
|
288
|
+
|
|
289
|
+
// Example output on console:
|
|
290
|
+
{
|
|
291
|
+
dev: true,
|
|
292
|
+
prod: false
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
const { FOO } = process.env // ❌ It doesn't allow destructuring or similar
|
|
296
|
+
process.env.FOO // ✅ It can only replace direct usage like this
|
|
297
|
+
|
|
298
|
+
// context gets generated based on the parameters
|
|
299
|
+
// with which you run "quasar dev" or "quasar build"
|
|
300
|
+
}
|
|
301
|
+
<<| js Other file |>>
|
|
302
|
+
const x = {
|
|
303
|
+
dev: true,
|
|
304
|
+
prod: false
|
|
305
|
+
}
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
### Tabs (3)
|
|
309
|
+
|
|
310
|
+
```tabs quasar.config file
|
|
311
|
+
<<| js One |>>
|
|
312
|
+
export default function (ctx) { // can be async too
|
|
313
|
+
console.log(ctx)
|
|
314
|
+
|
|
315
|
+
// Example output on console:
|
|
316
|
+
{
|
|
317
|
+
dev: true,
|
|
318
|
+
prod: false [[! highlight]]
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
const { FOO } = process.env // ❌ It doesn't allow destructuring or similar
|
|
322
|
+
process.env.FOO // ✅ It can only replace direct usage like this
|
|
323
|
+
|
|
324
|
+
// context gets generated based on the parameters
|
|
325
|
+
// with which you run "quasar dev" or "quasar build"
|
|
326
|
+
}
|
|
327
|
+
<<| js [numbered] Two (numbered) |>>
|
|
328
|
+
const x = {
|
|
329
|
+
dev: true,
|
|
330
|
+
prod: false
|
|
331
|
+
}
|
|
332
|
+
<<| diff Three (with diff) |>>
|
|
333
|
+
{
|
|
334
|
+
min: 0
|
|
335
|
+
- super: false
|
|
336
|
+
+ super: true
|
|
337
|
+
max: 100
|
|
338
|
+
}
|
|
339
|
+
```
|
|
340
|
+
|
|
341
|
+
<MarkdownInstallation plugins="AppFullscreen" />
|
|
342
|
+
|
|
343
|
+
<script import>
|
|
344
|
+
import AvatarApi from 'quasar/dist/api/QAvatar.json'
|
|
345
|
+
</script>
|
|
346
|
+
|
|
347
|
+
<MarkdownApi :api="AvatarApi" name="QAvatar"/>
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Introduction to Markdown Plugins
|
|
3
|
+
desc: Markdown for your Quasar and Vue builds
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Welcome to the Markdown Plugins documentation! This guide will help you start using Markdown Plugins to enhance your documentation and content creation experience.
|
|
7
|
+
|
|
8
|
+
## What are Markdown Plugins?
|
|
9
|
+
|
|
10
|
+
Markdown Plugins are a set of tools and extensions designed to enhance the functionality of Markdown. They provide additional features and capabilities that go beyond the standard Markdown syntax, allowing you to create more dynamic and interactive content.
|
|
11
|
+
|
|
12
|
+
## Key Features
|
|
13
|
+
|
|
14
|
+
- **Extended Syntax**: Add custom syntax and elements to your Markdown documents.
|
|
15
|
+
- **Custom Containers**: Use custom containers for callouts, warnings, and more.
|
|
16
|
+
- **Frontmatter Support**: Extract and process frontmatter content from your Markdown files.
|
|
17
|
+
- **Header Management**: Extract and process headers for generating ToCs or managing headers.
|
|
18
|
+
- **Inline Code Styling**: Add custom classes to inline code blocks for styling.
|
|
19
|
+
- **Link Customization**: Convert Markdown links into Vue components for SPA-friendly routing.
|
|
20
|
+
- **Table Enhancements**: Add custom classes and attributes to Markdown tables.
|
|
21
|
+
- **Title Extraction**: Extract the first header in Markdown as the page title.
|
|
22
|
+
- **Script Imports**: Extract and process **<script import>** blocks from Markdown.
|
|
23
|
+
- **Code Block Enhancements**: Enhance code block rendering with syntax highlighting, tabs, and more.
|
|
24
|
+
- **Custom Styling**: Apply custom styles to your Markdown content for a more polished look.
|
|
25
|
+
- **Integration**: Easily integrate with other tools and platforms to streamline your workflow.
|
|
26
|
+
|
|
27
|
+
## Why Use Markdown Plugins?
|
|
28
|
+
|
|
29
|
+
Markdown Plugins offer several benefits that make them a valuable addition to your documentation toolkit:
|
|
30
|
+
|
|
31
|
+
- **Enhanced Readability**: Improve the readability and presentation of your content with custom elements and styles.
|
|
32
|
+
- **Increased Productivity**: Save time by using pre-built components and extensions that simplify complex tasks.
|
|
33
|
+
- **Better Collaboration**: Facilitate collaboration by providing a consistent and standardized way to create and share content.
|
|
34
|
+
|
|
35
|
+
## Getting Started
|
|
36
|
+
|
|
37
|
+
To get started with Markdown Plugins, follow these steps:
|
|
38
|
+
|
|
39
|
+
1. **Installation**: Cherry-pick and install the Markdown Plugins packages using your preferred package manager.
|
|
40
|
+
2. **Configuration**: Configure the plugins to suit your needs and preferences.
|
|
41
|
+
3. **Usage**: Start using the plugins in your Markdown documents to enhance your content.
|
|
42
|
+
|
|
43
|
+
For detailed instructions on installation and configuration, refer to the **Installation** and **Configuration** sections for each respective plugin.
|
|
44
|
+
|
|
45
|
+
## Examples
|
|
46
|
+
|
|
47
|
+
Here are some examples of what you can achieve with Markdown Plugins:
|
|
48
|
+
|
|
49
|
+
- **Custom Syntax**: Add custom syntax for specific use cases.
|
|
50
|
+
- **Enhanced Components**: Embed interactive and enhanced components.
|
|
51
|
+
- **Custom Styling**: Apply custom styles to your content for a polished look.
|
|
52
|
+
- **Frontmatter Support**: Extract and process frontmatter content from your Markdown files.
|
|
53
|
+
- **Header Management**: Extract and process headers for generating ToCs or managing headers.
|
|
54
|
+
- **Inline Code Styling**: Add custom classes to inline code blocks for styling.
|
|
55
|
+
- **Link Customization**: Convert Markdown links into Vue components for SPA-friendly routing.
|
|
56
|
+
- **Table Enhancements**: Add custom classes and attributes to Markdown tables.
|
|
57
|
+
- **Title Extraction**: Extract the first header in Markdown as the page title.
|
|
58
|
+
- **Script Imports**: Extract and process `<script import>` blocks from Markdown.
|
|
59
|
+
- **Code Block Enhancements**: Enhance code block rendering with syntax highlighting, tabs, and more.
|
|
60
|
+
|
|
61
|
+
<!-- Check out the [Examples](../guides/examples) section for more detailed examples and use cases. -->
|
|
62
|
+
|
|
63
|
+
## Support
|
|
64
|
+
|
|
65
|
+
If you have any questions or need assistance, please refer to the [FAQ](../guides/faq) or reach out to our support team.
|
|
66
|
+
|
|
67
|
+
Happy coding!
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Contributing Guide
|
|
3
|
+
desc: Guidelines for contributing to the Markdown Plugins project.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Thank you for your interest in contributing to the Markdown Plugins project! We welcome contributions from the community and appreciate your efforts to improve the project. This guide will help you get started with contributing.
|
|
7
|
+
|
|
8
|
+
## How to Contribute
|
|
9
|
+
|
|
10
|
+
### Reporting Issues
|
|
11
|
+
|
|
12
|
+
If you encounter any bugs or have suggestions for improvements, please report them by opening an issue on the GitHub repository. When reporting an issue, please include:
|
|
13
|
+
|
|
14
|
+
- A clear and descriptive title.
|
|
15
|
+
- A detailed description of the issue or suggestion.
|
|
16
|
+
- Steps to reproduce the issue (if applicable).
|
|
17
|
+
- Any relevant code snippets or screenshots.
|
|
18
|
+
|
|
19
|
+
### Submitting Pull Requests
|
|
20
|
+
|
|
21
|
+
We welcome pull requests for bug fixes, new features, and improvements. To submit a pull request:
|
|
22
|
+
|
|
23
|
+
1. **Fork the Repository**: Click the "Fork" button on the repository's GitHub page to create a copy of the repository in your GitHub account.
|
|
24
|
+
|
|
25
|
+
2. **Clone the Repository**: Clone the forked repository to your local machine.
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
git clone https://github.com/your-username/md-plugins.git
|
|
29
|
+
cd md-plugins
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
3. **Create a Branch**: Create a new branch for your changes.
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
git checkout -b my-feature-branch
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
4. **Make Changes**: Make your changes to the codebase. Ensure that your changes follow the project's coding standards and guidelines.
|
|
39
|
+
|
|
40
|
+
5. **Commit Changes**: Commit your changes with a clear and descriptive commit message.
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
git add .
|
|
44
|
+
git commit -m "Add new feature or fix bug"
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
6. **Push Changes**: Push your changes to your forked repository.
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
git push origin my-feature-branch
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
7. **Open a Pull Request**: Go to the original repository on GitHub and open a pull request. Provide a clear and descriptive title and description for your pull request.
|
|
54
|
+
|
|
55
|
+
### Code Style and Guidelines
|
|
56
|
+
|
|
57
|
+
Please ensure that your code follows the project's coding standards and guidelines. This includes:
|
|
58
|
+
|
|
59
|
+
- Writing clear and concise code.
|
|
60
|
+
- Adding comments and documentation where necessary.
|
|
61
|
+
- Following the project's naming conventions and file organization.
|
|
62
|
+
- Writing tests for new features and bug fixes.
|
|
63
|
+
|
|
64
|
+
### Running Tests
|
|
65
|
+
|
|
66
|
+
Before submitting your pull request, ensure that all tests pass. You can run the tests using the following command:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
pnpm test
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
If you add new features or fix bugs, please add corresponding tests to ensure the changes are properly tested.
|
|
73
|
+
|
|
74
|
+
### Documentation
|
|
75
|
+
|
|
76
|
+
If your changes affect the project's documentation, please update the relevant documentation files. This includes:
|
|
77
|
+
|
|
78
|
+
- Updating the `README.md` file.
|
|
79
|
+
- Updating the documentation in the `docs` directory.
|
|
80
|
+
- Adding examples or usage instructions if applicable.
|
|
81
|
+
|
|
82
|
+
## Community Guidelines
|
|
83
|
+
|
|
84
|
+
We strive to create a welcoming and inclusive community. Please adhere to the following guidelines:
|
|
85
|
+
|
|
86
|
+
- Be respectful and considerate of others.
|
|
87
|
+
- Provide constructive feedback and be open to feedback from others.
|
|
88
|
+
- Avoid using offensive or inappropriate language.
|
|
89
|
+
- Follow the project's code of conduct.
|
|
90
|
+
|
|
91
|
+
## Getting Help
|
|
92
|
+
|
|
93
|
+
If you need help or have any questions, feel free to reach out to the community or the project maintainers. You can:
|
|
94
|
+
|
|
95
|
+
- Open an issue on the GitHub repository.
|
|
96
|
+
- Join the project's discussion forum or chat (if available).
|
|
97
|
+
- Contact the project maintainers directly.
|
|
98
|
+
|
|
99
|
+
Thank you for contributing to the Markdown Plugins project! Your contributions help make the project better for everyone.
|
|
100
|
+
|
|
101
|
+
Happy coding!
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Frequently Asked Questions
|
|
3
|
+
desc: Common questions and answers about Markdown Plugins.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## General Questions
|
|
7
|
+
|
|
8
|
+
### What are Markdown Plugins?
|
|
9
|
+
|
|
10
|
+
Markdown Plugins are tools that extend the functionality of Markdown, allowing you to add custom syntax, enhanced components, and custom styling to your Markdown documents. They help improve the accessibility, styling, and interactivity of your content.
|
|
11
|
+
|
|
12
|
+
### How do I install Markdown Plugins?
|
|
13
|
+
|
|
14
|
+
You can install Markdown Plugins using npm, yarn, or pnpm. Here is an example using npm:
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
npm install @md-plugins/vite-md-plugin
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Refer to the **Installation** section of each plugin's documentation for detailed instructions.
|
|
21
|
+
|
|
22
|
+
### How do I configure Markdown Plugins?
|
|
23
|
+
|
|
24
|
+
Configuration varies depending on the plugin. Generally, you will need to import the plugin and use it with your Markdown processor (e.g., MarkdownIt). Refer to the **Configuration** section of each plugin's documentation for detailed instructions.
|
|
25
|
+
|
|
26
|
+
## Plugin-Specific Questions
|
|
27
|
+
|
|
28
|
+
### How do I add custom classes to images?
|
|
29
|
+
|
|
30
|
+
You can use the `image` plugin to add custom classes to images. Here is an example configuration:
|
|
31
|
+
|
|
32
|
+
```typescript
|
|
33
|
+
import MarkdownIt from 'markdown-it'
|
|
34
|
+
import { imagePlugin } from '@md-plugins/md-plugin-image'
|
|
35
|
+
|
|
36
|
+
const md = new MarkdownIt()
|
|
37
|
+
|
|
38
|
+
md.use(imagePlugin, {
|
|
39
|
+
imageClass: 'custom-image-class',
|
|
40
|
+
})
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### How do I extract and process frontmatter content?
|
|
44
|
+
|
|
45
|
+
You can use the `frontmatter` plugin to extract and process frontmatter content from your Markdown files. Here is an example configuration:
|
|
46
|
+
|
|
47
|
+
```typescript
|
|
48
|
+
import MarkdownIt from 'markdown-it'
|
|
49
|
+
import { frontmatterPlugin } from '@md-plugins/md-plugin-frontmatter'
|
|
50
|
+
|
|
51
|
+
const md = new MarkdownIt()
|
|
52
|
+
|
|
53
|
+
md.use(frontmatterPlugin, {
|
|
54
|
+
grayMatterOptions: {
|
|
55
|
+
excerpt: true,
|
|
56
|
+
excerpt_separator: '<!-- more -->',
|
|
57
|
+
},
|
|
58
|
+
renderExcerpt: true,
|
|
59
|
+
})
|
|
60
|
+
|
|
61
|
+
const env: MarkdownItEnv = {}
|
|
62
|
+
const html = md.render(code, env)
|
|
63
|
+
|
|
64
|
+
console.log(env.frontmatter)
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### How do I enhance code block rendering?
|
|
68
|
+
|
|
69
|
+
You can use the `codeblocks` plugin to enhance code block rendering with syntax highlighting, tabs, and more. Here is an example configuration:
|
|
70
|
+
|
|
71
|
+
```typescript
|
|
72
|
+
import MarkdownIt from 'markdown-it'
|
|
73
|
+
import { codeblocksPlugin } from '@md-plugins/md-plugin-codeblocks'
|
|
74
|
+
|
|
75
|
+
const md = new MarkdownIt()
|
|
76
|
+
|
|
77
|
+
md.use(codeblocksPlugin, {
|
|
78
|
+
defaultLang: 'javascript',
|
|
79
|
+
containerComponent: 'MarkdownPrerender',
|
|
80
|
+
copyButtonComponent: 'MarkdownCopyButton',
|
|
81
|
+
})
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### How do I convert Markdown links into Vue components?
|
|
85
|
+
|
|
86
|
+
You can use the `link` plugin to convert Markdown links into Vue components for SPA-friendly routing. Here is an example configuration:
|
|
87
|
+
|
|
88
|
+
```typescript
|
|
89
|
+
import MarkdownIt from 'markdown-it'
|
|
90
|
+
import { linkPlugin } from '@md-plugins/md-plugin-link'
|
|
91
|
+
|
|
92
|
+
const md = new MarkdownIt()
|
|
93
|
+
|
|
94
|
+
md.use(linkPlugin, {
|
|
95
|
+
linkTag: 'RouterLink', // or 'router-link'
|
|
96
|
+
linkToKeyword: 'to',
|
|
97
|
+
pageScript: 'import { RouterLink } from "vue-router"',
|
|
98
|
+
})
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
## Troubleshooting
|
|
102
|
+
|
|
103
|
+
### My Markdown content is not rendering correctly. What should I do?
|
|
104
|
+
|
|
105
|
+
Ensure that you have correctly installed and configured the plugins. Check the console for any error messages and refer to the documentation for troubleshooting tips. If the issue persists, reach out to our support team for assistance.
|
|
106
|
+
|
|
107
|
+
### How do I report a bug or request a feature?
|
|
108
|
+
|
|
109
|
+
You can report bugs or request features by opening an issue on the GitHub repository of the respective plugin. Provide as much detail as possible to help us understand and address your request.
|
|
110
|
+
|
|
111
|
+
## Support
|
|
112
|
+
|
|
113
|
+
If you have any other questions or need further assistance, please refer to the Support page or contact our support team.
|
|
114
|
+
|
|
115
|
+
Happy coding!
|
|
File without changes
|
|
File without changes
|