@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.
Files changed (200) hide show
  1. package/LICENSE.md +21 -0
  2. package/README.md +230 -0
  3. package/old/prompts.js +44 -0
  4. package/old/uninstall.js +9 -0
  5. package/package.json +60 -0
  6. package/scripts/build.js +33 -0
  7. package/src/index.js +63 -0
  8. package/src/install.js +49 -0
  9. package/src/templates/.gitkeep +0 -0
  10. package/src/templates/init/src/_q-press/.gitkeep +0 -0
  11. package/src/templates/init/src/_q-press/api/components/DarkModeToggle.json +37 -0
  12. package/src/templates/init/src/_q-press/api/components/MarkdownApi.json +67 -0
  13. package/src/templates/init/src/_q-press/api/components/MarkdownApiEntry.json +76 -0
  14. package/src/templates/init/src/_q-press/api/components/MarkdownCardLink.json +28 -0
  15. package/src/templates/init/src/_q-press/api/components/MarkdownCardTitle.json +48 -0
  16. package/src/templates/init/src/_q-press/api/components/MarkdownCode.json +37 -0
  17. package/src/templates/init/src/_q-press/api/components/MarkdownCodePrism.json +29 -0
  18. package/src/templates/init/src/_q-press/api/components/MarkdownCodepen.json +21 -0
  19. package/src/templates/init/src/_q-press/api/components/MarkdownCopyButton.json +36 -0
  20. package/src/templates/init/src/_q-press/api/components/MarkdownDrawerSidebar.json +17 -0
  21. package/src/templates/init/src/_q-press/api/components/MarkdownDrawerToc.json +17 -0
  22. package/src/templates/init/src/_q-press/api/components/MarkdownExample.json +22 -0
  23. package/src/templates/init/src/_q-press/api/components/MarkdownHeader.json +28 -0
  24. package/src/templates/init/src/_q-press/api/components/MarkdownHeaderIconLinks.json +16 -0
  25. package/src/templates/init/src/_q-press/api/components/MarkdownHeaderMenu.json +77 -0
  26. package/src/templates/init/src/_q-press/api/components/MarkdownHeaderTextLinks.json +33 -0
  27. package/src/templates/init/src/_q-press/api/components/MarkdownInstallation.json +33 -0
  28. package/src/templates/init/src/_q-press/api/components/MarkdownLayout.json +52 -0
  29. package/src/templates/init/src/_q-press/api/components/MarkdownLink.json +23 -0
  30. package/src/templates/init/src/_q-press/api/components/MarkdownPage.json +71 -0
  31. package/src/templates/init/src/_q-press/api/components/MarkdownPageFooter.json +21 -0
  32. package/src/templates/init/src/_q-press/api/components/MarkdownPageSidebar.json +56 -0
  33. package/src/templates/init/src/_q-press/api/components/MarkdownPageToc.json +17 -0
  34. package/src/templates/init/src/_q-press/api/components/MarkdownPrerender.json +25 -0
  35. package/src/templates/init/src/_q-press/api/components/MarkdownTree.json +27 -0
  36. package/src/templates/init/src/_q-press/api/composables/dark.json +29 -0
  37. package/src/templates/init/src/_q-press/api/composables/scroll.json +34 -0
  38. package/src/templates/init/src/_q-press/assets/get-meta.ts +29 -0
  39. package/src/templates/init/src/_q-press/components/DarkModeToggle.vue +105 -0
  40. package/src/templates/init/src/_q-press/components/MarkdownApi.vue +588 -0
  41. package/src/templates/init/src/_q-press/components/MarkdownApiEntry.ts +594 -0
  42. package/src/templates/init/src/_q-press/components/MarkdownCardLink.vue +25 -0
  43. package/src/templates/init/src/_q-press/components/MarkdownCardTitle.vue +21 -0
  44. package/src/templates/init/src/_q-press/components/MarkdownCode.vue +25 -0
  45. package/src/templates/init/src/_q-press/components/MarkdownCodePrism.ts +36 -0
  46. package/src/templates/init/src/_q-press/components/MarkdownCodepen.vue +183 -0
  47. package/src/templates/init/src/_q-press/components/MarkdownCopyButton.vue +104 -0
  48. package/src/templates/init/src/_q-press/components/MarkdownExample.vue +221 -0
  49. package/src/templates/init/src/_q-press/components/MarkdownInstallation.vue +166 -0
  50. package/src/templates/init/src/_q-press/components/MarkdownLink.vue +38 -0
  51. package/src/templates/init/src/_q-press/components/MarkdownPrerender.ts +82 -0
  52. package/src/templates/init/src/_q-press/components/MarkdownTree.vue +105 -0
  53. package/src/templates/init/src/_q-press/components/markdown-utils.ts +105 -0
  54. package/src/templates/init/src/_q-press/composables/dark.ts +39 -0
  55. package/src/templates/init/src/_q-press/composables/scroll.ts +115 -0
  56. package/src/templates/init/src/_q-press/css/app.scss +662 -0
  57. package/src/templates/init/src/_q-press/css/fonts.scss +100 -0
  58. package/src/templates/init/src/_q-press/css/prism-theme.scss +298 -0
  59. package/src/templates/init/src/_q-press/css/themes/default.scss +68 -0
  60. package/src/templates/init/src/_q-press/css/themes/newspaper.scss +69 -0
  61. package/src/templates/init/src/_q-press/css/themes/sunrise.scss +67 -0
  62. package/src/templates/init/src/_q-press/css/themes/tawny.scss +69 -0
  63. package/src/templates/init/src/_q-press/layouts/MarkdownDrawerSidebar.vue +32 -0
  64. package/src/templates/init/src/_q-press/layouts/MarkdownDrawerToc.vue +37 -0
  65. package/src/templates/init/src/_q-press/layouts/MarkdownHeader.vue +412 -0
  66. package/src/templates/init/src/_q-press/layouts/MarkdownHeaderIconLinks.vue +31 -0
  67. package/src/templates/init/src/_q-press/layouts/MarkdownHeaderMenu.ts +93 -0
  68. package/src/templates/init/src/_q-press/layouts/MarkdownHeaderTextLinks.vue +37 -0
  69. package/src/templates/init/src/_q-press/layouts/MarkdownLayout.vue +239 -0
  70. package/src/templates/init/src/_q-press/layouts/MarkdownPage.vue +307 -0
  71. package/src/templates/init/src/_q-press/layouts/MarkdownPageFooter.vue +187 -0
  72. package/src/templates/init/src/_q-press/layouts/MarkdownPageSidebar.scss +54 -0
  73. package/src/templates/init/src/_q-press/layouts/MarkdownPageSidebar.ts +218 -0
  74. package/src/templates/init/src/_q-press/layouts/MarkdownPageToc.vue +23 -0
  75. package/src/templates/init/src/_q-press/layouts/MarkdownSearch.vue +449 -0
  76. package/src/templates/init/src/_q-press/stores/markdown.ts +101 -0
  77. package/src/templates/init/src/components/LandingPage/LandingPage.vue +341 -0
  78. package/src/templates/init/src/components/Releases/PackageReleases.vue +164 -0
  79. package/src/templates/init/src/components/Releases/PublicReleases.vue +149 -0
  80. package/src/templates/init/src/components/Releases/ReleasesAvailable.vue +74 -0
  81. package/src/templates/init/src/examples/QAvatar/BasicExample.vue +11 -0
  82. package/src/templates/init/src/markdown/__elements.md +548 -0
  83. package/src/templates/init/src/markdown/__elements2.md +347 -0
  84. package/src/templates/init/src/markdown/faq/best-practices.md +0 -0
  85. package/src/templates/init/src/markdown/faq/general.md +0 -0
  86. package/src/templates/init/src/markdown/faq/troubleshooting.md +0 -0
  87. package/src/templates/init/src/markdown/getting-started/introduction.md +67 -0
  88. package/src/templates/init/src/markdown/guides/contributing.md +101 -0
  89. package/src/templates/init/src/markdown/guides/faq.md +115 -0
  90. package/src/templates/init/src/markdown/guides/release-notes.md +0 -0
  91. package/src/templates/init/src/markdown/guides/style-guide.md +0 -0
  92. package/src/templates/init/src/markdown/landing-page.md +11 -0
  93. package/src/templates/init/src/markdown/listing.ts +3 -0
  94. package/src/templates/init/src/markdown/md-plugins/blockquote/advanced.md +83 -0
  95. package/src/templates/init/src/markdown/md-plugins/blockquote/overview.md +183 -0
  96. package/src/templates/init/src/markdown/md-plugins/codeblocks/advanced.md +210 -0
  97. package/src/templates/init/src/markdown/md-plugins/codeblocks/overview.md +616 -0
  98. package/src/templates/init/src/markdown/md-plugins/containers/advanced.md +301 -0
  99. package/src/templates/init/src/markdown/md-plugins/containers/overview.md +206 -0
  100. package/src/templates/init/src/markdown/md-plugins/frontmatter/advanced.md +164 -0
  101. package/src/templates/init/src/markdown/md-plugins/frontmatter/overview.md +131 -0
  102. package/src/templates/init/src/markdown/md-plugins/headers/advanced.md +236 -0
  103. package/src/templates/init/src/markdown/md-plugins/headers/overview.md +134 -0
  104. package/src/templates/init/src/markdown/md-plugins/image/advanced.md +114 -0
  105. package/src/templates/init/src/markdown/md-plugins/image/overview.md +124 -0
  106. package/src/templates/init/src/markdown/md-plugins/imports/advanced.md +105 -0
  107. package/src/templates/init/src/markdown/md-plugins/imports/overview.md +80 -0
  108. package/src/templates/init/src/markdown/md-plugins/inline-code/advanced.md +133 -0
  109. package/src/templates/init/src/markdown/md-plugins/inline-code/overview.md +101 -0
  110. package/src/templates/init/src/markdown/md-plugins/link/advanced.md +157 -0
  111. package/src/templates/init/src/markdown/md-plugins/link/overview.md +126 -0
  112. package/src/templates/init/src/markdown/md-plugins/shared/overview.md +175 -0
  113. package/src/templates/init/src/markdown/md-plugins/table/advanced.md +190 -0
  114. package/src/templates/init/src/markdown/md-plugins/table/overview.md +186 -0
  115. package/src/templates/init/src/markdown/md-plugins/title/advanced.md +88 -0
  116. package/src/templates/init/src/markdown/md-plugins/title/overview.md +99 -0
  117. package/src/templates/init/src/markdown/other/release-notes.md +12 -0
  118. package/src/templates/init/src/markdown/privacy-policy.md +12 -0
  119. package/src/templates/init/src/markdown/quasar-app-extensions/qpress/advanced.md +101 -0
  120. package/src/templates/init/src/markdown/quasar-app-extensions/qpress/components.md +69 -0
  121. package/src/templates/init/src/markdown/quasar-app-extensions/qpress/overview.md +254 -0
  122. package/src/templates/init/src/markdown/quasar-app-extensions/qpress/themes.md +4 -0
  123. package/src/templates/init/src/markdown/quasar-app-extensions/vitemdpluginappext/advanced.md +4 -0
  124. package/src/templates/init/src/markdown/quasar-app-extensions/vitemdpluginappext/overview.md +103 -0
  125. package/src/templates/init/src/markdown/vite-plugins/index.md +6 -0
  126. package/src/templates/init/src/markdown/vite-plugins/viteexamplesplugin/advanced.md +138 -0
  127. package/src/templates/init/src/markdown/vite-plugins/viteexamplesplugin/overview.md +88 -0
  128. package/src/templates/init/src/markdown/vite-plugins/vitemdplugin/advanced.md +226 -0
  129. package/src/templates/init/src/markdown/vite-plugins/vitemdplugin/index.md +6 -0
  130. package/src/templates/init/src/markdown/vite-plugins/vitemdplugin/overview.md +166 -0
  131. package/src/templates/init/src/q-press.globals.d.ts +36 -0
  132. package/src/templates/init/src/siteConfig/index.ts +440 -0
  133. package/src/templates/update/src/_q-press/.gitkeep +0 -0
  134. package/src/templates/update/src/_q-press/api/components/DarkModeToggle.json +37 -0
  135. package/src/templates/update/src/_q-press/api/components/MarkdownApi.json +67 -0
  136. package/src/templates/update/src/_q-press/api/components/MarkdownApiEntry.json +76 -0
  137. package/src/templates/update/src/_q-press/api/components/MarkdownCardLink.json +28 -0
  138. package/src/templates/update/src/_q-press/api/components/MarkdownCardTitle.json +48 -0
  139. package/src/templates/update/src/_q-press/api/components/MarkdownCode.json +37 -0
  140. package/src/templates/update/src/_q-press/api/components/MarkdownCodePrism.json +29 -0
  141. package/src/templates/update/src/_q-press/api/components/MarkdownCodepen.json +21 -0
  142. package/src/templates/update/src/_q-press/api/components/MarkdownCopyButton.json +36 -0
  143. package/src/templates/update/src/_q-press/api/components/MarkdownDrawerSidebar.json +17 -0
  144. package/src/templates/update/src/_q-press/api/components/MarkdownDrawerToc.json +17 -0
  145. package/src/templates/update/src/_q-press/api/components/MarkdownExample.json +22 -0
  146. package/src/templates/update/src/_q-press/api/components/MarkdownHeader.json +28 -0
  147. package/src/templates/update/src/_q-press/api/components/MarkdownHeaderIconLinks.json +16 -0
  148. package/src/templates/update/src/_q-press/api/components/MarkdownHeaderMenu.json +77 -0
  149. package/src/templates/update/src/_q-press/api/components/MarkdownHeaderTextLinks.json +33 -0
  150. package/src/templates/update/src/_q-press/api/components/MarkdownInstallation.json +33 -0
  151. package/src/templates/update/src/_q-press/api/components/MarkdownLayout.json +52 -0
  152. package/src/templates/update/src/_q-press/api/components/MarkdownLink.json +23 -0
  153. package/src/templates/update/src/_q-press/api/components/MarkdownPage.json +71 -0
  154. package/src/templates/update/src/_q-press/api/components/MarkdownPageFooter.json +21 -0
  155. package/src/templates/update/src/_q-press/api/components/MarkdownPageSidebar.json +56 -0
  156. package/src/templates/update/src/_q-press/api/components/MarkdownPageToc.json +17 -0
  157. package/src/templates/update/src/_q-press/api/components/MarkdownPrerender.json +25 -0
  158. package/src/templates/update/src/_q-press/api/components/MarkdownTree.json +27 -0
  159. package/src/templates/update/src/_q-press/api/composables/dark.json +29 -0
  160. package/src/templates/update/src/_q-press/api/composables/scroll.json +34 -0
  161. package/src/templates/update/src/_q-press/assets/get-meta.ts +29 -0
  162. package/src/templates/update/src/_q-press/components/DarkModeToggle.vue +105 -0
  163. package/src/templates/update/src/_q-press/components/MarkdownApi.vue +588 -0
  164. package/src/templates/update/src/_q-press/components/MarkdownApiEntry.ts +594 -0
  165. package/src/templates/update/src/_q-press/components/MarkdownCardLink.vue +25 -0
  166. package/src/templates/update/src/_q-press/components/MarkdownCardTitle.vue +21 -0
  167. package/src/templates/update/src/_q-press/components/MarkdownCode.vue +25 -0
  168. package/src/templates/update/src/_q-press/components/MarkdownCodePrism.ts +36 -0
  169. package/src/templates/update/src/_q-press/components/MarkdownCodepen.vue +183 -0
  170. package/src/templates/update/src/_q-press/components/MarkdownCopyButton.vue +104 -0
  171. package/src/templates/update/src/_q-press/components/MarkdownExample.vue +221 -0
  172. package/src/templates/update/src/_q-press/components/MarkdownInstallation.vue +166 -0
  173. package/src/templates/update/src/_q-press/components/MarkdownLink.vue +38 -0
  174. package/src/templates/update/src/_q-press/components/MarkdownPrerender.ts +82 -0
  175. package/src/templates/update/src/_q-press/components/MarkdownTree.vue +105 -0
  176. package/src/templates/update/src/_q-press/components/markdown-utils.ts +105 -0
  177. package/src/templates/update/src/_q-press/composables/dark.ts +39 -0
  178. package/src/templates/update/src/_q-press/composables/scroll.ts +115 -0
  179. package/src/templates/update/src/_q-press/css/app.scss +662 -0
  180. package/src/templates/update/src/_q-press/css/fonts.scss +100 -0
  181. package/src/templates/update/src/_q-press/css/prism-theme.scss +298 -0
  182. package/src/templates/update/src/_q-press/css/themes/default.scss +68 -0
  183. package/src/templates/update/src/_q-press/css/themes/newspaper.scss +69 -0
  184. package/src/templates/update/src/_q-press/css/themes/sunrise.scss +67 -0
  185. package/src/templates/update/src/_q-press/css/themes/tawny.scss +69 -0
  186. package/src/templates/update/src/_q-press/layouts/MarkdownDrawerSidebar.vue +32 -0
  187. package/src/templates/update/src/_q-press/layouts/MarkdownDrawerToc.vue +37 -0
  188. package/src/templates/update/src/_q-press/layouts/MarkdownHeader.vue +412 -0
  189. package/src/templates/update/src/_q-press/layouts/MarkdownHeaderIconLinks.vue +31 -0
  190. package/src/templates/update/src/_q-press/layouts/MarkdownHeaderMenu.ts +93 -0
  191. package/src/templates/update/src/_q-press/layouts/MarkdownHeaderTextLinks.vue +37 -0
  192. package/src/templates/update/src/_q-press/layouts/MarkdownLayout.vue +239 -0
  193. package/src/templates/update/src/_q-press/layouts/MarkdownPage.vue +307 -0
  194. package/src/templates/update/src/_q-press/layouts/MarkdownPageFooter.vue +187 -0
  195. package/src/templates/update/src/_q-press/layouts/MarkdownPageSidebar.scss +54 -0
  196. package/src/templates/update/src/_q-press/layouts/MarkdownPageSidebar.ts +218 -0
  197. package/src/templates/update/src/_q-press/layouts/MarkdownPageToc.vue +23 -0
  198. package/src/templates/update/src/_q-press/layouts/MarkdownSearch.vue +449 -0
  199. package/src/templates/update/src/_q-press/stores/markdown.ts +101 -0
  200. package/src/templates/update/src/q-press.globals.d.ts +36 -0
@@ -0,0 +1,88 @@
1
+ ---
2
+ title: Title Plugin Advanced Topics
3
+ desc: Title plugin advanced topics for Markdown.
4
+ ---
5
+
6
+ ## Title Plugin
7
+
8
+ The `title` plugin allows you to extract the title from your Markdown content and store it in the `env` object. This section will cover how the plugin works, the available options for customization, and examples of how to use it effectively.
9
+
10
+ ### Type Information
11
+
12
+ ```ts
13
+ import { PluginSimple } from 'markdown-it'
14
+
15
+ /**
16
+ * Get markdown page title info
17
+ *
18
+ * Extract it into env
19
+ */
20
+ declare const titlePlugin: PluginSimple
21
+
22
+ declare module '@md-plugins/shared' {
23
+ interface MarkdownItEnv {
24
+ /**
25
+ * The title that extracted by `md-plugin-title`
26
+ */
27
+ title?: string
28
+ heading?: boolean
29
+ }
30
+ }
31
+
32
+ export { titlePlugin }
33
+ ```
34
+
35
+ ### How It Works
36
+
37
+ The `title` plugin processes the tokens in your Markdown content, extracting the first `h1` tag and storing its content as the title in the `env` object. This helps manage the title of your Markdown content programmatically.
38
+
39
+ ### Default Behavior
40
+
41
+ By default, the `title` plugin extracts the content of the first `h1` tag and stores it in the `env.title` property. Here is an example of a Markdown file with a title:
42
+
43
+ ```markdown
44
+ # My Awesome Post
45
+
46
+ This is the content of my awesome post.
47
+ ```
48
+
49
+ ### Plugin Options
50
+
51
+ The `title` plugin does not provide any options for customization. It is designed to work out of the box with the default behavior.
52
+
53
+ ### Example Configuration
54
+
55
+ Here is an example of how you can use the `title` plugin:
56
+
57
+ ```typescript
58
+ import MarkdownIt from 'markdown-it'
59
+ import { titlePlugin } from '@md-plugins/md-plugin-title'
60
+
61
+ const md = new MarkdownIt()
62
+
63
+ md.use(titlePlugin)
64
+ ```
65
+
66
+ ### Using the Extracted Title
67
+
68
+ Once the title is extracted, it is stored in the `env.title` property. How you handle this data and send it to the front-end is up to you.
69
+
70
+ ### Integration with Frontmatter Plugin
71
+
72
+ If you are using the `frontmatter` plugin and one of the items in the frontmatter is `title:`, you do not need to use the `title` plugin. The `frontmatter` plugin will handle the extraction of the title for you. Here is an example of a Markdown file with frontmatter:
73
+
74
+ ```markdown
75
+ ---
76
+ title: My Awesome Post
77
+ date: 2023-10-01
78
+ tags: [markdown, title, plugin]
79
+ ---
80
+
81
+ This is the content of my awesome post.
82
+ ```
83
+
84
+ ### Conclusion
85
+
86
+ The `title` plugin is a simple yet powerful tool for extracting the title from your Markdown content. By storing the title in the `env` object, you can manage the title programmatically and use it in your front-end application. If you are using the `frontmatter` plugin with a `title` field, you do not need to use the `title` plugin. Experiment with different configurations and find the one that works best for you.
87
+
88
+ Happy coding!
@@ -0,0 +1,99 @@
1
+ ---
2
+ title: Title Plugin
3
+ desc: Title plugin for Markdown.
4
+ ---
5
+
6
+ Welcome to the Title Plugin documentation! This guide will provide you with an overview of the Title plugin and its features.
7
+
8
+ ## What is the Title Plugin?
9
+
10
+ The Title Plugin is a powerful tool that enhances the standard Markdown functionality by allowing you to extract and manage the title of your Markdown content. It integrates seamlessly with Markdown-It to provide a flexible and customizable way to handle titles in your Markdown files.
11
+
12
+ ## Key Features
13
+
14
+ - **Title Extraction**: Automatically extract the title from the first `h1` heading in your Markdown content.
15
+ - **Environment Integration**: Store the extracted title in the Markdown-It environment for easy access.
16
+
17
+ ## Examples
18
+
19
+ Here are some examples of what you can achieve with the Title Plugin:
20
+
21
+ ### Standard Title Extraction
22
+
23
+ ```markup
24
+ # My Document Title
25
+
26
+ This is the content of my document.
27
+ ```
28
+
29
+ ## Environment Variables
30
+
31
+ When using the Title plugin, the following variables are set in the env object:
32
+
33
+ - **title**: The extracted title from the first h1 heading in the Markdown content.
34
+ - **heading**: A boolean indicating whether a title was extracted.
35
+
36
+ ## Name
37
+
38
+ The official NPM name is `@md-plugins/md-plugin-title`.
39
+
40
+ ## Installation
41
+
42
+ You can install the Title plugin using npm, yarn, or pnpm. Choose your preferred method below:
43
+
44
+ ```tabs
45
+ <<| bash npm |>>
46
+ npm install @md-plugins/md-plugin-title
47
+ <<| bash yarn |>>
48
+ yarn add @md-plugins/md-plugin-title
49
+ <<| bash pnpm |>>
50
+ pnpm add @md-plugins/md-plugin-title
51
+ ```
52
+
53
+ ## Configuration
54
+
55
+ After installing the plugin, you need to configure it in your Markdown-It setup. Here's an example of how to do that:
56
+
57
+ ```javascript
58
+ import MarkdownIt from 'markdown-it'
59
+ import { titlePlugin } from '@md-plugins/md-plugin-title'
60
+
61
+ const md = new MarkdownIt()
62
+
63
+ md.use(titlePlugin)
64
+
65
+ // Now you can use the Title plugin in your Markdown content
66
+ const result = md.render('# My Document Title\n\nThis is the content of my document.')
67
+ console.log(result)
68
+ ```
69
+
70
+ ### Options
71
+
72
+ The Title plugin does not accept any options.
73
+
74
+ ## Advanced Configuration
75
+
76
+ For more advanced configurations, you can combine the Title plugin with other Markdown-It plugins to enhance your Markdown content further. Here's an example:
77
+
78
+ ```javascript
79
+ import MarkdownIt from 'markdown-it'
80
+ import { titlePlugin } from '@md-plugins/md-plugin-title'
81
+ import markdownItAnchor from 'markdown-it-anchor'
82
+ import markdownItToc from 'markdown-it-toc-done-right'
83
+
84
+ const md = new MarkdownIt()
85
+
86
+ md.use(titlePlugin).use(markdownItAnchor).use(markdownItToc)
87
+
88
+ // Now you can use the Title plugin along with other plugins in your Markdown content
89
+ const result = md.render(
90
+ '# My Document Title\n\n# Table of Contents\n\n[[toc]]\n\nThis is the content of my document.',
91
+ )
92
+ console.log(result)
93
+ ```
94
+
95
+ ## Support
96
+
97
+ If you have any questions or need assistance, please refer to the FAQ or reach out to our support team.
98
+
99
+ Happy coding!
@@ -0,0 +1,12 @@
1
+ ---
2
+ title: Release Notes
3
+ desc: The changelog for MD-Plugins packages.
4
+ ---
5
+
6
+ Release notes (with changelog) for MD-Plugins packages are available on [GitHub Releases](https://github.com/md-plugins/md-plugins/releases).
7
+
8
+ <!-- <script import>
9
+ import PublicReleases from 'components/Releases/PublicReleases.vue'
10
+ </script>
11
+
12
+ <PublicReleases /> -->
@@ -0,0 +1,12 @@
1
+ ---
2
+ title: Privacy Policy
3
+ desc: Markdown for your Quasar and Vue builds
4
+ editLink: false
5
+ fullscreen: true
6
+ ---
7
+
8
+ > _Privacy Policy_ of **@md-plugins**
9
+
10
+ ::: info
11
+ This Website collects some Personal Data from its Users.
12
+ :::
@@ -0,0 +1,101 @@
1
+ ---
2
+ title: Q-Press Advanced Topics
3
+ desc: Advanced Topics for the Q-Press App-Extension.
4
+ examples: QAvatar
5
+ related:
6
+ - vite-plugins/viteexamplesplugin/overview
7
+ ---
8
+
9
+ If you plan on having `api` and `examples` support in your markdown files, we will discuss making the necessary updates to support that. If you don't know what `api` and `examples` are, here are examples for Quasar's `QAvatar` component:
10
+
11
+ <script import>
12
+ import AvatarApi from 'quasar/dist/api/QAvatar.json'
13
+ </script>
14
+
15
+ <MarkdownApi :api="AvatarApi" name="QAvatar"/>
16
+
17
+ <MarkdownExample title="Title for example card" file="BasicExample" no-edit no-github/>
18
+
19
+ ## Usage
20
+
21
+ You will need to make sure you have the necessary components installed as outlined further down in the [Installation](#installation) section.
22
+
23
+ In your `src` folder, you should have an `examples` folder. Each child folder should be a topic, like a `QAvatar` folder. In this folder, you will add your examples.
24
+
25
+ In the `frontmatter` of your markdown file, you will need to specify the topic folder like so:
26
+
27
+ ```yaml
28
+ examples: QAvatar
29
+ ```
30
+
31
+ In your markdown file, you can add the following to create an `example` card:
32
+
33
+ ::: tip
34
+ The `file="BasicExample"` is the name of the Vue file (without extension) in the `examples/QAvatar` folder.
35
+ :::
36
+
37
+ ```markdown
38
+ <MarkdownExample title="Title for example card" file="BasicExample" no-edit no-github/>
39
+ ```
40
+
41
+ In your markdown file, you can add the following to create an `api` card:
42
+
43
+ ::: tip
44
+ The API format conforms to Quasar's API format.
45
+ We will touch on this at a later date.
46
+ :::
47
+
48
+ ```markdown
49
+ <script import >
50
+ import AvatarApi from 'quasar/dist/api/QAvatar.json'
51
+ </script>
52
+
53
+ <MarkdownApi :api="AvatarApi" name="QAvatar"/>
54
+ ```
55
+
56
+ ## viteExamplesPlugin
57
+
58
+ ### Installation
59
+
60
+ You can install the Vite Examples plugin using npm, yarn, or pnpm. Choose your preferred method below:
61
+
62
+ ```tabs
63
+ <<| bash npm |>>
64
+ npm install @md-plugins/vite-examples-plugin
65
+ <<| bash yarn |>>
66
+ yarn add @md-plugins/vite-examples-plugin
67
+ <<| bash pnpm |>>
68
+ pnpm add @md-plugins/vite-examples-plugin
69
+ ```
70
+
71
+ ### Quasar Configuration
72
+
73
+ To use the Vite Examples plugin with Quasar, you can extend the Vite configuration as follows:
74
+
75
+ ```ts
76
+ import { viteExamplesPlugin, viteManualChunks } from '@md-plugins/vite-examples-plugin'
77
+
78
+ extendViteConf(viteConf, { isClient }) {
79
+ if (ctx.prod && isClient) {
80
+ viteConf.build = viteConf.build || {}
81
+ viteConf.build.chunkSizeWarningLimit = 650
82
+ viteConf.build.rollupOptions = {
83
+ output: { manualChunks: viteManualChunks },
84
+ }
85
+ }
86
+ }
87
+
88
+ vitePlugins: [
89
+ viteExamplesPlugin({
90
+ isProd: ctx.prod,
91
+ path: ctx.appPaths.srcDir + '/examples',
92
+ }),
93
+ // other plugins...
94
+ ]
95
+ ```
96
+
97
+ ## Support
98
+
99
+ If you have any questions or need assistance, please refer to the FAQ or reach out to our support team.
100
+
101
+ Happy coding!
@@ -0,0 +1,69 @@
1
+ ---
2
+ title: Q-Press Components
3
+ desc: Components for Q-Press App-Extension for Quasar.
4
+ ---
5
+
6
+ Q-Press has a lot of components that can be used in your app. Under the hood, these components are being used by the system. But, if you find a way to make them useful, you will find the documentation for them below to be helpful.
7
+
8
+ ## Components
9
+
10
+ <script import>
11
+ import DarkModeToggleApi from 'src/.q-press/api/components/DarkModeToggle.json'
12
+ import MarkdownApiApi from 'src/.q-press/api/components/MarkdownApi.json'
13
+ import MarkdownCardLinkApi from 'src/.q-press/api/components/MarkdownCardLink.json'
14
+ import MarkdownCardTitleApi from 'src/.q-press/api/components/MarkdownCardTitle.json'
15
+ import MarkdownCodeApi from 'src/.q-press/api/components/MarkdownCode.json'
16
+ import MarkdownCodepenApi from 'src/.q-press/api/components/MarkdownCodepen.json'
17
+
18
+ import MarkdownCodePrismApi from 'src/.q-press/api/components/MarkdownCodePrism.json'
19
+ import MarkdownCopyButtonApi from 'src/.q-press/api/components/MarkdownCopyButton.json'
20
+ import MarkdownDrawerSidebarApi from 'src/.q-press/api/components/MarkdownDrawerSidebar.json'
21
+ import MarkdownDrawerTocApi from 'src/.q-press/api/components/MarkdownDrawerToc.json'
22
+
23
+ import MarkdownExampleApi from 'src/.q-press/api/components/MarkdownExample.json'
24
+ import MarkdownHeaderApi from 'src/.q-press/api/components/MarkdownHeader.json'
25
+ import MarkdownHeaderIconLinksApi from 'src/.q-press/api/components/MarkdownHeaderIconLinks.json'
26
+ import MarkdownHeaderMenuApi from 'src/.q-press/api/components/MarkdownHeaderMenu.json'
27
+ import MarkdownHeaderTextLinksApi from 'src/.q-press/api/components/MarkdownHeaderTextLinks.json'
28
+ import MarkdownInstallationApi from 'src/.q-press/api/components/MarkdownInstallation.json'
29
+
30
+ import MarkdownLayoutApi from 'src/.q-press/api/components/MarkdownLayout.json'
31
+ import MarkdownLinkApi from 'src/.q-press/api/components/MarkdownLink.json'
32
+ import MarkdownPageApi from 'src/.q-press/api/components/MarkdownPage.json'
33
+ import MarkdownPageFooterApi from 'src/.q-press/api/components/MarkdownPageFooter.json'
34
+ import MarkdownPageSidebarApi from 'src/.q-press/api/components/MarkdownPageSidebar.json'
35
+ import MarkdownPageTocApi from 'src/.q-press/api/components/MarkdownPageToc.json'
36
+
37
+ import MarkdownTreeApi from 'src/.q-press/api/components/MarkdownTree.json'
38
+ import MarkdownPrerenderApi from 'src/.q-press/api/components/MarkdownPrerender.json'
39
+
40
+ </script>
41
+
42
+ <MarkdownApi :api="DarkModeToggleApi" name="DarkModeToggle"/>
43
+ <MarkdownApi :api="MarkdownApiApi" name="MarkdownApi"/>
44
+ <MarkdownApi :api="MarkdownCardLinkApi" name="MarkdownCardLink"/>
45
+ <MarkdownApi :api="MarkdownCardTitleApi" name="MarkdownCardTitle"/>
46
+ <MarkdownApi :api="MarkdownCodeApi" name="MarkdownCode"/>
47
+ <MarkdownApi :api="MarkdownCodepenApi" name="MarkdownCodepen"/>
48
+
49
+ <MarkdownApi :api="MarkdownCodePrismApi" name="MarkdownCodePrism"/>
50
+ <MarkdownApi :api="MarkdownCopyButtonApi" name="MarkdownCopyButton"/>
51
+ <!-- No <MarkdownApi :api="MarkdownDrawerSidebarApi" name="MarkdownDrawerSidebar"/> -->
52
+ <!-- No <MarkdownApi :api="MarkdownDrawerTocApi" name="MarkdownDrawerToc"/> -->
53
+
54
+ <MarkdownApi :api="MarkdownExampleApi" name="MarkdownExample"/>
55
+ <MarkdownApi :api="MarkdownHeaderApi" name="MarkdownHeader"/>
56
+ <MarkdownApi :api="MarkdownHeaderIconLinksApi" name="MarkdownHeaderIconLinks"/>
57
+ <MarkdownApi :api="MarkdownHeaderMenuApi" name="MarkdownHeaderMenu"/>
58
+ <MarkdownApi :api="MarkdownHeaderTextLinksApi" name="MarkdownHeaderTextLinks"/>
59
+ <MarkdownApi :api="MarkdownInstallationApi" name="MarkdownInstallation"/>
60
+
61
+ <MarkdownApi :api="MarkdownLayoutApi" name="MarkdownLayout"/>
62
+ <MarkdownApi :api="MarkdownLinkApi" name="MarkdownLink"/>
63
+ <MarkdownApi :api="MarkdownPageApi" name="MarkdownPage"/>
64
+ <MarkdownApi :api="MarkdownPageFooterApi" name="MarkdownPageFooter"/>
65
+ <!-- No <MarkdownApi :api="MarkdownPageSidebarApi" name="MarkdownPageSidebar"/> -->
66
+ <!-- No <MarkdownApi :api="MarkdownPageTocApi" name="MarkdownPageToc"/> -->
67
+
68
+ <MarkdownApi :api="MarkdownPrerenderApi" name="MarkdownPrerender"/>
69
+ <MarkdownApi :api="MarkdownTreeApi" name="MarkdownTree"/>
@@ -0,0 +1,254 @@
1
+ ---
2
+ title: Q-Press
3
+ desc: Q-Press App-Extension for Quasar.
4
+ ---
5
+
6
+ The Q-Press App Extension is a powerful tool for Quasar developers that simplifies the integration of Markdown content into Quasar applications. It leverages the capabilities of Vite and various Markdown plugins to transform Markdown files into Vue components, enabling a seamless and efficient workflow for content management.
7
+
8
+ ::: warning
9
+ Q-Press is for Quasar Vite projects at this time. Typescript processing is also required. Do not use if you are using Webpack or have a Javascript-only project.
10
+ :::
11
+
12
+ ::: tip
13
+ This website is built with **Q-Press**! When you install the App-Extension, you will be able have this website up and running in minutes. Later, you can make adjustments to the `src/siteConfig` and add your own markdown files in the `src/markdown` folder to make it your own.
14
+ :::
15
+
16
+ ## Key Features
17
+
18
+ - **Markdown as Vue Components**: Transform Markdown files into Vue components, allowing you to write and manage content in Markdown while leveraging the power of Vue and Quasar.
19
+ - **Automatic Configuration**: Automatically configures your Quasar project to handle Markdown files, reducing the need for manual setup.
20
+ - **Seamless Integration**: Integrates with Quasar's build system and Vue Router, ensuring smooth navigation and rendering of Markdown content.
21
+ - **Customizable**: Provides options to customize the integration, allowing you to tailor the behavior to your specific needs.
22
+ - **Hot Module Replacement (HMR)**: Supports HMR for Markdown files, enabling a smooth development experience with instant updates.
23
+
24
+ ## Installation
25
+
26
+ To install the Q-Press App Extension, use the following command on your existing Quasar project:
27
+
28
+ ```bash
29
+ quasar ext add @md-plugins/q-press
30
+ ```
31
+
32
+ ### What Gets Installed
33
+
34
+ - **New Install:**
35
+ - `src/.q-press`
36
+ - `src/q-press.global.d.ts`
37
+ - `src/components`
38
+ - `src/markdown`
39
+ - `src/examples`
40
+ - `src/siteConfig`
41
+ - **Update Install:**
42
+ - `src/.q-press`
43
+ - `src/q-press.global.d.ts`
44
+
45
+ ### Additional Dependencies
46
+
47
+ 1. **Install `markdown-it` and `@types/markdown-it` in your project devDependencies:**
48
+
49
+ ```tabs
50
+ <<| bash npm |>>
51
+ npm i -D markdown-it @types/markdown-it
52
+ <<| bash yarn |>>
53
+ yarn add -D markdown-it @types/markdown-it
54
+ <<| bash pnpm |>>
55
+ pnpm i -D markdown-it @types/markdown-it
56
+ ```
57
+
58
+ 2. **Add `prismjs` to your project dependencies:**
59
+
60
+ ```tabs
61
+ <<| bash npm |>>
62
+ npm i prismjs
63
+ <<| bash yarn |>>
64
+ yarn add prismjs
65
+ <<| bash pnpm |>>
66
+ pnpm i prismjs
67
+ ```
68
+
69
+ ## Configuration
70
+
71
+ ### Modify `src/css/quasar.variables.scss`
72
+
73
+ Import a Q-Press theme (`default`, `sunrise`, `newspaper`, `tawny`, your own or a 3rd-party theme):
74
+
75
+ ```scss
76
+ @import '../.q-press/css/themes/sunrise.scss';
77
+ ```
78
+
79
+ ### Modify `src/css/app.scss`
80
+
81
+ Import Q-Press styles:
82
+
83
+ ```scss
84
+ @import '../.q-press/css/app.scss';
85
+ @import '../.q-press/css/fonts.scss';
86
+ @import '../.q-press/css/prism-theme.scss';
87
+ ```
88
+
89
+ ### Modify `quasar.config.ts`
90
+
91
+ ```typescript
92
+ import { defineConfig } from '#q-app/wrappers'
93
+ import type { Plugin } from 'vite'
94
+ import { viteMdPlugin, type MenuItem } from '@md-plugins/vite-md-plugin'
95
+
96
+ export default defineConfig(async (ctx) => {
97
+ // Dynamically import siteConfig
98
+ const siteConfig = await import('./src/siteConfig')
99
+ const { sidebar } = siteConfig.default
100
+
101
+ return {
102
+ build: {
103
+ vitePlugins: [
104
+ // add this plugin
105
+ [
106
+ viteMdPlugin,
107
+ {
108
+ path: ctx.appPaths.srcDir + '/markdown',
109
+ menu: sidebar as MenuItem[],
110
+ },
111
+ ],
112
+ // other plugins...
113
+ ],
114
+ },
115
+ }
116
+ })
117
+ ```
118
+
119
+ ### Modify `src/routes/routes.ts`
120
+
121
+ ```typescript
122
+ import mdPageList from 'src/markdown/listing'
123
+
124
+ const routes = [
125
+ {
126
+ path: '/',
127
+ component: () => import('src/.q-press/layouts/MarkdownLayout.vue'),
128
+ children: [
129
+ // Include the Landing Page route first
130
+ ...Object.entries(mdPageList)
131
+ .filter(([key]) => key.includes('landing-page.md'))
132
+ .map(([_key, component]) => ({
133
+ path: '',
134
+ name: 'Landing Page',
135
+ component,
136
+ meta: { fullscreen: true, dark: true },
137
+ })),
138
+
139
+ // Now include all other routes, excluding the landing-page
140
+ ...Object.keys(mdPageList)
141
+ .filter((key) => !key.includes('landing-page.md')) // Exclude duplicates
142
+ .map((key) => {
143
+ const acc = {
144
+ path: '',
145
+ component: mdPageList[key],
146
+ }
147
+
148
+ if (acc.path === '') {
149
+ // Remove '.md' from the end of the filename
150
+ const parts = key.substring(1, key.length - 3).split('/')
151
+ const len = parts.length
152
+ const path = parts[len - 2] === parts[len - 1] ? parts.slice(0, len - 1) : parts
153
+
154
+ acc.path = path.join('/')
155
+ }
156
+
157
+ return acc
158
+ }),
159
+ ],
160
+ },
161
+
162
+ // Always leave this as last one,
163
+ // but you can also remove it
164
+ {
165
+ path: '/:catchAll(.*)*',
166
+ component: () => import('pages/ErrorNotFound.vue'),
167
+ },
168
+ ]
169
+
170
+ export default routes
171
+ ```
172
+
173
+ ### Set Up for Dark Mode
174
+
175
+ Update your `App.vue`:
176
+
177
+ ```ts
178
+ <template>
179
+ <router-view />
180
+ </template>
181
+
182
+ <script setup lang="ts">
183
+ import { useDark } from 'src/.q-press/composables/dark'
184
+ const { initDark } = useDark()
185
+ initDark()
186
+ </script>
187
+ ```
188
+
189
+ ## FAQ
190
+
191
+ :::details Q. I have errors in my`routes.ts` file, what should I do?
192
+
193
+ **A.** You can remove the following line: `import type { RouteRecordRaw } from 'vue-router'` and also remove the `type` keyword from the `routes` variable (`: RouteRecordRaw[]`).
194
+ :::
195
+
196
+ :::details Q. I still see an error in my `routes.ts` file, for `_key`, what should I do?
197
+
198
+ **A.** In your `eslint.config.js` file, add/replace the following in your rules:
199
+
200
+ ```js
201
+ '@typescript-eslint/no-unused-vars': [
202
+ 'error',
203
+ {
204
+ argsIgnorePattern: '^_',
205
+ ignoreRestSiblings: true,
206
+ varsIgnorePattern: '^_',
207
+ },
208
+ ],
209
+ ```
210
+
211
+ :::
212
+
213
+ :::details Q. Every time I save a markdown file, `prettier` changes it so that it breaks. How can I prevent this?
214
+
215
+ **A.** This is both a `prettier` and `eslint` issue. In `eslint.config.js`, add the following to the top of the file, right after `export default [`:
216
+
217
+ ```js
218
+ {
219
+ /**
220
+ * Ignore the following files.
221
+ * Please note that pluginQuasar.configs.recommended() already ignores
222
+ * the "node_modules" folder for you (and all other Quasar project
223
+ * relevant folders and files).
224
+ *
225
+ * ESLint requires "ignores" key to be the only one in this object
226
+ */
227
+ ignores: ['eslint.config.js', '**/*.md', 'dist/**/*', 'node_modules'],
228
+ },
229
+ ```
230
+
231
+ If you don't have a `.prettierignore` file, create one in the root of your project and add the following:
232
+
233
+ ```bash
234
+ - Ignore all Markdown files:
235
+ \*_/_.md
236
+ ```
237
+
238
+ :::
239
+
240
+ ## Updating
241
+
242
+ When you update, only the `src/.q-press` folder will be updated as well as the file `src/q-press.global.d.ts`. If you want to re-install everything, just remove the `src/siteConfig` folder.
243
+
244
+ To make it easier to update, you can use the following command:
245
+
246
+ ```bash
247
+ quasar ext invoke @md-plugins/q-press
248
+ ```
249
+
250
+ Then select the `Overwrite All` option.
251
+
252
+ ---
253
+
254
+ Happy coding!
@@ -0,0 +1,4 @@
1
+ ---
2
+ title: Q-Press Themes
3
+ desc: Themes for Q-Press App-Extension for Quasar.
4
+ ---
@@ -0,0 +1,4 @@
1
+ ---
2
+ title: ViteMdPluginAppExt Advanced Topics
3
+ desc: Advanced Topics for the ViteMdPluginAppExt.
4
+ ---