@md-plugins/quasar-app-extension-q-press 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 +20 -15
- package/dist/index.js +41 -7
- package/dist/install.js +7 -5
- package/dist/q-press-globals.d.ts +49 -0
- package/dist/templates/init/src/_q-press/api/components/MarkdownCode.json +2 -2
- package/dist/templates/init/src/_q-press/api/components/MarkdownCodepen.json +6 -9
- package/dist/templates/init/src/_q-press/api/components/MarkdownExample.json +27 -2
- package/dist/templates/init/src/_q-press/components/MarkdownApi.vue +129 -84
- package/dist/templates/init/src/_q-press/components/MarkdownCardLink.vue +1 -1
- package/dist/templates/init/src/_q-press/components/MarkdownCardTitle.vue +1 -1
- package/dist/templates/init/src/_q-press/components/MarkdownCode.vue +71 -3
- package/dist/templates/init/src/_q-press/components/MarkdownCodepen.vue +316 -59
- package/dist/templates/init/src/_q-press/components/MarkdownCopyButton.vue +1 -1
- package/dist/templates/init/src/_q-press/components/MarkdownExample.vue +54 -19
- package/dist/templates/init/src/_q-press/components/MarkdownLink.vue +5 -5
- package/dist/templates/init/src/_q-press/components/MarkdownMermaid.vue +123 -0
- package/dist/templates/init/src/_q-press/components/MarkdownTree.vue +2 -2
- package/dist/templates/init/src/_q-press/components/markdown-utils.ts +27 -3
- package/dist/templates/init/src/_q-press/css/app.scss +38 -26
- package/dist/templates/init/src/_q-press/css/code-theme.scss +634 -0
- package/dist/templates/init/src/_q-press/css/themes/default.scss +1 -1
- package/dist/templates/init/src/_q-press/css/themes/evergreen.scss +69 -0
- package/dist/templates/init/src/_q-press/css/themes/mystic.scss +1 -1
- package/dist/templates/init/src/_q-press/css/themes/newspaper.scss +1 -1
- package/dist/templates/init/src/_q-press/css/themes/sunrise.scss +1 -1
- package/dist/templates/init/src/_q-press/css/themes/tawny.scss +1 -1
- package/dist/templates/init/src/_q-press/layouts/MarkdownDrawerSidebar.vue +1 -1
- package/dist/templates/init/src/_q-press/layouts/MarkdownDrawerToc.vue +1 -1
- package/dist/templates/init/src/_q-press/layouts/MarkdownHeader.vue +1 -1
- package/dist/templates/init/src/_q-press/layouts/MarkdownLayout.vue +2 -2
- package/dist/templates/init/src/_q-press/layouts/MarkdownPage.vue +4 -3
- package/dist/templates/init/src/_q-press/layouts/MarkdownSearch.vue +1 -1
- package/dist/templates/init/src/_q-press/stores/markdown.ts +1 -2
- package/dist/templates/init/src/components/LandingPage/LandingPage.vue +15 -1
- package/dist/templates/init/src/components/QPressThemeGallery.vue +336 -0
- package/dist/templates/init/src/components/page-parts/releases/GitHubReleases.vue +121 -0
- package/dist/templates/init/src/components/page-parts/releases/PackageReleases.vue +191 -0
- package/dist/templates/init/src/components/page-parts/releases/md-table-parser.ts +52 -0
- package/dist/templates/init/src/components/page-parts/releases/sanitize.ts +132 -0
- package/dist/templates/init/src/markdown/__elements.md +8 -8
- package/dist/templates/init/src/markdown/__elements2.md +4 -4
- package/dist/templates/init/src/markdown/faq/best-practices.md +27 -0
- package/dist/templates/init/src/markdown/faq/general.md +27 -0
- package/dist/templates/init/src/markdown/faq/troubleshooting.md +27 -0
- package/dist/templates/init/src/markdown/getting-started/introduction.md +7 -5
- package/dist/templates/init/src/markdown/md-plugins/blockquote/overview.md +3 -1
- package/dist/templates/init/src/markdown/md-plugins/codeblocks/advanced.md +19 -15
- package/dist/templates/init/src/markdown/md-plugins/codeblocks/overview.md +45 -8
- package/dist/templates/init/src/markdown/md-plugins/containers/overview.md +3 -1
- package/dist/templates/init/src/markdown/md-plugins/frontmatter/overview.md +3 -1
- package/dist/templates/init/src/markdown/md-plugins/headers/overview.md +3 -1
- package/dist/templates/init/src/markdown/md-plugins/image/overview.md +3 -1
- package/dist/templates/init/src/markdown/md-plugins/imports/overview.md +3 -1
- package/dist/templates/init/src/markdown/md-plugins/inline-code/overview.md +3 -1
- package/dist/templates/init/src/markdown/md-plugins/link/advanced.md +2 -2
- package/dist/templates/init/src/markdown/md-plugins/link/overview.md +6 -4
- package/dist/templates/init/src/markdown/md-plugins/mermaid/advanced.md +69 -0
- package/dist/templates/init/src/markdown/md-plugins/mermaid/overview.md +73 -0
- package/dist/templates/init/src/markdown/md-plugins/shared/overview.md +28 -13
- package/dist/templates/init/src/markdown/md-plugins/table/overview.md +3 -1
- package/dist/templates/init/src/markdown/md-plugins/title/overview.md +3 -1
- package/dist/templates/init/src/markdown/other/contact.md +37 -0
- package/dist/templates/init/src/markdown/other/contributing/bugs-and-feature-requests.md +33 -0
- package/dist/templates/init/src/markdown/other/contributing/call-to-action.md +25 -0
- package/dist/templates/init/src/markdown/other/contributing/documentation.md +31 -0
- package/dist/templates/init/src/markdown/other/contributing/overview.md +41 -0
- package/dist/templates/init/src/markdown/other/contributing/packages.md +28 -0
- package/dist/templates/init/src/markdown/other/contributing/sponsor.md +23 -0
- package/dist/templates/init/src/markdown/other/faq.md +179 -0
- package/dist/templates/init/src/markdown/other/releases.md +11 -0
- package/dist/templates/init/src/markdown/other/upgrade-guide.md +165 -0
- package/dist/templates/init/src/markdown/quasar-app-extensions/qpress/advanced.md +11 -3
- package/dist/templates/init/src/markdown/quasar-app-extensions/qpress/components.md +25 -29
- package/dist/templates/init/src/markdown/quasar-app-extensions/qpress/overview.md +20 -20
- package/dist/templates/init/src/markdown/quasar-app-extensions/qpress/site-config.md +17 -3
- package/dist/templates/init/src/markdown/quasar-app-extensions/qpress/themes.md +101 -9
- package/dist/templates/init/src/markdown/quasar-app-extensions/vite-md-plugin-app-ext/advanced.md +158 -0
- package/dist/templates/init/src/markdown/quasar-app-extensions/vite-md-plugin-app-ext/overview.md +1 -1
- package/dist/templates/init/src/markdown/vite-plugins/vite-examples-plugin/advanced.md +8 -3
- package/dist/templates/init/src/markdown/vite-plugins/vite-examples-plugin/overview.md +19 -5
- package/dist/templates/init/src/markdown/vite-plugins/vite-md-plugin/advanced.md +84 -54
- package/dist/templates/init/src/markdown/vite-plugins/vite-md-plugin/overview.md +19 -3
- package/dist/templates/init/src/siteConfig/index.ts +52 -23
- package/dist/templates/update/src/_q-press/api/components/MarkdownCode.json +2 -2
- package/dist/templates/update/src/_q-press/api/components/MarkdownCodepen.json +6 -9
- package/dist/templates/update/src/_q-press/api/components/MarkdownExample.json +27 -2
- package/dist/templates/update/src/_q-press/components/MarkdownApi.vue +129 -84
- package/dist/templates/update/src/_q-press/components/MarkdownCardLink.vue +1 -1
- package/dist/templates/update/src/_q-press/components/MarkdownCardTitle.vue +1 -1
- package/dist/templates/update/src/_q-press/components/MarkdownCode.vue +71 -3
- package/dist/templates/update/src/_q-press/components/MarkdownCodepen.vue +316 -59
- package/dist/templates/update/src/_q-press/components/MarkdownCopyButton.vue +1 -1
- package/dist/templates/update/src/_q-press/components/MarkdownExample.vue +54 -19
- package/dist/templates/update/src/_q-press/components/MarkdownLink.vue +5 -5
- package/dist/templates/update/src/_q-press/components/MarkdownMermaid.vue +123 -0
- package/dist/templates/update/src/_q-press/components/MarkdownTree.vue +2 -2
- package/dist/templates/update/src/_q-press/components/markdown-utils.ts +27 -3
- package/dist/templates/update/src/_q-press/css/app.scss +38 -26
- package/dist/templates/update/src/_q-press/css/code-theme.scss +634 -0
- package/dist/templates/update/src/_q-press/css/themes/default.scss +1 -1
- package/dist/templates/update/src/_q-press/css/themes/evergreen.scss +69 -0
- package/dist/templates/update/src/_q-press/css/themes/mystic.scss +1 -1
- package/dist/templates/update/src/_q-press/css/themes/newspaper.scss +1 -1
- package/dist/templates/update/src/_q-press/css/themes/sunrise.scss +1 -1
- package/dist/templates/update/src/_q-press/css/themes/tawny.scss +1 -1
- package/dist/templates/update/src/_q-press/layouts/MarkdownDrawerSidebar.vue +1 -1
- package/dist/templates/update/src/_q-press/layouts/MarkdownDrawerToc.vue +1 -1
- package/dist/templates/update/src/_q-press/layouts/MarkdownHeader.vue +1 -1
- package/dist/templates/update/src/_q-press/layouts/MarkdownLayout.vue +2 -2
- package/dist/templates/update/src/_q-press/layouts/MarkdownPage.vue +4 -3
- package/dist/templates/update/src/_q-press/layouts/MarkdownSearch.vue +1 -1
- package/dist/templates/update/src/_q-press/stores/markdown.ts +1 -2
- package/package.json +22 -21
- package/src/index.ts +80 -11
- package/src/install.ts +10 -9
- package/src/q-press-globals.d.ts +49 -0
- package/src/templates/init/src/_q-press/api/components/MarkdownCode.json +2 -2
- package/src/templates/init/src/_q-press/api/components/MarkdownCodepen.json +6 -9
- package/src/templates/init/src/_q-press/api/components/MarkdownExample.json +27 -2
- package/src/templates/init/src/_q-press/components/MarkdownApi.vue +129 -84
- package/src/templates/init/src/_q-press/components/MarkdownCardLink.vue +1 -1
- package/src/templates/init/src/_q-press/components/MarkdownCardTitle.vue +1 -1
- package/src/templates/init/src/_q-press/components/MarkdownCode.vue +71 -3
- package/src/templates/init/src/_q-press/components/MarkdownCodepen.vue +316 -59
- package/src/templates/init/src/_q-press/components/MarkdownCopyButton.vue +1 -1
- package/src/templates/init/src/_q-press/components/MarkdownExample.vue +54 -19
- package/src/templates/init/src/_q-press/components/MarkdownLink.vue +5 -5
- package/src/templates/init/src/_q-press/components/MarkdownMermaid.vue +123 -0
- package/src/templates/init/src/_q-press/components/MarkdownTree.vue +2 -2
- package/src/templates/init/src/_q-press/components/markdown-utils.ts +27 -3
- package/src/templates/init/src/_q-press/css/app.scss +38 -26
- package/src/templates/init/src/_q-press/css/code-theme.scss +634 -0
- package/src/templates/init/src/_q-press/css/themes/default.scss +1 -1
- package/src/templates/init/src/_q-press/css/themes/evergreen.scss +69 -0
- package/src/templates/init/src/_q-press/css/themes/mystic.scss +1 -1
- package/src/templates/init/src/_q-press/css/themes/newspaper.scss +1 -1
- package/src/templates/init/src/_q-press/css/themes/sunrise.scss +1 -1
- package/src/templates/init/src/_q-press/css/themes/tawny.scss +1 -1
- package/src/templates/init/src/_q-press/layouts/MarkdownDrawerSidebar.vue +1 -1
- package/src/templates/init/src/_q-press/layouts/MarkdownDrawerToc.vue +1 -1
- package/src/templates/init/src/_q-press/layouts/MarkdownHeader.vue +1 -1
- package/src/templates/init/src/_q-press/layouts/MarkdownLayout.vue +2 -2
- package/src/templates/init/src/_q-press/layouts/MarkdownPage.vue +4 -3
- package/src/templates/init/src/_q-press/layouts/MarkdownSearch.vue +1 -1
- package/src/templates/init/src/_q-press/stores/markdown.ts +1 -2
- package/src/templates/init/src/components/LandingPage/LandingPage.vue +15 -1
- package/src/templates/init/src/components/QPressThemeGallery.vue +336 -0
- package/src/templates/init/src/components/page-parts/releases/GitHubReleases.vue +121 -0
- package/src/templates/init/src/components/page-parts/releases/PackageReleases.vue +191 -0
- package/src/templates/init/src/components/page-parts/releases/md-table-parser.ts +52 -0
- package/src/templates/init/src/components/page-parts/releases/sanitize.ts +132 -0
- package/src/templates/init/src/markdown/__elements.md +8 -8
- package/src/templates/init/src/markdown/__elements2.md +4 -4
- package/src/templates/init/src/markdown/faq/best-practices.md +27 -0
- package/src/templates/init/src/markdown/faq/general.md +27 -0
- package/src/templates/init/src/markdown/faq/troubleshooting.md +27 -0
- package/src/templates/init/src/markdown/getting-started/introduction.md +7 -5
- package/src/templates/init/src/markdown/md-plugins/blockquote/overview.md +3 -1
- package/src/templates/init/src/markdown/md-plugins/codeblocks/advanced.md +19 -15
- package/src/templates/init/src/markdown/md-plugins/codeblocks/overview.md +45 -8
- package/src/templates/init/src/markdown/md-plugins/containers/overview.md +3 -1
- package/src/templates/init/src/markdown/md-plugins/frontmatter/overview.md +3 -1
- package/src/templates/init/src/markdown/md-plugins/headers/overview.md +3 -1
- package/src/templates/init/src/markdown/md-plugins/image/overview.md +3 -1
- package/src/templates/init/src/markdown/md-plugins/imports/overview.md +3 -1
- package/src/templates/init/src/markdown/md-plugins/inline-code/overview.md +3 -1
- package/src/templates/init/src/markdown/md-plugins/link/advanced.md +2 -2
- package/src/templates/init/src/markdown/md-plugins/link/overview.md +6 -4
- package/src/templates/init/src/markdown/md-plugins/mermaid/advanced.md +69 -0
- package/src/templates/init/src/markdown/md-plugins/mermaid/overview.md +73 -0
- package/src/templates/init/src/markdown/md-plugins/shared/overview.md +28 -13
- package/src/templates/init/src/markdown/md-plugins/table/overview.md +3 -1
- package/src/templates/init/src/markdown/md-plugins/title/overview.md +3 -1
- package/src/templates/init/src/markdown/other/contact.md +37 -0
- package/src/templates/init/src/markdown/other/contributing/bugs-and-feature-requests.md +33 -0
- package/src/templates/init/src/markdown/other/contributing/call-to-action.md +25 -0
- package/src/templates/init/src/markdown/other/contributing/documentation.md +31 -0
- package/src/templates/init/src/markdown/other/contributing/overview.md +41 -0
- package/src/templates/init/src/markdown/other/contributing/packages.md +28 -0
- package/src/templates/init/src/markdown/other/contributing/sponsor.md +23 -0
- package/src/templates/init/src/markdown/other/faq.md +179 -0
- package/src/templates/init/src/markdown/other/releases.md +11 -0
- package/src/templates/init/src/markdown/other/upgrade-guide.md +165 -0
- package/src/templates/init/src/markdown/quasar-app-extensions/qpress/advanced.md +11 -3
- package/src/templates/init/src/markdown/quasar-app-extensions/qpress/components.md +25 -29
- package/src/templates/init/src/markdown/quasar-app-extensions/qpress/overview.md +20 -20
- package/src/templates/init/src/markdown/quasar-app-extensions/qpress/site-config.md +17 -3
- package/src/templates/init/src/markdown/quasar-app-extensions/qpress/themes.md +101 -9
- package/src/templates/init/src/markdown/quasar-app-extensions/vite-md-plugin-app-ext/advanced.md +158 -0
- package/src/templates/init/src/markdown/quasar-app-extensions/vite-md-plugin-app-ext/overview.md +1 -1
- package/src/templates/init/src/markdown/vite-plugins/vite-examples-plugin/advanced.md +8 -3
- package/src/templates/init/src/markdown/vite-plugins/vite-examples-plugin/overview.md +19 -5
- package/src/templates/init/src/markdown/vite-plugins/vite-md-plugin/advanced.md +84 -54
- package/src/templates/init/src/markdown/vite-plugins/vite-md-plugin/overview.md +19 -3
- package/src/templates/init/src/siteConfig/index.ts +52 -23
- package/src/templates/update/src/_q-press/api/components/MarkdownCode.json +2 -2
- package/src/templates/update/src/_q-press/api/components/MarkdownCodepen.json +6 -9
- package/src/templates/update/src/_q-press/api/components/MarkdownExample.json +27 -2
- package/src/templates/update/src/_q-press/components/MarkdownApi.vue +129 -84
- package/src/templates/update/src/_q-press/components/MarkdownCardLink.vue +1 -1
- package/src/templates/update/src/_q-press/components/MarkdownCardTitle.vue +1 -1
- package/src/templates/update/src/_q-press/components/MarkdownCode.vue +71 -3
- package/src/templates/update/src/_q-press/components/MarkdownCodepen.vue +316 -59
- package/src/templates/update/src/_q-press/components/MarkdownCopyButton.vue +1 -1
- package/src/templates/update/src/_q-press/components/MarkdownExample.vue +54 -19
- package/src/templates/update/src/_q-press/components/MarkdownLink.vue +5 -5
- package/src/templates/update/src/_q-press/components/MarkdownMermaid.vue +123 -0
- package/src/templates/update/src/_q-press/components/MarkdownTree.vue +2 -2
- package/src/templates/update/src/_q-press/components/markdown-utils.ts +27 -3
- package/src/templates/update/src/_q-press/css/app.scss +38 -26
- package/src/templates/update/src/_q-press/css/code-theme.scss +634 -0
- package/src/templates/update/src/_q-press/css/themes/default.scss +1 -1
- package/src/templates/update/src/_q-press/css/themes/evergreen.scss +69 -0
- package/src/templates/update/src/_q-press/css/themes/mystic.scss +1 -1
- package/src/templates/update/src/_q-press/css/themes/newspaper.scss +1 -1
- package/src/templates/update/src/_q-press/css/themes/sunrise.scss +1 -1
- package/src/templates/update/src/_q-press/css/themes/tawny.scss +1 -1
- package/src/templates/update/src/_q-press/layouts/MarkdownDrawerSidebar.vue +1 -1
- package/src/templates/update/src/_q-press/layouts/MarkdownDrawerToc.vue +1 -1
- package/src/templates/update/src/_q-press/layouts/MarkdownHeader.vue +1 -1
- package/src/templates/update/src/_q-press/layouts/MarkdownLayout.vue +2 -2
- package/src/templates/update/src/_q-press/layouts/MarkdownPage.vue +4 -3
- package/src/templates/update/src/_q-press/layouts/MarkdownSearch.vue +1 -1
- package/src/templates/update/src/_q-press/stores/markdown.ts +1 -2
- package/tsconfig.json +1 -1
- package/dist/templates/init/src/_q-press/api/components/MarkdownCodePrism.json +0 -29
- package/dist/templates/init/src/_q-press/components/MarkdownCodePrism.ts +0 -36
- package/dist/templates/init/src/_q-press/css/prism-theme.scss +0 -298
- package/dist/templates/init/src/markdown/guides/contributing.md +0 -101
- package/dist/templates/init/src/markdown/guides/faq.md +0 -115
- package/dist/templates/init/src/markdown/guides/release-notes.md +0 -0
- package/dist/templates/init/src/markdown/guides/style-guide.md +0 -0
- package/dist/templates/init/src/markdown/guides/upgrade-guide.md +0 -92
- package/dist/templates/init/src/markdown/other/release-notes.md +0 -8
- package/dist/templates/init/src/q-press.globals.d.ts +0 -36
- package/dist/templates/update/src/_q-press/api/components/MarkdownCodePrism.json +0 -29
- package/dist/templates/update/src/_q-press/components/MarkdownCodePrism.ts +0 -36
- package/dist/templates/update/src/_q-press/css/prism-theme.scss +0 -298
- package/dist/templates/update/src/q-press.globals.d.ts +0 -36
- package/src/templates/init/src/_q-press/api/components/MarkdownCodePrism.json +0 -29
- package/src/templates/init/src/_q-press/components/MarkdownCodePrism.ts +0 -36
- package/src/templates/init/src/_q-press/css/prism-theme.scss +0 -298
- package/src/templates/init/src/markdown/guides/contributing.md +0 -101
- package/src/templates/init/src/markdown/guides/faq.md +0 -115
- 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/guides/upgrade-guide.md +0 -92
- package/src/templates/init/src/markdown/other/release-notes.md +0 -8
- package/src/templates/init/src/q-press.globals.d.ts +0 -36
- package/src/templates/update/src/_q-press/api/components/MarkdownCodePrism.json +0 -29
- package/src/templates/update/src/_q-press/components/MarkdownCodePrism.ts +0 -36
- package/src/templates/update/src/_q-press/css/prism-theme.scss +0 -298
- package/src/templates/update/src/q-press.globals.d.ts +0 -36
|
@@ -11,7 +11,7 @@ The `viteMdPlugin` is a powerful tool for integrating Markdown processing into y
|
|
|
11
11
|
|
|
12
12
|
```ts
|
|
13
13
|
import { Plugin } from 'vite'
|
|
14
|
-
import { Options } from 'markdown-it'
|
|
14
|
+
import MarkdownIt, { Options } from 'markdown-it'
|
|
15
15
|
import { BlockquotePluginOptions } from '@md-plugins/md-plugin-blockquote'
|
|
16
16
|
import { CodeblockPluginOptions } from '@md-plugins/md-plugin-codeblocks'
|
|
17
17
|
import { FrontmatterPluginOptions } from '@md-plugins/md-plugin-frontmatter'
|
|
@@ -19,21 +19,27 @@ import { HeadersPluginOptions } from '@md-plugins/md-plugin-headers'
|
|
|
19
19
|
import { ImagePluginOptions } from '@md-plugins/md-plugin-image'
|
|
20
20
|
import { InlineCodePluginOptions } from '@md-plugins/md-plugin-inlinecode'
|
|
21
21
|
import { LinkPluginOptions } from '@md-plugins/md-plugin-link'
|
|
22
|
+
import { MermaidPluginOptions } from '@md-plugins/md-plugin-mermaid'
|
|
22
23
|
import { TablePluginOptions } from '@md-plugins/md-plugin-table'
|
|
23
24
|
|
|
25
|
+
type MarkdownItPlugin = (md: MarkdownIt, ...params: any[]) => void
|
|
26
|
+
type MarkdownItPluginEntry = MarkdownItPlugin | [MarkdownItPlugin, ...any[]]
|
|
27
|
+
|
|
24
28
|
interface MarkdownOptions extends Options {
|
|
25
29
|
html?: boolean
|
|
26
30
|
linkify?: boolean
|
|
27
31
|
typographer?: boolean
|
|
28
32
|
breaks?: boolean
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
blockquotePlugin?: BlockquotePluginOptions
|
|
34
|
+
codeblockPlugin?: CodeblockPluginOptions
|
|
35
|
+
frontmatterPlugin?: FrontmatterPluginOptions
|
|
36
|
+
headersPlugin?: HeadersPluginOptions | boolean
|
|
37
|
+
imagePlugin?: ImagePluginOptions
|
|
38
|
+
inlineCodePlugin?: InlineCodePluginOptions
|
|
39
|
+
linkPlugin?: LinkPluginOptions
|
|
40
|
+
mermaidPlugin?: MermaidPluginOptions
|
|
41
|
+
tablePlugin?: TablePluginOptions
|
|
42
|
+
markdownItPlugins?: MarkdownItPluginEntry[]
|
|
37
43
|
}
|
|
38
44
|
|
|
39
45
|
interface MenuItem {
|
|
@@ -128,6 +134,59 @@ export default defineConfig({
|
|
|
128
134
|
})
|
|
129
135
|
```
|
|
130
136
|
|
|
137
|
+
### Using Other Markdown-It Plugins
|
|
138
|
+
|
|
139
|
+
The `viteMdPlugin` already includes the md-plugins used by Q-Press, plus inserted text support for `++text++`. If you need additional Markdown-it syntax, install the plugin and pass it through `config.markdownItPlugins`.
|
|
140
|
+
|
|
141
|
+
```tabs
|
|
142
|
+
<<| bash pnpm |>>
|
|
143
|
+
pnpm add markdown-it-mark markdown-it-sub markdown-it-sup markdown-it-footnote
|
|
144
|
+
<<| bash bun |>>
|
|
145
|
+
bun add markdown-it-mark markdown-it-sub markdown-it-sup markdown-it-footnote
|
|
146
|
+
<<| bash yarn |>>
|
|
147
|
+
yarn add markdown-it-mark markdown-it-sub markdown-it-sup markdown-it-footnote
|
|
148
|
+
<<| bash npm |>>
|
|
149
|
+
npm install markdown-it-mark markdown-it-sub markdown-it-sup markdown-it-footnote
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
```ts
|
|
153
|
+
import { defineConfig } from 'vite'
|
|
154
|
+
import vue from '@vitejs/plugin-vue'
|
|
155
|
+
import markdownItFootnote from 'markdown-it-footnote'
|
|
156
|
+
import markdownItMark from 'markdown-it-mark'
|
|
157
|
+
import markdownItSub from 'markdown-it-sub'
|
|
158
|
+
import markdownItSup from 'markdown-it-sup'
|
|
159
|
+
import { viteMdPlugin } from '@md-plugins/vite-md-plugin'
|
|
160
|
+
|
|
161
|
+
export default defineConfig({
|
|
162
|
+
plugins: [
|
|
163
|
+
vue(),
|
|
164
|
+
viteMdPlugin({
|
|
165
|
+
path: './src/markdown',
|
|
166
|
+
menu: [],
|
|
167
|
+
config: {
|
|
168
|
+
markdownItPlugins: [
|
|
169
|
+
markdownItMark, // ==highlight==
|
|
170
|
+
markdownItSub, // H~2~O
|
|
171
|
+
markdownItSup, // E=mc^2^
|
|
172
|
+
markdownItFootnote, // footnote references
|
|
173
|
+
],
|
|
174
|
+
},
|
|
175
|
+
}),
|
|
176
|
+
],
|
|
177
|
+
})
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
If you own a raw MarkdownIt instance instead of using `viteMdPlugin`, wire the plugins directly:
|
|
181
|
+
|
|
182
|
+
```ts
|
|
183
|
+
import MarkdownIt from 'markdown-it'
|
|
184
|
+
import markdownItMark from 'markdown-it-mark'
|
|
185
|
+
|
|
186
|
+
const md = new MarkdownIt()
|
|
187
|
+
md.use(markdownItMark)
|
|
188
|
+
```
|
|
189
|
+
|
|
131
190
|
### Quasar Framework Configuration
|
|
132
191
|
|
|
133
192
|
If you’re using the Quasar Framework with Vite, additional configuration is needed to enable support for `.md` files:
|
|
@@ -210,55 +269,26 @@ export interface MenuItem {
|
|
|
210
269
|
#### `config`
|
|
211
270
|
|
|
212
271
|
- **Type**: `MarkdownOptions`
|
|
213
|
-
- **Description**: Additional configuration options for the Markdown
|
|
214
|
-
|
|
215
|
-
````ts
|
|
216
|
-
import { Options } from 'markdown-it';
|
|
217
|
-
import { BlockquotePluginOptions } from '@md-plugins/md-plugin-blockquote';
|
|
218
|
-
import { CodeblockPluginOptions } from '@md-plugins/md-plugin-codeblocks';
|
|
219
|
-
import { FrontmatterPluginOptions } from '@md-plugins/md-plugin-frontmatter';
|
|
220
|
-
import { HeadersPluginOptions } from '@md-plugins/md-plugin-headers';
|
|
221
|
-
import { ImagePluginOptions } from '@md-plugins/md-plugin-image';
|
|
222
|
-
import { InlineCodePluginOptions } from '@md-plugins/md-plugin-inlinecode';
|
|
223
|
-
import { LinkPluginOptions } from '@md-plugins/md-plugin-link';
|
|
224
|
-
import { TablePluginOptions } from '@md-plugins/md-plugin-table';
|
|
225
|
-
|
|
226
|
-
interface MarkdownOptions extends Options {
|
|
227
|
-
html?: boolean;
|
|
228
|
-
linkify?: boolean;
|
|
229
|
-
typographer?: boolean;
|
|
230
|
-
breaks?: boolean;
|
|
231
|
-
blockquote?: BlockquotePluginOptions;
|
|
232
|
-
codeblocks?: CodeblockPluginOptions;
|
|
233
|
-
frontmatter?: FrontmatterPluginOptions;
|
|
234
|
-
headers?: HeadersPluginOptions | boolean;
|
|
235
|
-
image?: ImagePluginOptions;
|
|
236
|
-
inlinecode?: InlineCodePluginOptions;
|
|
237
|
-
link?: LinkPluginOptions;
|
|
238
|
-
table?: TablePluginOptions;
|
|
239
|
-
}
|
|
240
|
-
```
|
|
272
|
+
- **Description**: Additional configuration options for the Markdown processor and bundled md-plugins.
|
|
241
273
|
|
|
242
|
-
|
|
274
|
+
Use `config.markdownItPlugins` for extra Markdown-it syntax that md-plugins does not bundle by default. Use `config.mermaidPlugin` to customize Mermaid rendering.
|
|
243
275
|
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
```typescript
|
|
247
|
-
import { defineConfig } from 'vite'
|
|
248
|
-
import vue from '@vitejs/plugin-vue'
|
|
276
|
+
```ts
|
|
249
277
|
import { viteMdPlugin } from '@md-plugins/vite-md-plugin'
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
278
|
+
import markdownItMark from 'markdown-it-mark'
|
|
279
|
+
|
|
280
|
+
viteMdPlugin({
|
|
281
|
+
path: './src/markdown',
|
|
282
|
+
menu: [],
|
|
283
|
+
config: {
|
|
284
|
+
markdownItPlugins: [markdownItMark],
|
|
285
|
+
mermaidPlugin: {
|
|
286
|
+
renderMode: 'component',
|
|
287
|
+
componentName: 'MarkdownMermaid',
|
|
288
|
+
},
|
|
289
|
+
},
|
|
260
290
|
})
|
|
261
|
-
|
|
291
|
+
```
|
|
262
292
|
|
|
263
293
|
### Using the Plugin
|
|
264
294
|
|
|
@@ -31,19 +31,22 @@ The `viteMdPlugin` is built on top of the following plugins:
|
|
|
31
31
|
| `@md-plugins/md-plugin-inlinecode` | Adds a custom class to inline code blocks for styling. | [README](packages/md-plugin-inlinecode/README.md) | [Docs](/md-plugins/inline-code/overview) |
|
|
32
32
|
| `@md-plugins/md-plugin-imports` | Extracts and processes `<script import>` blocks from Markdown. | [README](packages/md-plugin-imports/README.md) | [Docs](/md-plugins/imports/overview) |
|
|
33
33
|
| `@md-plugins/md-plugin-link` | Converts Markdown links into Vue components for SPA-friendly routing. | [README](packages/md-plugin-link/README.md) | [Docs](/md-plugins/link/overview) |
|
|
34
|
+
| `@md-plugins/md-plugin-mermaid` | Renders Mermaid fenced code blocks as diagrams. | [README](packages/md-plugin-mermaid/README.md) | [Docs](/md-plugins/mermaid/overview) |
|
|
34
35
|
| `@md-plugins/md-plugin-table` | Adds custom classes and attributes to Markdown tables. | [README](packages/md-plugin-table/README.md) | [Docs](/md-plugins/table/overview) |
|
|
35
36
|
| `@md-plugins/md-plugin-title` | Extracts the first header in Markdown as the page title. | [README](packages/md-plugin-title/README.md) | [Docs](/md-plugins/title/overview) |
|
|
36
37
|
| `@md-plugins/md-plugin-frontmatter` | Extracts and processes frontmatter content from Markdown files. | [README](packages/md-plugin-frontmatter/README.md) | [Docs](/md-plugins/frontmatter/overview) |
|
|
37
38
|
| `@md-plugins/md-plugin-containers` | Adds custom containers for callouts, warnings, and more. | [README](packages/md-plugin-containers/README.md) | [Docs](/md-plugins/containers/overview) |
|
|
38
|
-
| `@md-plugins/shared` |
|
|
39
|
+
| `@md-plugins/shared` | Internal shared utilities and types used by the bundled plugins. | [README](packages/shared/README.md) | [Docs](/md-plugins/shared/overview) |
|
|
39
40
|
|
|
40
41
|
## Installation
|
|
41
42
|
|
|
42
|
-
You can install the Vite MD plugin using npm, yarn, or
|
|
43
|
+
You can install the Vite MD plugin using npm, yarn, pnpm, or bun. Choose your preferred method below:
|
|
43
44
|
|
|
44
45
|
```tabs
|
|
45
46
|
<<| bash pnpm |>>
|
|
46
47
|
pnpm add @md-plugins/vite-md-plugin
|
|
48
|
+
<<| bash bun |>>
|
|
49
|
+
bun add @md-plugins/vite-md-plugin
|
|
47
50
|
<<| bash yarn |>>
|
|
48
51
|
yarn add @md-plugins/vite-md-plugin
|
|
49
52
|
<<| bash npm |>>
|
|
@@ -136,7 +139,7 @@ The `viteMdPlugin` accepts the following parameters:
|
|
|
136
139
|
|
|
137
140
|
The `menu` parameter should conform to the following structure:
|
|
138
141
|
|
|
139
|
-
```typescript
|
|
142
|
+
```typescript [twoslash]
|
|
140
143
|
export interface MenuItem {
|
|
141
144
|
name: string
|
|
142
145
|
path?: string
|
|
@@ -149,6 +152,19 @@ export interface MenuItem {
|
|
|
149
152
|
external?: boolean
|
|
150
153
|
expanded?: boolean
|
|
151
154
|
}
|
|
155
|
+
|
|
156
|
+
const menu = [
|
|
157
|
+
{
|
|
158
|
+
name: 'Getting Started',
|
|
159
|
+
children: [{ name: 'Introduction', path: '/getting-started/introduction' }],
|
|
160
|
+
},
|
|
161
|
+
] satisfies MenuItem[]
|
|
162
|
+
|
|
163
|
+
const firstMenuItem = menu[0]
|
|
164
|
+
// ^?
|
|
165
|
+
|
|
166
|
+
type FirstMenuItem = (typeof menu)[number]
|
|
167
|
+
// ^?
|
|
152
168
|
```
|
|
153
169
|
|
|
154
170
|
## Testing
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { fabGithub, fabXTwitter } from '@quasar/extras/fontawesome-
|
|
2
|
-
import { slugify } from '@md-plugins/shared'
|
|
1
|
+
import { fabGithub, fabXTwitter } from '@quasar/extras/fontawesome-v7'
|
|
3
2
|
import { version, productName } from '../../package.json'
|
|
3
|
+
import { slugify } from '../.q-press/components/markdown-utils'
|
|
4
4
|
|
|
5
5
|
export interface SocialLink {
|
|
6
6
|
name: string
|
|
@@ -70,6 +70,19 @@ export interface PrivacyConfig {
|
|
|
70
70
|
link: string
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
+
export interface CodepenConfig {
|
|
74
|
+
cssExternal?: string[]
|
|
75
|
+
jsExternal?: string[]
|
|
76
|
+
jsSetup?: string
|
|
77
|
+
jsPreProcessor?: string
|
|
78
|
+
titleSuffix?: string
|
|
79
|
+
head?: string
|
|
80
|
+
globalPackages?: {
|
|
81
|
+
packageName: string
|
|
82
|
+
globalName: string
|
|
83
|
+
}[]
|
|
84
|
+
}
|
|
85
|
+
|
|
73
86
|
export interface SiteConfig {
|
|
74
87
|
lang: string
|
|
75
88
|
title: string
|
|
@@ -78,6 +91,8 @@ export interface SiteConfig {
|
|
|
78
91
|
version: string
|
|
79
92
|
copyright: CopyrightConfig
|
|
80
93
|
githubEditRootSrc: string // src folder for github edit links (appended with 'markdown' and 'examples')
|
|
94
|
+
githubSourceRootSrc?: string // src folder for GitHub source links (appended with 'markdown' and 'examples')
|
|
95
|
+
codepen?: CodepenConfig
|
|
81
96
|
license: LicenseConfig
|
|
82
97
|
privacy: PrivacyConfig
|
|
83
98
|
logoConfig: LogoConfig
|
|
@@ -220,6 +235,13 @@ const mdPluginsMenu: SiteMenuItem = {
|
|
|
220
235
|
{ name: 'Advanced', path: '/md-plugins/link/advanced' },
|
|
221
236
|
],
|
|
222
237
|
},
|
|
238
|
+
{
|
|
239
|
+
name: 'Mermaid',
|
|
240
|
+
children: [
|
|
241
|
+
{ name: 'Overview', path: '/md-plugins/mermaid/overview' },
|
|
242
|
+
{ name: 'Advanced', path: '/md-plugins/mermaid/advanced' },
|
|
243
|
+
],
|
|
244
|
+
},
|
|
223
245
|
{
|
|
224
246
|
name: 'Table',
|
|
225
247
|
children: [
|
|
@@ -286,32 +308,39 @@ const QuasarAppExts: SiteMenuItem = {
|
|
|
286
308
|
],
|
|
287
309
|
}
|
|
288
310
|
|
|
289
|
-
const
|
|
290
|
-
name: '
|
|
311
|
+
const otherMenu: SiteMenuItem = {
|
|
312
|
+
name: 'Other',
|
|
291
313
|
mq: 1100, // media query breakpoint
|
|
292
314
|
children: [
|
|
315
|
+
{
|
|
316
|
+
name: 'Releases',
|
|
317
|
+
path: '/other/releases',
|
|
318
|
+
},
|
|
293
319
|
{
|
|
294
320
|
name: 'Upgrade Guide',
|
|
295
|
-
path: '/
|
|
321
|
+
path: '/other/upgrade-guide',
|
|
296
322
|
},
|
|
297
323
|
{
|
|
298
324
|
name: 'FAQ',
|
|
299
|
-
path: '/
|
|
325
|
+
path: '/other/faq',
|
|
300
326
|
},
|
|
301
327
|
{
|
|
302
|
-
name: '
|
|
303
|
-
path: '/
|
|
328
|
+
name: 'Contact',
|
|
329
|
+
path: '/other/contact',
|
|
304
330
|
},
|
|
305
|
-
],
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
const otherMenu: SiteMenuItem = {
|
|
309
|
-
name: 'Other',
|
|
310
|
-
mq: 1190, // media query breakpoint
|
|
311
|
-
children: [
|
|
312
331
|
{
|
|
313
|
-
name: '
|
|
314
|
-
|
|
332
|
+
name: 'Contributing',
|
|
333
|
+
children: [
|
|
334
|
+
{ name: 'Overview', path: '/other/contributing/overview' },
|
|
335
|
+
{
|
|
336
|
+
name: 'Bugs and Feature Requests',
|
|
337
|
+
path: '/other/contributing/bugs-and-feature-requests',
|
|
338
|
+
},
|
|
339
|
+
{ name: 'Packages', path: '/other/contributing/packages' },
|
|
340
|
+
{ name: 'Documentation', path: '/other/contributing/documentation' },
|
|
341
|
+
{ name: 'Call to Action', path: '/other/contributing/call-to-action' },
|
|
342
|
+
{ name: 'Sponsor', path: '/other/contributing/sponsor' },
|
|
343
|
+
],
|
|
315
344
|
},
|
|
316
345
|
],
|
|
317
346
|
}
|
|
@@ -337,11 +366,11 @@ const processedQuasarAppExts = {
|
|
|
337
366
|
children: QuasarAppExts.children ? QuasarAppExts.children.map(processMenuItem) : [],
|
|
338
367
|
}
|
|
339
368
|
|
|
340
|
-
const
|
|
341
|
-
name:
|
|
342
|
-
path: slugify(
|
|
369
|
+
const processedOtherMenu = {
|
|
370
|
+
name: otherMenu.name,
|
|
371
|
+
path: slugify(otherMenu.name),
|
|
343
372
|
expanded: false,
|
|
344
|
-
children:
|
|
373
|
+
children: otherMenu.children ? otherMenu.children.map(processMenuItem) : [],
|
|
345
374
|
}
|
|
346
375
|
|
|
347
376
|
const secondaryToolbarLinks = [
|
|
@@ -349,7 +378,6 @@ const secondaryToolbarLinks = [
|
|
|
349
378
|
mdPluginsMenu,
|
|
350
379
|
vitePluginsMenu,
|
|
351
380
|
QuasarAppExts,
|
|
352
|
-
guidesMenu,
|
|
353
381
|
otherMenu,
|
|
354
382
|
]
|
|
355
383
|
|
|
@@ -376,7 +404,7 @@ export const sidebar = [
|
|
|
376
404
|
processedMdPluginsMenu,
|
|
377
405
|
processedVitePluginsMenu,
|
|
378
406
|
processedQuasarAppExts,
|
|
379
|
-
|
|
407
|
+
processedOtherMenu,
|
|
380
408
|
]
|
|
381
409
|
|
|
382
410
|
const config = {
|
|
@@ -391,6 +419,7 @@ const config = {
|
|
|
391
419
|
line2: '',
|
|
392
420
|
} as CopyrightConfig,
|
|
393
421
|
githubEditRootSrc: 'https://github.com/md-plugins/md-plugins/edit/dev/packages/docs/src/',
|
|
422
|
+
githubSourceRootSrc: 'https://github.com/md-plugins/md-plugins/tree/dev/packages/docs/src/',
|
|
394
423
|
license: {
|
|
395
424
|
label: 'MIT License',
|
|
396
425
|
link: 'https://github.com/md-plugins/md-plugins/blob/dev/LICENSE.md',
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"props": {
|
|
7
7
|
"code": {
|
|
8
8
|
"type": "String",
|
|
9
|
-
"desc": "The code to display",
|
|
9
|
+
"desc": "The code to display with Shiki syntax highlighting",
|
|
10
10
|
"examples": [
|
|
11
11
|
"'const a = 1;'",
|
|
12
12
|
"'<div>Hello World</div>'"
|
|
@@ -34,4 +34,4 @@
|
|
|
34
34
|
"category": "content"
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
|
-
}
|
|
37
|
+
}
|
|
@@ -4,18 +4,15 @@
|
|
|
4
4
|
"docsUrl": "https://path-to-your-docs/markdown-codepen"
|
|
5
5
|
},
|
|
6
6
|
"props": {
|
|
7
|
-
"
|
|
8
|
-
"type": "Boolean",
|
|
9
|
-
"desc": "Flag to indicate if the form should be active",
|
|
10
|
-
"category": "state"
|
|
11
|
-
},
|
|
12
|
-
"options": {
|
|
7
|
+
"title": {
|
|
13
8
|
"type": "String",
|
|
14
|
-
"desc": "
|
|
9
|
+
"desc": "Title used for the generated CodePen",
|
|
10
|
+
"required": true,
|
|
15
11
|
"examples": [
|
|
16
|
-
"'
|
|
12
|
+
"'Basic Example'",
|
|
13
|
+
"'Advanced Playground'"
|
|
17
14
|
],
|
|
18
15
|
"category": "content"
|
|
19
16
|
}
|
|
20
17
|
}
|
|
21
|
-
}
|
|
18
|
+
}
|
|
@@ -13,10 +13,35 @@
|
|
|
13
13
|
],
|
|
14
14
|
"category": "content"
|
|
15
15
|
},
|
|
16
|
+
"file": {
|
|
17
|
+
"type": "String",
|
|
18
|
+
"desc": "Vue example file name without the .vue extension",
|
|
19
|
+
"required": true,
|
|
20
|
+
"examples": [
|
|
21
|
+
"'Basic'",
|
|
22
|
+
"'AdvancedUsage'"
|
|
23
|
+
],
|
|
24
|
+
"category": "content"
|
|
25
|
+
},
|
|
26
|
+
"noEdit": {
|
|
27
|
+
"type": "Boolean",
|
|
28
|
+
"desc": "Hide the CodePen edit button",
|
|
29
|
+
"category": "behavior"
|
|
30
|
+
},
|
|
16
31
|
"noGithub": {
|
|
17
32
|
"type": "Boolean",
|
|
18
|
-
"desc": "
|
|
33
|
+
"desc": "Hide the GitHub source button",
|
|
34
|
+
"category": "behavior"
|
|
35
|
+
},
|
|
36
|
+
"scrollable": {
|
|
37
|
+
"type": "Boolean",
|
|
38
|
+
"desc": "Constrain the example content to a scrollable area",
|
|
39
|
+
"category": "content"
|
|
40
|
+
},
|
|
41
|
+
"overflow": {
|
|
42
|
+
"type": "Boolean",
|
|
43
|
+
"desc": "Allow the example content to manage overflow automatically",
|
|
19
44
|
"category": "behavior"
|
|
20
45
|
}
|
|
21
46
|
}
|
|
22
|
-
}
|
|
47
|
+
}
|