@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,83 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Blockquote Plugin Advanced Topics
|
|
3
|
+
desc: Blockquote plugin advanced topics for Markdown.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Blockquote Plugin
|
|
7
|
+
|
|
8
|
+
The `blockquote` plugin allows you to add customizable CSS classes to blockquotes in your Markdown content. This section will cover the CSS used by the plugin and how you can customize the output with your own CSS.
|
|
9
|
+
|
|
10
|
+
### Type Information
|
|
11
|
+
|
|
12
|
+
```ts
|
|
13
|
+
import { PluginWithOptions } from 'markdown-it'
|
|
14
|
+
|
|
15
|
+
interface BlockquotePluginOptions {
|
|
16
|
+
/**
|
|
17
|
+
* The class for the blockquote
|
|
18
|
+
*
|
|
19
|
+
* @default 'markdown-blockquote'
|
|
20
|
+
*/
|
|
21
|
+
blockquoteClass?: string
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
declare const blockquotePlugin: PluginWithOptions<BlockquotePluginOptions>
|
|
25
|
+
|
|
26
|
+
export { type BlockquotePluginOptions, blockquotePlugin }
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### Default CSS
|
|
30
|
+
|
|
31
|
+
By default, the `blockquote` plugin applies the `.markdown-blockquote` CSS class to blockquotes. You can add this class in your CSS to customize the appearance of blockquotes.
|
|
32
|
+
|
|
33
|
+
```css
|
|
34
|
+
.markdown-blockquote {
|
|
35
|
+
font-size: 16px;
|
|
36
|
+
padding: 1em;
|
|
37
|
+
margin: 1em 0;
|
|
38
|
+
border-left: 4px solid #dfe2e5;
|
|
39
|
+
background-color: #f8f8f8;
|
|
40
|
+
border-radius: 4px;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.markdown-blockquote > p,
|
|
44
|
+
.markdown-blockquote > ul {
|
|
45
|
+
margin-bottom: 0;
|
|
46
|
+
}
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Customizing the CSS
|
|
50
|
+
|
|
51
|
+
You can customize the appearance of blockquotes by overriding the default CSS class. Here are some examples of how you can customize the blockquotes:
|
|
52
|
+
|
|
53
|
+
#### Example 1: Customizing the Border Color
|
|
54
|
+
|
|
55
|
+
```css
|
|
56
|
+
.markdown-blockquote {
|
|
57
|
+
border-left-color: #3498db; /* Change the border color to blue */
|
|
58
|
+
}
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
#### Example 2: Adding a Background Image
|
|
62
|
+
|
|
63
|
+
```css
|
|
64
|
+
.markdown-blockquote {
|
|
65
|
+
background-image: url('path/to/your/image.png');
|
|
66
|
+
background-size: cover;
|
|
67
|
+
background-repeat: no-repeat;
|
|
68
|
+
}
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
#### Example 3: Changing the Font Style
|
|
72
|
+
|
|
73
|
+
```css
|
|
74
|
+
.markdown-blockquote {
|
|
75
|
+
font-family: 'Courier New', Courier, monospace; /* Change the font style */
|
|
76
|
+
}
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### Conclusion
|
|
80
|
+
|
|
81
|
+
By customizing the CSS classes and creating different skins, you can tailor the appearance of blockquotes to match the style of your project. Experiment with different styles and find the one that works best for you.
|
|
82
|
+
|
|
83
|
+
Happy coding!
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Blockquote Plugin
|
|
3
|
+
desc: Blockquote plugin for Markdown.
|
|
4
|
+
# related:
|
|
5
|
+
# - md-plugins/codeblocks/overview
|
|
6
|
+
# - md-plugins/containers/overview
|
|
7
|
+
# - md-plugins/frontmatter/overview
|
|
8
|
+
# - md-plugins/headers/overview
|
|
9
|
+
# - md-plugins/image/overview
|
|
10
|
+
# - md-plugins/imports/overview
|
|
11
|
+
# - md-plugins/inline-code/overview
|
|
12
|
+
# - md-plugins/table/overview
|
|
13
|
+
# - md-plugins/link/overview
|
|
14
|
+
# - md-plugins/title/overview
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
Welcome to the Blockquote Plugin documentation! This guide will provide you with an overview of the Blockquote plugin and its features.
|
|
18
|
+
|
|
19
|
+
## What is the Blockquote Plugin?
|
|
20
|
+
|
|
21
|
+
The Blockquote Plugin is a powerful tool that enhances the standard blockquote functionality in Markdown. It allows you to create visually appealing and customizable blockquotes that can be used to highlight important information, quotes, or notes in your documentation.
|
|
22
|
+
|
|
23
|
+
## Key Features
|
|
24
|
+
|
|
25
|
+
- **Customizable Styles**: Apply custom styles to your blockquotes to match your documentation's theme.
|
|
26
|
+
- **Icons and Badges**: Add icons and badges to your blockquotes for better visual representation.
|
|
27
|
+
- **Nested Blockquotes**: Support for nested blockquotes to create complex structures.
|
|
28
|
+
- **Responsive Design**: Ensure your blockquotes look great on all devices.
|
|
29
|
+
|
|
30
|
+
## Examples
|
|
31
|
+
|
|
32
|
+
Here are some examples of what you can achieve with the Blockquote Plugin:
|
|
33
|
+
|
|
34
|
+
### Standard Blockquote
|
|
35
|
+
|
|
36
|
+
> This is a standard blockquote.
|
|
37
|
+
|
|
38
|
+
```markup
|
|
39
|
+
> This is a standard blockquote.
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Blockquote with Note
|
|
43
|
+
|
|
44
|
+
> **Note:** This is a blockquote with a note.
|
|
45
|
+
|
|
46
|
+
```markup
|
|
47
|
+
> **Note:** This is a blockquote with a note.
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### Blockquote with Warning
|
|
51
|
+
|
|
52
|
+
> **Warning:** This is a blockquote with a warning.
|
|
53
|
+
|
|
54
|
+
```markup
|
|
55
|
+
> **Warning:** This is a blockquote with a warning.
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Embedded Blockquote
|
|
59
|
+
|
|
60
|
+
> This is a blockquote with an embedded blockquote.
|
|
61
|
+
>
|
|
62
|
+
> > This is an embedded blockquote.
|
|
63
|
+
|
|
64
|
+
```markup
|
|
65
|
+
> This is a blockquote with an embedded blockquote.
|
|
66
|
+
>
|
|
67
|
+
> > This is an embedded blockquote.
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### Embedded Plugins
|
|
71
|
+
|
|
72
|
+
> This is a blockquote with other embedded plugins.
|
|
73
|
+
>
|
|
74
|
+
> This is an embedded `inlinecode`.
|
|
75
|
+
>
|
|
76
|
+
> This is an embedded [link](https://md-plugins.netlify.app).
|
|
77
|
+
>
|
|
78
|
+
> ::: tip
|
|
79
|
+
> This is an embedded container.
|
|
80
|
+
> :::
|
|
81
|
+
>
|
|
82
|
+
> ```js
|
|
83
|
+
> // This is an embedded codeblock.
|
|
84
|
+
> export function containersPlugin(
|
|
85
|
+
> md: MarkdownIt,
|
|
86
|
+
> containers: ContainerDetails[],
|
|
87
|
+
> createContainer: CreateContainerFn,
|
|
88
|
+
> ): void {
|
|
89
|
+
> ```
|
|
90
|
+
|
|
91
|
+
````markup
|
|
92
|
+
> This is a blockquote with other embedded plugins.
|
|
93
|
+
>
|
|
94
|
+
> This is an embedded `inlinecode`.
|
|
95
|
+
>
|
|
96
|
+
> This is an embedded [link](https://md-plugins.netlify.app).
|
|
97
|
+
>
|
|
98
|
+
> ::: tip
|
|
99
|
+
> This is an embedded container.
|
|
100
|
+
> :::
|
|
101
|
+
>
|
|
102
|
+
> ```js
|
|
103
|
+
> // This is an embedded codeblock.
|
|
104
|
+
> export function containersPlugin(
|
|
105
|
+
> md: MarkdownIt,
|
|
106
|
+
> containers: ContainerDetails[],
|
|
107
|
+
> createContainer: CreateContainerFn,
|
|
108
|
+
> ): void {
|
|
109
|
+
> ```
|
|
110
|
+
````
|
|
111
|
+
|
|
112
|
+
## Name
|
|
113
|
+
|
|
114
|
+
The official NPM name is `@md-plugins/md-plugin-blockquote`.
|
|
115
|
+
|
|
116
|
+
## Installation
|
|
117
|
+
|
|
118
|
+
You can install the Blockquote plugin using `npm`, `yarn`, or `pnpm`. Choose your preferred method below:
|
|
119
|
+
|
|
120
|
+
```tabs
|
|
121
|
+
<<| bash npm |>>
|
|
122
|
+
npm install @md-plugins/md-plugin-blockquote
|
|
123
|
+
<<| bash yarn |>>
|
|
124
|
+
yarn add @md-plugins/md-plugin-blockquote
|
|
125
|
+
<<| bash pnpm |>>
|
|
126
|
+
pnpm add @md-plugins/md-plugin-blockquote
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
## Configuration
|
|
130
|
+
|
|
131
|
+
After installing the plugin, you need to configure it in your Markdown-It setup. Here's an example of how to do that:
|
|
132
|
+
|
|
133
|
+
```javascript
|
|
134
|
+
import MarkdownIt from 'markdown-it'
|
|
135
|
+
import { blockquotePlugin } from '@md-plugins/md-plugin-blockquote'
|
|
136
|
+
|
|
137
|
+
const md = new MarkdownIt()
|
|
138
|
+
|
|
139
|
+
md.use(blockquotePlugin, {
|
|
140
|
+
blockquoteClass: 'custom-blockquote-class', // Optional: Customize the blockquote class
|
|
141
|
+
})
|
|
142
|
+
|
|
143
|
+
// Now you can use the Blockquote plugin in your Markdown content
|
|
144
|
+
const result = md.render('> This is a blockquote with custom styling.')
|
|
145
|
+
console.log(result)
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
### Options
|
|
149
|
+
|
|
150
|
+
The Blockquote plugin accepts the following options:
|
|
151
|
+
|
|
152
|
+
- **blockquoteClass**: A custom class to apply to blockquote elements. Default is `markdown-blockquote`.
|
|
153
|
+
|
|
154
|
+
## Advanced Configuration
|
|
155
|
+
|
|
156
|
+
For more advanced configurations, you can combine the Blockquote plugin with other Markdown-It plugins to enhance your Markdown content further. Here's an example:
|
|
157
|
+
|
|
158
|
+
```js
|
|
159
|
+
import MarkdownIt from 'markdown-it'
|
|
160
|
+
import { blockquotePlugin } from '@md-plugins/md-plugin-blockquote'
|
|
161
|
+
import markdownItAnchor from 'markdown-it-anchor'
|
|
162
|
+
import markdownItToc from 'markdown-it-toc-done-right'
|
|
163
|
+
|
|
164
|
+
const md = new MarkdownIt()
|
|
165
|
+
|
|
166
|
+
md.use(blockquotePlugin, {
|
|
167
|
+
blockquoteClass: 'custom-blockquote-class', // Custom class for blockquotes
|
|
168
|
+
})
|
|
169
|
+
.use(markdownItAnchor)
|
|
170
|
+
.use(markdownItToc)
|
|
171
|
+
|
|
172
|
+
// Now you can use the Blockquote plugin along with other plugins in your Markdown content
|
|
173
|
+
const result = md.render(
|
|
174
|
+
'# Table of Contents\n\n[[toc]]\n\n> This is a blockquote with custom styling.',
|
|
175
|
+
)
|
|
176
|
+
console.log(result)
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
## Support
|
|
180
|
+
|
|
181
|
+
If you have any questions or need assistance, please refer to the FAQ or reach out to our support team.
|
|
182
|
+
|
|
183
|
+
Happy coding!
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Codeblocks Plugin Advanced Topics
|
|
3
|
+
desc: Codeblocks plugin advanced topics for Markdown.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Codeblocks Plugin
|
|
7
|
+
|
|
8
|
+
The `codeblocks` plugin enhances code block rendering in your Markdown content. This section will cover the CSS used by the plugin, how you can customize the output with your own CSS, and the available options for configuring the plugin.
|
|
9
|
+
|
|
10
|
+
### Type Information
|
|
11
|
+
|
|
12
|
+
```ts
|
|
13
|
+
import { PluginWithOptions } from 'markdown-it'
|
|
14
|
+
|
|
15
|
+
interface Lang {
|
|
16
|
+
name: string
|
|
17
|
+
customCopy?: boolean
|
|
18
|
+
aliases?: string
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
interface CodeblockPluginOptions {
|
|
22
|
+
/**
|
|
23
|
+
* The default language to use if none is detected.
|
|
24
|
+
* @default 'markup'
|
|
25
|
+
*/
|
|
26
|
+
defaultLang?: string
|
|
27
|
+
/**
|
|
28
|
+
* The component used to wrap code blocks.
|
|
29
|
+
* @default 'markdown-prerender'
|
|
30
|
+
*/
|
|
31
|
+
containerComponent?: string
|
|
32
|
+
/**
|
|
33
|
+
* The component used to render the copy button.
|
|
34
|
+
* @default 'markdown-copy-button'
|
|
35
|
+
*/
|
|
36
|
+
copyButtonComponent?: string
|
|
37
|
+
/**
|
|
38
|
+
* The comonent name for the tab panel.
|
|
39
|
+
* @default 'q-tab-panel'
|
|
40
|
+
*/
|
|
41
|
+
tabPanelTagName?: string
|
|
42
|
+
/**
|
|
43
|
+
* The class(es) to be used with the tab panel.
|
|
44
|
+
* @default 'q-pa-none'
|
|
45
|
+
*/
|
|
46
|
+
tabPanelTagClass?: string
|
|
47
|
+
/**
|
|
48
|
+
* The class to be used for the pre tag.
|
|
49
|
+
* @default 'markdown-code'
|
|
50
|
+
*/
|
|
51
|
+
preClass?: string
|
|
52
|
+
/**
|
|
53
|
+
* The class to be used for the code tag (ok to be empty).
|
|
54
|
+
* @default ''
|
|
55
|
+
*/
|
|
56
|
+
codeClass?: string
|
|
57
|
+
/**
|
|
58
|
+
* An array of page scripts to be included.
|
|
59
|
+
*/
|
|
60
|
+
pageScripts?: string[]
|
|
61
|
+
/**
|
|
62
|
+
* Optional Prism languages configuration array. This allows you to override or add custom language definitions.
|
|
63
|
+
* Each item can have a `name`, optional `aliases`, and `customCopy` boolean.
|
|
64
|
+
*/
|
|
65
|
+
langList?: Lang[]
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
declare module '@md-plugins/shared' {
|
|
69
|
+
interface MarkdownItEnv {
|
|
70
|
+
/**
|
|
71
|
+
* An array of page script (import statements) to be included.
|
|
72
|
+
*/
|
|
73
|
+
pageScripts?: Set<string>
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
declare const codeblocksPlugin: PluginWithOptions<CodeblockPluginOptions>
|
|
78
|
+
|
|
79
|
+
export { type CodeblockPluginOptions, type Lang, codeblocksPlugin }
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### Default CSS
|
|
83
|
+
|
|
84
|
+
By default, the `codeblocks` plugin uses the `.markdown-code` CSS class to `<pre>` blocks. You can add this class in your CSS to customize the appearance of code blocks.
|
|
85
|
+
|
|
86
|
+
```css
|
|
87
|
+
.markdown-code {
|
|
88
|
+
font-size: 14px;
|
|
89
|
+
padding: 1em;
|
|
90
|
+
margin: 0;
|
|
91
|
+
border: 1px solid #dfe2e5;
|
|
92
|
+
color: #e6e6e6;
|
|
93
|
+
background-color: #121212;
|
|
94
|
+
border-radius: inherit;
|
|
95
|
+
overflow: auto;
|
|
96
|
+
border-color: rgba(255, 255, 255, 0.28);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.markdown-code code {
|
|
100
|
+
display: block;
|
|
101
|
+
padding: 16px;
|
|
102
|
+
width: fit-content;
|
|
103
|
+
min-width: 100%;
|
|
104
|
+
font-size: 14px;
|
|
105
|
+
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
|
|
106
|
+
line-height: 1.5em;
|
|
107
|
+
tab-size: 2;
|
|
108
|
+
text-align: left;
|
|
109
|
+
white-space: pre;
|
|
110
|
+
word-spacing: normal;
|
|
111
|
+
word-break: normal;
|
|
112
|
+
word-wrap: normal;
|
|
113
|
+
hyphens: none;
|
|
114
|
+
color: inherit;
|
|
115
|
+
background-color: inherit;
|
|
116
|
+
border-radius: inherit;
|
|
117
|
+
}
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
### Customizing the CSS
|
|
121
|
+
|
|
122
|
+
You can customize the appearance of code blocks by overriding the default CSS class. Here are some examples of how you can customize the code blocks:
|
|
123
|
+
|
|
124
|
+
#### Example 1: Customizing the Border Color
|
|
125
|
+
|
|
126
|
+
```css
|
|
127
|
+
.markdown-code {
|
|
128
|
+
border-color: #3498db; /* Change the border color to blue */
|
|
129
|
+
}
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
#### Example 2: Adding a Background Image
|
|
133
|
+
|
|
134
|
+
```css
|
|
135
|
+
.markdown-code {
|
|
136
|
+
background-image: url('path/to/your/image.png');
|
|
137
|
+
background-size: cover;
|
|
138
|
+
background-repeat: no-repeat;
|
|
139
|
+
}
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
#### Example 3: Changing the Font Style
|
|
143
|
+
|
|
144
|
+
```css
|
|
145
|
+
.markdown-code code {
|
|
146
|
+
font-family: 'Courier New', Courier, monospace; /* Change the font style */
|
|
147
|
+
}
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
### Plugin Options
|
|
151
|
+
|
|
152
|
+
The `codeblocks` plugin provides several options for customization. Here are the available options and their descriptions:
|
|
153
|
+
|
|
154
|
+
#### `defaultLang`
|
|
155
|
+
|
|
156
|
+
- **Type**: `string`
|
|
157
|
+
- **Default**: `'markup'`
|
|
158
|
+
- **Description**: The default language to use if none is detected.
|
|
159
|
+
|
|
160
|
+
#### `containerComponent`
|
|
161
|
+
|
|
162
|
+
- **Type**: `string`
|
|
163
|
+
- **Default**: `'markdown-prerender'`
|
|
164
|
+
- **Description**: The component used to wrap code blocks.
|
|
165
|
+
|
|
166
|
+
#### `copyButtonComponent`
|
|
167
|
+
|
|
168
|
+
- **Type**: `string`
|
|
169
|
+
- **Default**: `'markdown-copy-button'`
|
|
170
|
+
- **Description**: The component used to render the copy button.
|
|
171
|
+
|
|
172
|
+
#### `tabPanelTagName`
|
|
173
|
+
|
|
174
|
+
- **Type**: `string`
|
|
175
|
+
- **Default**: `'q-tab-panel'`
|
|
176
|
+
- **Description**: The component name for the tab panels.
|
|
177
|
+
|
|
178
|
+
#### `tabPanelTagClass`
|
|
179
|
+
|
|
180
|
+
- **Type**: `string`
|
|
181
|
+
- **Default**: `'q-pa-none'`
|
|
182
|
+
- **Description**: The class(es) to be used with the tab panels.
|
|
183
|
+
|
|
184
|
+
#### `preClass`
|
|
185
|
+
|
|
186
|
+
- **Type**: `string`
|
|
187
|
+
- **Default**: `'markdown-code'`
|
|
188
|
+
- **Description**: The class to be used for the `<pre>` tag.
|
|
189
|
+
|
|
190
|
+
#### `codeClass`
|
|
191
|
+
|
|
192
|
+
- **Type**: `string`
|
|
193
|
+
- **Default**: `''`
|
|
194
|
+
- **Description**: The class to be used for the `<code>` tag (ok to be empty).
|
|
195
|
+
|
|
196
|
+
#### `pageScripts`
|
|
197
|
+
|
|
198
|
+
- **Type**: `string[]`
|
|
199
|
+
- **Description**: An array of page scripts to be included.
|
|
200
|
+
|
|
201
|
+
#### `langList`
|
|
202
|
+
|
|
203
|
+
- **Type**: `Array<{ name: string; aliases?: string; customCopy?: boolean }>`
|
|
204
|
+
- **Description**: Optional Prism languages configuration array. This allows you to override or add custom language definitions. Each item can have a `name`, optional `aliases`, and `customCopy` boolean.
|
|
205
|
+
|
|
206
|
+
### Conclusion
|
|
207
|
+
|
|
208
|
+
By customizing the CSS classes and using the available plugin options, you can tailor the appearance and behavior of code blocks to match the style of your project. Experiment with different styles and configurations to find the one that works best for you.
|
|
209
|
+
|
|
210
|
+
Happy coding!
|