@md-plugins/quasar-app-extension-q-press 0.1.0-alpha.7 → 0.1.0-beta.1
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 +233 -1
- package/package.json +32 -26
- package/src/index.ts +70 -0
- package/src/install.ts +50 -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 +663 -0
- package/src/templates/init/src/_q-press/components/MarkdownApiEntry.ts +836 -0
- package/src/templates/init/src/_q-press/components/MarkdownCardLink.vue +25 -0
- package/src/templates/init/src/_q-press/components/MarkdownCardTitle.vue +27 -0
- package/src/templates/init/src/_q-press/components/MarkdownCode.vue +31 -0
- package/src/templates/init/src/_q-press/components/MarkdownCodePrism.ts +36 -0
- package/src/templates/init/src/_q-press/components/MarkdownCodepen.vue +194 -0
- package/src/templates/init/src/_q-press/components/MarkdownCopyButton.vue +107 -0
- package/src/templates/init/src/_q-press/components/MarkdownExample.vue +239 -0
- package/src/templates/init/src/_q-press/components/MarkdownLink.vue +42 -0
- package/src/templates/init/src/_q-press/components/MarkdownPrerender.ts +93 -0
- package/src/templates/init/src/_q-press/components/MarkdownTree.vue +108 -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 +142 -0
- package/src/templates/init/src/_q-press/css/app.scss +683 -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/mystic.scss +73 -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 +69 -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 +36 -0
- package/src/templates/init/src/_q-press/layouts/MarkdownHeaderMenu.ts +109 -0
- package/src/templates/init/src/_q-press/layouts/MarkdownHeaderTextLinks.vue +46 -0
- package/src/templates/init/src/_q-press/layouts/MarkdownLayout.vue +239 -0
- package/src/templates/init/src/_q-press/layouts/MarkdownPage.vue +330 -0
- package/src/templates/init/src/_q-press/layouts/MarkdownPageFooter.vue +199 -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 +360 -0
- package/src/templates/init/src/examples/QAvatar/BasicExample.vue +11 -0
- package/src/templates/init/src/markdown/__elements.md +542 -0
- package/src/templates/init/src/markdown/__elements2.md +355 -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/guides/upgrade-guide.md +92 -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 +707 -0
- package/src/templates/init/src/markdown/md-plugins/containers/advanced.md +329 -0
- package/src/templates/init/src/markdown/md-plugins/containers/overview.md +236 -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 +90 -0
- package/src/templates/init/src/markdown/md-plugins/headers/overview.md +140 -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 +76 -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 +195 -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 +8 -0
- package/src/templates/init/src/markdown/privacy-policy.md +10 -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 +67 -0
- package/src/templates/init/src/markdown/quasar-app-extensions/qpress/overview.md +299 -0
- package/src/templates/init/src/markdown/quasar-app-extensions/qpress/site-config.md +114 -0
- package/src/templates/init/src/markdown/quasar-app-extensions/qpress/themes.md +130 -0
- package/src/templates/init/src/markdown/quasar-app-extensions/vite-md-plugin-app-ext/advanced.md +4 -0
- package/src/templates/init/src/markdown/quasar-app-extensions/vite-md-plugin-app-ext/overview.md +110 -0
- package/src/templates/init/src/markdown/vite-plugins/index.md +6 -0
- package/src/templates/init/src/markdown/vite-plugins/vite-examples-plugin/advanced.md +138 -0
- package/src/templates/init/src/markdown/vite-plugins/vite-examples-plugin/overview.md +88 -0
- package/src/templates/init/src/markdown/vite-plugins/vite-md-plugin/advanced.md +289 -0
- package/src/templates/init/src/markdown/vite-plugins/vite-md-plugin/index.md +6 -0
- package/src/templates/init/src/markdown/vite-plugins/vite-md-plugin/overview.md +164 -0
- package/src/templates/init/src/q-press.globals.d.ts +36 -0
- package/src/templates/init/src/siteConfig/index.ts +438 -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 +663 -0
- package/src/templates/update/src/_q-press/components/MarkdownApiEntry.ts +836 -0
- package/src/templates/update/src/_q-press/components/MarkdownCardLink.vue +25 -0
- package/src/templates/update/src/_q-press/components/MarkdownCardTitle.vue +27 -0
- package/src/templates/update/src/_q-press/components/MarkdownCode.vue +31 -0
- package/src/templates/update/src/_q-press/components/MarkdownCodePrism.ts +36 -0
- package/src/templates/update/src/_q-press/components/MarkdownCodepen.vue +194 -0
- package/src/templates/update/src/_q-press/components/MarkdownCopyButton.vue +107 -0
- package/src/templates/update/src/_q-press/components/MarkdownExample.vue +239 -0
- package/src/templates/update/src/_q-press/components/MarkdownLink.vue +42 -0
- package/src/templates/update/src/_q-press/components/MarkdownPrerender.ts +93 -0
- package/src/templates/update/src/_q-press/components/MarkdownTree.vue +108 -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 +142 -0
- package/src/templates/update/src/_q-press/css/app.scss +683 -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/mystic.scss +73 -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 +69 -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 +36 -0
- package/src/templates/update/src/_q-press/layouts/MarkdownHeaderMenu.ts +109 -0
- package/src/templates/update/src/_q-press/layouts/MarkdownHeaderTextLinks.vue +46 -0
- package/src/templates/update/src/_q-press/layouts/MarkdownLayout.vue +239 -0
- package/src/templates/update/src/_q-press/layouts/MarkdownPage.vue +330 -0
- package/src/templates/update/src/_q-press/layouts/MarkdownPageFooter.vue +199 -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
- package/tsconfig.json +16 -0
- package/src/index.js +0 -40
- package/src/old/install.js +0 -9
- package/src/old/prompts.js +0 -44
- package/src/old/uninstall.js +0 -9
package/README.md
CHANGED
|
@@ -1,6 +1,238 @@
|
|
|
1
1
|
# Q-Press
|
|
2
2
|
|
|
3
|
-
The Ultimate Markdown Solution for Quasar Framework
|
|
3
|
+
The Ultimate Markdown Solution for the Quasar Framework.
|
|
4
|
+
|
|
5
|
+
See the [documentation](https://md-plugins.netlify.app/quasar-app-extensions/qpress/overview) for more information.
|
|
6
|
+
|
|
7
|
+
> Current beta release: `0.1.0-beta.1`.
|
|
8
|
+
>
|
|
9
|
+
> Q-Press currently targets Quasar Vite projects using `@quasar/app-vite` `>=3.0.0-beta.14`. TypeScript processing is required.
|
|
10
|
+
|
|
11
|
+
## Features
|
|
12
|
+
|
|
13
|
+
- **Markdown**
|
|
14
|
+
- **Dark Mode**
|
|
15
|
+
- **Landing Page**
|
|
16
|
+
- **Markdown Layouts**
|
|
17
|
+
- **Markdown Components**
|
|
18
|
+
- **siteConfig**
|
|
19
|
+
- **CSS Themes**
|
|
20
|
+
- **Automatic Routing**
|
|
21
|
+
|
|
22
|
+
## Installation
|
|
23
|
+
|
|
24
|
+
1. Install the **Q-Press** App-Ext
|
|
25
|
+
|
|
26
|
+
- `quasar ext add @md-plugins/q-press`
|
|
27
|
+
- Here is what gets installed on a **new** install:
|
|
28
|
+
- `src/.q-press`
|
|
29
|
+
- `src/q-press.globals.d.ts`
|
|
30
|
+
- `src/components`
|
|
31
|
+
- `src/markdown`
|
|
32
|
+
- `src/examples`
|
|
33
|
+
- `src/siteConfig`
|
|
34
|
+
- Here is what gets installed on an **update** install:
|
|
35
|
+
- `src/.q-press`
|
|
36
|
+
- `src/q-press.globals.d.ts`
|
|
37
|
+
|
|
38
|
+
2. Install `markdown-it` and `@types/markdown-it` in your project devDependencies
|
|
39
|
+
|
|
40
|
+
- `npm i -D markdown-it @types/markdown-it`
|
|
41
|
+
- `yarn add -D markdown-it @types/markdown-it`
|
|
42
|
+
- `pnpm i -D markdown-it @types/markdown-it`
|
|
43
|
+
|
|
44
|
+
3. Add `prismjs` to your project dependencies
|
|
45
|
+
|
|
46
|
+
- `npm i prismjs`
|
|
47
|
+
- `yarn add prismjs`
|
|
48
|
+
- `pnpm add prismjs`
|
|
49
|
+
|
|
50
|
+
## Modifications
|
|
51
|
+
|
|
52
|
+
1. Modify your `src/css/quasar.variables.scss`
|
|
53
|
+
|
|
54
|
+
- import a Q-Press theme (`default`, `sunrise`, `newspaper`, `tawny`, `mystic`, your own or a 3rd-party theme)
|
|
55
|
+
- ```ts
|
|
56
|
+
@import '../.q-press/css/themes/sunrise.scss';
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
2. Modify your `src/css/app.scss`
|
|
60
|
+
|
|
61
|
+
- import Q-Press styles
|
|
62
|
+
|
|
63
|
+
- ```scss
|
|
64
|
+
@import '../.q-press/css/app.scss';
|
|
65
|
+
@import '../.q-press/css/fonts.scss';
|
|
66
|
+
@import '../.q-press/css/prism-theme.scss';
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
3. Modify your `quasar.config.ts`
|
|
70
|
+
|
|
71
|
+
- ```ts
|
|
72
|
+
import { viteMdPlugin, type MenuItem, type MarkdownOptions } from '@md-plugins/vite-md-plugin'
|
|
73
|
+
|
|
74
|
+
export default defineConfig(async (ctx) => {
|
|
75
|
+
// Dynamically import siteConfig
|
|
76
|
+
const siteConfig = await import('./src/siteConfig')
|
|
77
|
+
const { sidebar } = siteConfig.default
|
|
78
|
+
return {
|
|
79
|
+
build: {
|
|
80
|
+
vitePlugins: [
|
|
81
|
+
// add this plugin
|
|
82
|
+
[
|
|
83
|
+
viteMdPlugin,
|
|
84
|
+
{
|
|
85
|
+
path: ctx.appPaths.srcDir + '/markdown',
|
|
86
|
+
menu: sidebar as MenuItem[],
|
|
87
|
+
// options: myOptions as MarkdownOptions
|
|
88
|
+
},
|
|
89
|
+
],
|
|
90
|
+
// ...
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
4. Modify your `src/routes/routes.ts`
|
|
94
|
+
|
|
95
|
+
- ```ts
|
|
96
|
+
import type { RouteRecordRaw } from 'vue-router'
|
|
97
|
+
import mdPageList from 'src/markdown/listing'
|
|
98
|
+
const routes = [
|
|
99
|
+
{
|
|
100
|
+
path: '/',
|
|
101
|
+
component: () => import('src/.q-press/layouts/MarkdownLayout.vue'),
|
|
102
|
+
children: [
|
|
103
|
+
// Include the Landing Page route first
|
|
104
|
+
...Object.entries(mdPageList)
|
|
105
|
+
.filter(([key]) => key.includes('landing-page.md'))
|
|
106
|
+
.map(([_key, component]) => ({
|
|
107
|
+
path: '',
|
|
108
|
+
name: 'Landing Page',
|
|
109
|
+
component,
|
|
110
|
+
meta: { fullscreen: true, dark: true },
|
|
111
|
+
})),
|
|
112
|
+
|
|
113
|
+
// Now include all other routes, excluding the landing-page
|
|
114
|
+
...Object.keys(mdPageList)
|
|
115
|
+
.filter((key) => !key.includes('landing-page.md')) // Exclude duplicates
|
|
116
|
+
.map((key) => {
|
|
117
|
+
const acc = {
|
|
118
|
+
path: '',
|
|
119
|
+
component: mdPageList[key],
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
if (acc.path === '') {
|
|
123
|
+
// Remove '.md' from the end of the filename
|
|
124
|
+
const parts = key.substring(1, key.length - 3).split('/')
|
|
125
|
+
const len = parts.length
|
|
126
|
+
const path = parts[len - 2] === parts[len - 1] ? parts.slice(0, len - 1) : parts
|
|
127
|
+
|
|
128
|
+
acc.path = path.join('/')
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
return acc
|
|
132
|
+
}),
|
|
133
|
+
],
|
|
134
|
+
},
|
|
135
|
+
// Always leave this as last one,
|
|
136
|
+
// but you can also remove it
|
|
137
|
+
{
|
|
138
|
+
path: '/:catchAll(.*)*',
|
|
139
|
+
component: () => import('pages/ErrorNotFound.vue'),
|
|
140
|
+
},
|
|
141
|
+
] as RouteRecordRaw[]
|
|
142
|
+
|
|
143
|
+
export default routes
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
5. Set up for Dark mode support, update your App.vue
|
|
147
|
+
|
|
148
|
+
- ```ts
|
|
149
|
+
<template>
|
|
150
|
+
<router-view />
|
|
151
|
+
</template>
|
|
152
|
+
|
|
153
|
+
<script setup lang="ts">
|
|
154
|
+
import { useDark } from 'src/.q-press/composables/dark'
|
|
155
|
+
const { initDark } = useDark()
|
|
156
|
+
initDark()
|
|
157
|
+
</script>
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
## Running the App
|
|
161
|
+
|
|
162
|
+
This is a Quasar app, so all you have to do is run `quasar dev`. You can test it out now and you will have the `MD-Plugins` web site running.
|
|
163
|
+
|
|
164
|
+
All you need to do now is change the configuration and landing page to make it your own.
|
|
165
|
+
|
|
166
|
+
## Configuration
|
|
167
|
+
|
|
168
|
+
### Modify `src/siteConfig/index.ts`
|
|
169
|
+
|
|
170
|
+
1. Make any appropriate changes to the `siteConfig.ts` file
|
|
171
|
+
|
|
172
|
+
### Modify `src/components/LandingPage/LandingPage.vue`
|
|
173
|
+
|
|
174
|
+
1. Update the `LandingPage.vue` file to include your own content
|
|
175
|
+
|
|
176
|
+
---
|
|
177
|
+
|
|
178
|
+
## FAQ
|
|
179
|
+
|
|
180
|
+
Q. I have errors in my `routes.ts` file, what should I do?
|
|
181
|
+
A. You can remove the following line: `import type { RouteRecordRaw } from 'vue-router'` and also remove the `type` keyword from the `routes` variable (`: RouteRecordRaw[]`).
|
|
182
|
+
|
|
183
|
+
Q. I still see an error in my `routes.ts` file, for `_key`, what should I do?
|
|
184
|
+
A. In your `eslint.config.js` file, add/replace the following in your rules:
|
|
185
|
+
|
|
186
|
+
```js
|
|
187
|
+
'@typescript-eslint/no-unused-vars': [
|
|
188
|
+
'error',
|
|
189
|
+
{
|
|
190
|
+
argsIgnorePattern: '^_',
|
|
191
|
+
ignoreRestSiblings: true,
|
|
192
|
+
varsIgnorePattern: '^_',
|
|
193
|
+
},
|
|
194
|
+
],
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
Q. Every time I save a markdown file, `prettier` changes it so that it breaks. How can I prevent this?
|
|
198
|
+
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 [`:
|
|
199
|
+
|
|
200
|
+
```js
|
|
201
|
+
{
|
|
202
|
+
/**
|
|
203
|
+
* Ignore the following files.
|
|
204
|
+
* Please note that pluginQuasar.configs.recommended() already ignores
|
|
205
|
+
* the "node_modules" folder for you (and all other Quasar project
|
|
206
|
+
* relevant folders and files).
|
|
207
|
+
*
|
|
208
|
+
* ESLint requires "ignores" key to be the only one in this object
|
|
209
|
+
*/
|
|
210
|
+
ignores: ['eslint.config.js', '**/*.md', 'dist/**/*', 'node_modules'],
|
|
211
|
+
},
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
If you don't have a `.prettierignore` file, create one and add the following:
|
|
215
|
+
|
|
216
|
+
```
|
|
217
|
+
# Ignore all Markdown files:
|
|
218
|
+
**/*.md
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
---
|
|
222
|
+
|
|
223
|
+
## Updating
|
|
224
|
+
|
|
225
|
+
When you update, only the `src/.q-press` folder will be updated as well as the file `src/q-press.globals.d.ts`. If you want to re-install everything, just remove the `src/siteConfig` folder.
|
|
226
|
+
|
|
227
|
+
To make it easier to update, you can use the following command:
|
|
228
|
+
|
|
229
|
+
```bash
|
|
230
|
+
quasar ext invoke @md-plugins/q-press
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
## Documentation
|
|
234
|
+
|
|
235
|
+
In case this README falls out of date, please refer to the [documentation](https://md-plugins.netlify.app/quasar-app-extensions/qpress/overview) for the latest information.
|
|
4
236
|
|
|
5
237
|
## License
|
|
6
238
|
|
package/package.json
CHANGED
|
@@ -1,57 +1,63 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@md-plugins/quasar-app-extension-q-press",
|
|
3
|
-
"version": "0.1.0-
|
|
3
|
+
"version": "0.1.0-beta.1",
|
|
4
4
|
"description": "QPress - The Ultimate Markdown Solution for Quasar Framework",
|
|
5
|
-
"author": "hawkeye64 <galbraith64@gmail.com>",
|
|
6
5
|
"keywords": [
|
|
7
|
-
"markdown-it",
|
|
8
|
-
"quasarframework",
|
|
9
|
-
"quasar",
|
|
10
6
|
"markdown",
|
|
7
|
+
"markdown-it",
|
|
11
8
|
"q-press",
|
|
9
|
+
"quasar",
|
|
10
|
+
"quasarframework",
|
|
12
11
|
"vite"
|
|
13
12
|
],
|
|
14
13
|
"homepage": "https://github.com/md-plugins",
|
|
15
14
|
"bugs": {
|
|
16
15
|
"url": "https://github.com/md-plugins/md-plugins/issues"
|
|
17
16
|
},
|
|
17
|
+
"license": "MIT",
|
|
18
|
+
"author": "hawkeye64 <galbraith64@gmail.com>",
|
|
18
19
|
"repository": {
|
|
19
20
|
"type": "git",
|
|
20
21
|
"url": "git+https://github.com/md-plugins/md-plugins.git"
|
|
21
22
|
},
|
|
22
|
-
"license": "MIT",
|
|
23
23
|
"type": "module",
|
|
24
|
-
"
|
|
25
|
-
|
|
26
|
-
"
|
|
27
|
-
"yarn": ">= 1.6.0"
|
|
24
|
+
"main": "src/index.ts",
|
|
25
|
+
"publishConfig": {
|
|
26
|
+
"access": "public"
|
|
28
27
|
},
|
|
29
28
|
"dependencies": {
|
|
30
|
-
"@
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"@md-plugins/md-plugin-
|
|
34
|
-
"@md-plugins/md-plugin-
|
|
35
|
-
"@md-plugins/md-plugin-
|
|
36
|
-
"@md-plugins/md-plugin-
|
|
37
|
-
"@md-plugins/md-plugin-
|
|
38
|
-
"@md-plugins/md-plugin-
|
|
39
|
-
"@md-plugins/md-plugin-
|
|
40
|
-
"@md-plugins/
|
|
41
|
-
"@md-plugins/md-plugin-
|
|
29
|
+
"@types/markdown-it": "^14.1.2",
|
|
30
|
+
"fs-extra": "^11.3.4",
|
|
31
|
+
"markdown-it": "^14.1.1",
|
|
32
|
+
"@md-plugins/md-plugin-blockquote": "0.1.0-beta.1",
|
|
33
|
+
"@md-plugins/md-plugin-codeblocks": "0.1.0-beta.1",
|
|
34
|
+
"@md-plugins/md-plugin-frontmatter": "0.1.0-beta.1",
|
|
35
|
+
"@md-plugins/md-plugin-image": "0.1.0-beta.1",
|
|
36
|
+
"@md-plugins/md-plugin-imports": "0.1.0-beta.1",
|
|
37
|
+
"@md-plugins/md-plugin-headers": "0.1.0-beta.1",
|
|
38
|
+
"@md-plugins/md-plugin-inlinecode": "0.1.0-beta.1",
|
|
39
|
+
"@md-plugins/md-plugin-containers": "0.1.0-beta.1",
|
|
40
|
+
"@md-plugins/md-plugin-table": "0.1.0-beta.1",
|
|
41
|
+
"@md-plugins/md-plugin-link": "0.1.0-beta.1",
|
|
42
|
+
"@md-plugins/shared": "0.1.0-beta.1",
|
|
43
|
+
"@md-plugins/md-plugin-title": "0.1.0-beta.1",
|
|
44
|
+
"@md-plugins/vite-md-plugin": "0.1.0-beta.1"
|
|
42
45
|
},
|
|
43
46
|
"devDependencies": {
|
|
47
|
+
"@quasar/app-vite": "3.0.0-beta.14",
|
|
44
48
|
"@types/markdown-it": "^14.1.2",
|
|
45
|
-
"
|
|
46
|
-
"vite": "^6.0.7"
|
|
49
|
+
"vite": "^8.0.3"
|
|
47
50
|
},
|
|
48
51
|
"peerDependencies": {
|
|
52
|
+
"@quasar/app-vite": ">=3.0.0-beta.14",
|
|
49
53
|
"markdown-it": "^14.1.0"
|
|
50
54
|
},
|
|
51
|
-
"
|
|
52
|
-
"
|
|
55
|
+
"engines": {
|
|
56
|
+
"node": ">=22.13",
|
|
57
|
+
"pnpm": ">=11.1.0"
|
|
53
58
|
},
|
|
54
59
|
"scripts": {
|
|
60
|
+
"build": "node ./scripts/build.js",
|
|
55
61
|
"test": "echo \"No test specified\" && exit 0"
|
|
56
62
|
}
|
|
57
63
|
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Quasar App Extension index/runner script
|
|
3
|
+
* (runs on each dev/build)
|
|
4
|
+
*
|
|
5
|
+
* Docs: https://quasar.dev/app-extensions/development-guide/index-api
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import { defineIndexScript } from '@quasar/app-vite'
|
|
9
|
+
|
|
10
|
+
// import fse from 'fs-extra'
|
|
11
|
+
// import { viteMdPlugin } from '@md-plugins/vite-md-plugin'
|
|
12
|
+
|
|
13
|
+
export default defineIndexScript((api) => {
|
|
14
|
+
// verify this is a Vite project
|
|
15
|
+
if (!api.hasVite) {
|
|
16
|
+
throw new Error('This extension requires Vite')
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
api.compatibleWith('quasar', '^2.0.0')
|
|
20
|
+
api.compatibleWith('@quasar/app-vite', '>=3.0.0-beta.14')
|
|
21
|
+
|
|
22
|
+
// here we extend /quasar.config, so we can add some Vite/Vue stuff
|
|
23
|
+
api.extendQuasarConf(async (config) => {
|
|
24
|
+
config.build ??= {}
|
|
25
|
+
config.build.viteVuePluginOptions ??= {}
|
|
26
|
+
config.framework ??= {}
|
|
27
|
+
|
|
28
|
+
// make sure 'vueRouterMode' has 'history' mode
|
|
29
|
+
if (config.build.vueRouterMode !== 'history') {
|
|
30
|
+
console.warn('Changing vueRouterMode to "history" - required for hash links to work correctly')
|
|
31
|
+
config.build.vueRouterMode = 'history'
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// let Vite know to transpile md files
|
|
35
|
+
const include = config.build.viteVuePluginOptions.include
|
|
36
|
+
if (Array.isArray(include)) {
|
|
37
|
+
include.push(/\.(vue|md)$/)
|
|
38
|
+
}
|
|
39
|
+
else if (include !== void 0) {
|
|
40
|
+
config.build.viteVuePluginOptions.include = [include, /\.(vue|md)$/]
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
config.build.viteVuePluginOptions.include = [/\.(vue|md)$/]
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// let Vue know to auto import md files
|
|
47
|
+
const extensions = new Set(config.framework.autoImportVueExtensions || [])
|
|
48
|
+
extensions.add('md')
|
|
49
|
+
extensions.add('vue')
|
|
50
|
+
config.framework.autoImportVueExtensions = Array.from(extensions)
|
|
51
|
+
|
|
52
|
+
// add the appropriate plugins
|
|
53
|
+
const plugins = new Set(config.framework.plugins || [])
|
|
54
|
+
plugins.add('Cookies')
|
|
55
|
+
plugins.add('Dark')
|
|
56
|
+
plugins.add('Meta')
|
|
57
|
+
plugins.add('Notify')
|
|
58
|
+
config.framework.plugins = Array.from(plugins)
|
|
59
|
+
|
|
60
|
+
// const markdownPath = api.resolve.src('markdown')
|
|
61
|
+
// const path = api.resolve.src('siteConfig')
|
|
62
|
+
// if (fse.pathExistsSync(path) && fse.pathExistsSync(markdownPath)) {
|
|
63
|
+
// const siteConfig = await import(path)
|
|
64
|
+
// const { sidebar } = siteConfig.default || siteConfig
|
|
65
|
+
|
|
66
|
+
// // add vite-md-plugin to quasar.config.js
|
|
67
|
+
// config.vite.plugins.push(viteMdPlugin({ path: markdownPath, menu: sidebar }))
|
|
68
|
+
// }
|
|
69
|
+
})
|
|
70
|
+
})
|
package/src/install.ts
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Quasar App Extension install script
|
|
3
|
+
*
|
|
4
|
+
* Docs: https://quasar.dev/app-extensions/development-guide/install-api
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { defineInstallScript } from '@quasar/app-vite'
|
|
8
|
+
import { existsSync } from 'node:fs'
|
|
9
|
+
|
|
10
|
+
export default defineInstallScript(async (api) => {
|
|
11
|
+
// verify this is a Vite project
|
|
12
|
+
if (!api.hasVite) {
|
|
13
|
+
throw new Error('This extension requires Vite')
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
api.compatibleWith('quasar', '^2.0.0')
|
|
17
|
+
api.compatibleWith('@quasar/app-vite', '>=3.0.0-beta.14')
|
|
18
|
+
|
|
19
|
+
// project must have pinia installed
|
|
20
|
+
if ((await api.getStorePackageName()) !== 'pinia') {
|
|
21
|
+
console.error('-----------------------------')
|
|
22
|
+
console.error('This extension requires pinia')
|
|
23
|
+
console.error('-----------------------------')
|
|
24
|
+
throw new Error('This extension requires pinia')
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// project must be typescript
|
|
28
|
+
if ((await api.hasTypescript()) !== true) {
|
|
29
|
+
console.error('----------------------------------')
|
|
30
|
+
console.error('This extension requires TypeScript')
|
|
31
|
+
console.error('----------------------------------')
|
|
32
|
+
throw new Error('This extension requires TypeScript')
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const path = api.resolve.src('siteConfig')
|
|
36
|
+
if (existsSync(path)) {
|
|
37
|
+
// this is an update scenario
|
|
38
|
+
console.warn('-------------------------------------')
|
|
39
|
+
console.warn("Update only for 'src/.q-press' folder")
|
|
40
|
+
console.warn('-------------------------------------')
|
|
41
|
+
api.render('./templates/update')
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
// this is a project initial setup
|
|
45
|
+
console.warn('--------------------------------------------')
|
|
46
|
+
console.warn('Initial setup. Be sure to read the\ndocumentation on the manual set up required.')
|
|
47
|
+
console.warn('--------------------------------------------')
|
|
48
|
+
api.render('./templates/init')
|
|
49
|
+
}
|
|
50
|
+
})
|
|
File without changes
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "component",
|
|
3
|
+
"meta": {
|
|
4
|
+
"docsUrl": "https://path-to-your-docs/dark-mode-toggle"
|
|
5
|
+
},
|
|
6
|
+
"props": {
|
|
7
|
+
"darkIcon": {
|
|
8
|
+
"type": "String",
|
|
9
|
+
"desc": "Icon name for dark mode",
|
|
10
|
+
"examples": [
|
|
11
|
+
"mdiMoonWaningCrescent"
|
|
12
|
+
],
|
|
13
|
+
"default": "mdiMoonWaningCrescent",
|
|
14
|
+
"category": "content"
|
|
15
|
+
},
|
|
16
|
+
"lightIcon": {
|
|
17
|
+
"type": "String",
|
|
18
|
+
"desc": "Icon name for light mode",
|
|
19
|
+
"examples": [
|
|
20
|
+
"mdiWhiteBalanceSunny"
|
|
21
|
+
],
|
|
22
|
+
"default": "mdiWhiteBalanceSunny",
|
|
23
|
+
"category": "content"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"events": {
|
|
27
|
+
"update:mode": {
|
|
28
|
+
"desc": "Emitted when the mode is toggled",
|
|
29
|
+
"params": {
|
|
30
|
+
"mode": {
|
|
31
|
+
"type": "String",
|
|
32
|
+
"desc": "The current mode ('dark' or 'light')"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "component",
|
|
3
|
+
"meta": {
|
|
4
|
+
"docsUrl": "https://path-to-your-docs/markdown-api"
|
|
5
|
+
},
|
|
6
|
+
"props": {
|
|
7
|
+
"nameBanner": {
|
|
8
|
+
"type": "String",
|
|
9
|
+
"desc": "Title to display in the banner",
|
|
10
|
+
"examples": [
|
|
11
|
+
"'API Documentation'",
|
|
12
|
+
"'Component API'"
|
|
13
|
+
],
|
|
14
|
+
"category": "content"
|
|
15
|
+
},
|
|
16
|
+
"pageLink": {
|
|
17
|
+
"type": "String",
|
|
18
|
+
"desc": "URL for the page link",
|
|
19
|
+
"examples": [
|
|
20
|
+
"'https://github.com/user/repo/edit/main/docs/page.md'"
|
|
21
|
+
],
|
|
22
|
+
"category": "navigation"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"events": {
|
|
26
|
+
"searchFieldClick": {
|
|
27
|
+
"desc": "Emitted when the search field is clicked",
|
|
28
|
+
"params": {
|
|
29
|
+
"evt": {
|
|
30
|
+
"type": "Event",
|
|
31
|
+
"desc": "JS event object"
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"filterClick": {
|
|
36
|
+
"desc": "Emitted when the filter button is clicked",
|
|
37
|
+
"params": {
|
|
38
|
+
"evt": {
|
|
39
|
+
"type": "Event",
|
|
40
|
+
"desc": "JS event object"
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"methods": {
|
|
46
|
+
"onSearchFieldClick": {
|
|
47
|
+
"desc": "Handler for the search field click event",
|
|
48
|
+
"params": {
|
|
49
|
+
"evt": {
|
|
50
|
+
"type": "Event",
|
|
51
|
+
"desc": "JS event object"
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"returns": null
|
|
55
|
+
},
|
|
56
|
+
"onFilterClick": {
|
|
57
|
+
"desc": "Handler for the filter button click event",
|
|
58
|
+
"params": {
|
|
59
|
+
"evt": {
|
|
60
|
+
"type": "Event",
|
|
61
|
+
"desc": "JS event object"
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"returns": null
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "component",
|
|
3
|
+
"meta": {
|
|
4
|
+
"docsUrl": "https://path-to-your-docs/markdown-api-entry"
|
|
5
|
+
},
|
|
6
|
+
"functions": {
|
|
7
|
+
"getProp": {
|
|
8
|
+
"desc": "Function to get a property node for the API entry.",
|
|
9
|
+
"params": {
|
|
10
|
+
"openState": {
|
|
11
|
+
"type": "Object",
|
|
12
|
+
"desc": "The state object to manage open/close state of nodes."
|
|
13
|
+
},
|
|
14
|
+
"masterKey": {
|
|
15
|
+
"type": "String",
|
|
16
|
+
"desc": "The master key for the API entry."
|
|
17
|
+
},
|
|
18
|
+
"prop": {
|
|
19
|
+
"type": "Object",
|
|
20
|
+
"desc": "The property object to generate the node for."
|
|
21
|
+
},
|
|
22
|
+
"paramName": {
|
|
23
|
+
"type": "String",
|
|
24
|
+
"desc": "The name of the parameter."
|
|
25
|
+
},
|
|
26
|
+
"level": {
|
|
27
|
+
"type": "Number",
|
|
28
|
+
"desc": "The level of the property in the hierarchy."
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"returns": {
|
|
32
|
+
"type": "Array<VNode>",
|
|
33
|
+
"desc": "An array of VNode elements representing the property."
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"getDiv": {
|
|
37
|
+
"desc": "Function to create a div element for the API entry.",
|
|
38
|
+
"params": {
|
|
39
|
+
"cols": {
|
|
40
|
+
"type": "Number",
|
|
41
|
+
"desc": "The number of columns the div should span."
|
|
42
|
+
},
|
|
43
|
+
"label": {
|
|
44
|
+
"type": "String",
|
|
45
|
+
"desc": "The label for the div."
|
|
46
|
+
},
|
|
47
|
+
"key": {
|
|
48
|
+
"type": "String",
|
|
49
|
+
"desc": "The key for the div."
|
|
50
|
+
},
|
|
51
|
+
"children": {
|
|
52
|
+
"type": "Array<VNode>",
|
|
53
|
+
"desc": "The child nodes for the div."
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
"returns": {
|
|
57
|
+
"type": "VNode",
|
|
58
|
+
"desc": "A VNode element representing the div."
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
"getStringType": {
|
|
62
|
+
"desc": "Function to get the string representation of a type.",
|
|
63
|
+
"params": {
|
|
64
|
+
"type": {
|
|
65
|
+
"type": "Object",
|
|
66
|
+
"desc": "The type object to get the string representation for."
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"returns": {
|
|
70
|
+
"type": "String",
|
|
71
|
+
"desc": "The string representation of the type."
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"types": {}
|
|
76
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "component",
|
|
3
|
+
"meta": {
|
|
4
|
+
"docsUrl": "https://path-to-your-docs/markdown-card-link"
|
|
5
|
+
},
|
|
6
|
+
"props": {
|
|
7
|
+
"to": {
|
|
8
|
+
"type": "String",
|
|
9
|
+
"desc": "The target URL or path for the link",
|
|
10
|
+
"examples": [
|
|
11
|
+
"/home",
|
|
12
|
+
"https://example.com"
|
|
13
|
+
],
|
|
14
|
+
"required": true,
|
|
15
|
+
"category": "navigation"
|
|
16
|
+
},
|
|
17
|
+
"external": {
|
|
18
|
+
"type": "Boolean",
|
|
19
|
+
"desc": "Flag to indicate if the link is external",
|
|
20
|
+
"category": "navigation"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"slots": {
|
|
24
|
+
"default": {
|
|
25
|
+
"desc": "Slot for custom content inside the link"
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|