@md-plugins/quasar-app-extension-q-press 0.1.0-alpha.29 → 0.1.0-beta.0

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 (24) hide show
  1. package/README.md +9 -15
  2. package/package.json +26 -28
  3. package/src/index.js +5 -7
  4. package/src/install.js +7 -8
  5. package/src/templates/init/src/_q-press/components/MarkdownApi.vue +3 -3
  6. package/src/templates/init/src/_q-press/components/MarkdownExample.vue +3 -3
  7. package/src/templates/init/src/_q-press/layouts/MarkdownPage.vue +0 -1
  8. package/src/templates/init/src/_q-press/layouts/MarkdownPageFooter.vue +15 -3
  9. package/src/templates/init/src/_q-press/layouts/MarkdownSearch.vue +1 -1
  10. package/src/templates/init/src/markdown/guides/upgrade-guide.md +90 -0
  11. package/src/templates/init/src/markdown/md-plugins/codeblocks/overview.md +1 -1
  12. package/src/templates/init/src/markdown/other/release-notes.md +2 -0
  13. package/src/templates/init/src/markdown/quasar-app-extensions/qpress/overview.md +7 -7
  14. package/src/templates/init/src/markdown/quasar-app-extensions/vite-md-plugin-app-ext/overview.md +11 -4
  15. package/src/templates/init/src/markdown/vite-plugins/vite-examples-plugin/advanced.md +2 -2
  16. package/src/templates/init/src/markdown/vite-plugins/vite-examples-plugin/overview.md +1 -1
  17. package/src/templates/init/src/markdown/vite-plugins/vite-md-plugin/advanced.md +6 -9
  18. package/src/templates/init/src/markdown/vite-plugins/vite-md-plugin/overview.md +14 -17
  19. package/src/templates/init/src/siteConfig/index.ts +6 -1
  20. package/src/templates/update/src/_q-press/components/MarkdownApi.vue +3 -3
  21. package/src/templates/update/src/_q-press/components/MarkdownExample.vue +3 -3
  22. package/src/templates/update/src/_q-press/layouts/MarkdownPage.vue +0 -1
  23. package/src/templates/update/src/_q-press/layouts/MarkdownPageFooter.vue +15 -3
  24. package/src/templates/update/src/_q-press/layouts/MarkdownSearch.vue +1 -1
package/README.md CHANGED
@@ -4,6 +4,8 @@ The Ultimate Markdown Solution for the Quasar Framework.
4
4
 
5
5
  See the [documentation](https://md-plugins.netlify.app/quasar-app-extensions/qpress/overview) for more information.
6
6
 
7
+ > Q-Press currently targets Quasar Vite projects using `@quasar/app-vite` `^3.0.0-beta.12`. TypeScript processing is required.
8
+
7
9
  ## Features
8
10
 
9
11
  - **Markdown**
@@ -22,14 +24,14 @@ See the [documentation](https://md-plugins.netlify.app/quasar-app-extensions/qpr
22
24
  - `quasar ext add @md-plugins/q-press`
23
25
  - Here is what gets installed on a **new** install:
24
26
  - `src/.q-press`
25
- - `src/q-press.global.d.ts`
27
+ - `src/q-press.globals.d.ts`
26
28
  - `src/components`
27
29
  - `src/markdown`
28
30
  - `src/examples`
29
31
  - `src/siteConfig`
30
32
  - Here is what gets installed on an **update** install:
31
33
  - `src/.q-press`
32
- - `src/q-press.global.d.ts`
34
+ - `src/q-press.globals.d.ts`
33
35
 
34
36
  2. Install `markdown-it` and `@types/markdown-it` in your project devDependencies
35
37
 
@@ -70,7 +72,7 @@ See the [documentation](https://md-plugins.netlify.app/quasar-app-extensions/qpr
70
72
  export default defineConfig(async (ctx) => {
71
73
  // Dynamically import siteConfig
72
74
  const siteConfig = await import('./src/siteConfig')
73
- const { sidebar } = siteConfig
75
+ const { sidebar } = siteConfig.default
74
76
  return {
75
77
  build: {
76
78
  vitePlugins: [
@@ -131,7 +133,7 @@ See the [documentation](https://md-plugins.netlify.app/quasar-app-extensions/qpr
131
133
  // Always leave this as last one,
132
134
  // but you can also remove it
133
135
  {
134
- path: '/:catchAll(._)_',
136
+ path: '/:catchAll(.*)*',
135
137
  component: () => import('pages/ErrorNotFound.vue'),
136
138
  },
137
139
  ] as RouteRecordRaw[]
@@ -155,7 +157,7 @@ See the [documentation](https://md-plugins.netlify.app/quasar-app-extensions/qpr
155
157
 
156
158
  ## Running the App
157
159
 
158
- This is a Quasar app, so all you have to do is `quasar dev` and `quasar dev`. You can test it out now and you will have running the `MD-Plugins` web site.
160
+ 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.
159
161
 
160
162
  All you need to do now is change the configuration and landing page to make it your own.
161
163
 
@@ -190,7 +192,7 @@ A. In your `eslint.config.js` file, add/replace the following in your rules:
190
192
  ],
191
193
  ```
192
194
 
193
- Q. Everytime I save a markdown file, `prettier` changes it so that it breaks. How can I prevent this?
195
+ Q. Every time I save a markdown file, `prettier` changes it so that it breaks. How can I prevent this?
194
196
  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 [`:
195
197
 
196
198
  ```js
@@ -218,7 +220,7 @@ If you don't have a `.prettierignore` file, create one and add the following:
218
220
 
219
221
  ## Updating
220
222
 
221
- 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.
223
+ 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.
222
224
 
223
225
  To make it easier to update, you can use the following command:
224
226
 
@@ -233,11 +235,3 @@ In case this README falls out of date, please refer to the [documentation](https
233
235
  ## License
234
236
 
235
237
  This project is licensed under the MIT License. See the [LICENSE](LICENSE.md) file for details.
236
-
237
- ```
238
-
239
- ```
240
-
241
- ```
242
-
243
- ```
package/package.json CHANGED
@@ -1,58 +1,56 @@
1
1
  {
2
2
  "name": "@md-plugins/quasar-app-extension-q-press",
3
- "version": "0.1.0-alpha.29",
3
+ "version": "0.1.0-beta.0",
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
- "engines": {
25
- "node": ">= 12.2.0",
26
- "npm": ">= 5.6.0",
27
- "yarn": ">= 1.6.0"
24
+ "publishConfig": {
25
+ "access": "public"
28
26
  },
29
27
  "dependencies": {
30
28
  "@types/markdown-it": "^14.1.2",
31
- "markdown-it": "^14.1.0",
32
- "@md-plugins/md-plugin-blockquote": "0.1.0-alpha.29",
33
- "@md-plugins/md-plugin-codeblocks": "0.1.0-alpha.29",
34
- "@md-plugins/md-plugin-containers": "0.1.0-alpha.29",
35
- "@md-plugins/md-plugin-frontmatter": "0.1.0-alpha.29",
36
- "@md-plugins/md-plugin-headers": "0.1.0-alpha.29",
37
- "@md-plugins/md-plugin-image": "0.1.0-alpha.29",
38
- "@md-plugins/md-plugin-imports": "0.1.0-alpha.29",
39
- "@md-plugins/md-plugin-inlinecode": "0.1.0-alpha.29",
40
- "@md-plugins/md-plugin-link": "0.1.0-alpha.29",
41
- "@md-plugins/md-plugin-table": "0.1.0-alpha.29",
42
- "@md-plugins/shared": "0.1.0-alpha.29",
43
- "@md-plugins/md-plugin-title": "0.1.0-alpha.29",
44
- "@md-plugins/vite-md-plugin": "0.1.0-alpha.29"
29
+ "fs-extra": "^11.3.4",
30
+ "markdown-it": "^14.1.1",
31
+ "@md-plugins/md-plugin-blockquote": "0.1.0-beta.0",
32
+ "@md-plugins/md-plugin-containers": "0.1.0-beta.0",
33
+ "@md-plugins/md-plugin-codeblocks": "0.1.0-beta.0",
34
+ "@md-plugins/md-plugin-frontmatter": "0.1.0-beta.0",
35
+ "@md-plugins/md-plugin-image": "0.1.0-beta.0",
36
+ "@md-plugins/md-plugin-headers": "0.1.0-beta.0",
37
+ "@md-plugins/md-plugin-imports": "0.1.0-beta.0",
38
+ "@md-plugins/md-plugin-link": "0.1.0-beta.0",
39
+ "@md-plugins/md-plugin-inlinecode": "0.1.0-beta.0",
40
+ "@md-plugins/md-plugin-table": "0.1.0-beta.0",
41
+ "@md-plugins/md-plugin-title": "0.1.0-beta.0",
42
+ "@md-plugins/shared": "0.1.0-beta.0",
43
+ "@md-plugins/vite-md-plugin": "0.1.0-beta.0"
45
44
  },
46
45
  "devDependencies": {
47
46
  "@types/markdown-it": "^14.1.2",
48
- "fs-extra": "^11.3.0",
49
- "vite": "^6.1.0"
47
+ "vite": "^8.0.3"
50
48
  },
51
49
  "peerDependencies": {
52
50
  "markdown-it": "^14.1.0"
53
51
  },
54
- "publishConfig": {
55
- "access": "public"
52
+ "engines": {
53
+ "node": ">=20"
56
54
  },
57
55
  "scripts": {
58
56
  "build": "node ./scripts/build.js",
package/src/index.js CHANGED
@@ -1,4 +1,3 @@
1
- /*global console*/
2
1
  /**
3
2
  * Quasar App Extension index/runner script
4
3
  * (runs on each dev/build)
@@ -15,7 +14,7 @@ async function extendConfig(config /*, api*/) {
15
14
 
16
15
  // make sure 'vueRouterMode' has 'history' mode
17
16
  if (config.build.vueRouterMode !== 'history') {
18
- console.log('Changing vueRouterMode to "history" - required for hash links to work correctly')
17
+ console.warn('Changing vueRouterMode to "history" - required for hash links to work correctly')
19
18
  config.build.vueRouterMode = 'history'
20
19
  }
21
20
 
@@ -41,11 +40,10 @@ async function extendConfig(config /*, api*/) {
41
40
  // const path = api.resolve.src('siteConfig')
42
41
  // if (fse.pathExistsSync(path) && fse.pathExistsSync(markdownPath)) {
43
42
  // const siteConfig = await import(path)
44
- // const { sidebar } = siteConfig
43
+ // const { sidebar } = siteConfig.default || siteConfig
45
44
 
46
- // // viteMdPlugin(ctx.appPaths.srcDir + '/markdown', sidebar as MenuItem[]),
47
- // // add vite-md-plugin to quiasar.config.js
48
- // config.vite.plugins.push([viteMdPlugin, { path: markdownPath, menu: sidebar }])
45
+ // // add vite-md-plugin to quasar.config.js
46
+ // config.vite.plugins.push(viteMdPlugin({ path: markdownPath, menu: sidebar }))
49
47
  // }
50
48
  }
51
49
 
@@ -56,7 +54,7 @@ export default function (api) {
56
54
  }
57
55
 
58
56
  api.compatibleWith('quasar', '^2.0.0')
59
- api.compatibleWith('@quasar/app-vite', '^2.0.0')
57
+ api.compatibleWith('@quasar/app-vite', '^3.0.0-beta.12')
60
58
 
61
59
  // here we extend /quasar.config, so we can add some Vite/Vue stuff
62
60
  api.extendQuasarConf(extendConfig)
package/src/install.js CHANGED
@@ -1,4 +1,3 @@
1
- /*global console*/
2
1
  /**
3
2
  * Quasar App Extension install script
4
3
  *
@@ -14,7 +13,7 @@ export default async function (api) {
14
13
  }
15
14
 
16
15
  api.compatibleWith('quasar', '^2.0.0')
17
- api.compatibleWith('@quasar/app-vite', '^2.0.0')
16
+ api.compatibleWith('@quasar/app-vite', '^3.0.0-beta.12')
18
17
 
19
18
  // project must have pinia installed
20
19
  if ((await api.getStorePackageName()) !== 'pinia') {
@@ -35,15 +34,15 @@ export default async function (api) {
35
34
  const path = api.resolve.src('siteConfig')
36
35
  if (fse.pathExistsSync(path)) {
37
36
  // this is an update scenario
38
- console.log('-------------------------------------')
39
- console.log("Update only for 'src/.q-press' folder")
40
- console.log('-------------------------------------')
37
+ console.warn('-------------------------------------')
38
+ console.warn("Update only for 'src/.q-press' folder")
39
+ console.warn('-------------------------------------')
41
40
  api.render('./templates/update')
42
41
  } else {
43
42
  // this is a project initial setup
44
- console.log('--------------------------------------------')
45
- console.log('Initial setup. Be sure to read the\ndocumentation on the manual set up required.')
46
- console.log('--------------------------------------------')
43
+ console.warn('--------------------------------------------')
44
+ console.warn('Initial setup. Be sure to read the\ndocumentation on the manual set up required.')
45
+ console.warn('--------------------------------------------')
47
46
  api.render('./templates/init')
48
47
  }
49
48
  }
@@ -361,8 +361,8 @@ function getApiCount(parsedApi, tabs, innerTabs) {
361
361
  }
362
362
 
363
363
  const getJsonUrl =
364
- process.env.DEV === true
365
- ? (file) => `/@fs/${process.env.FS_QUASAR_FOLDER}/dist/api/${file}.json`
364
+ import.meta.env.QUASAR_DEV === true
365
+ ? (file) => `/@fs/${import.meta.env.QCLI_FS_QUASAR_FOLDER}/dist/api/${file}.json`
366
366
  : (file) => `/quasar-api/${file}.json`
367
367
 
368
368
  const props = defineProps({
@@ -466,7 +466,7 @@ function onFilterClick() {
466
466
  }
467
467
  }
468
468
 
469
- if (process.env.CLIENT) {
469
+ if (import.meta.env.QUASAR_CLIENT) {
470
470
  onMounted(() => {
471
471
  if (props.file) {
472
472
  fetch(getJsonUrl(props.file))
@@ -197,17 +197,17 @@ function toggleExpand() {
197
197
  expanded.value = expanded.value === false
198
198
  }
199
199
 
200
- if (process.env.CLIENT) {
200
+ if (import.meta.env.QUASAR_CLIENT) {
201
201
  onMounted(() => {
202
202
  examples.list.then((list) => {
203
203
  component.value = markRaw(
204
- process.env.DEV
204
+ import.meta.env.QUASAR_DEV
205
205
  ? list.code[`/src/examples/${examples.name}/${props.file}.vue`].default
206
206
  : list[props.file],
207
207
  )
208
208
 
209
209
  parseComponent(
210
- process.env.DEV
210
+ import.meta.env.QUASAR_DEV
211
211
  ? list.source[`/src/examples/${examples.name}/${props.file}.vue`]
212
212
  : list[`Raw${props.file}`],
213
213
  )
@@ -177,7 +177,6 @@ const tocClass = computed(
177
177
  () => `markdown-page__toc-container--${props.toc !== void 0 ? 'fixed' : 'flowing'}`,
178
178
  )
179
179
 
180
- console.log('MarkdownPage props', props)
181
180
  </script>
182
181
 
183
182
  <style lang="scss">
@@ -19,9 +19,14 @@
19
19
  :target="item.external ? '_blank' : void 0"
20
20
  class="markdown-layout__item"
21
21
  >
22
- <q-item-section v-if="item.image" class="letter-spacing-100"
23
- ><q-img :src="item.image" :style="{ maxWidth: item.maxWidth ?? '150px' }"
24
- /></q-item-section>
22
+ <q-item-section v-if="item.image" class="letter-spacing-100">
23
+ <img
24
+ :src="item.image"
25
+ :alt="item.name"
26
+ :style="{ maxWidth: item.maxWidth ?? '150px' }"
27
+ class="markdown-page-footer__image"
28
+ />
29
+ </q-item-section>
25
30
  <q-item-section v-else class="letter-spacing-100">{{ item.name }}</q-item-section>
26
31
  </q-item>
27
32
  </q-list>
@@ -105,6 +110,7 @@ function getMenu(path: string): SiteMenuItem[] {
105
110
  path: item.external === true ? item.path : `/${path}/${item.path}`,
106
111
  external: item.external,
107
112
  image: item.image ?? void 0,
113
+ maxWidth: item.maxWidth ?? void 0,
108
114
  } as SiteMenuItem)
109
115
  }
110
116
  }
@@ -140,6 +146,12 @@ const props = defineProps({
140
146
  font-size: ($font-size - 2px);
141
147
  }
142
148
 
149
+ &__image {
150
+ display: block;
151
+ height: auto;
152
+ width: 100%;
153
+ }
154
+
143
155
  &__nav {
144
156
  display: grid;
145
157
  grid-row-gap: 64px;
@@ -121,7 +121,7 @@ function fetchQuery (val, onResult, onError) {
121
121
  localRequestId === requestId && onError()
122
122
  })
123
123
 
124
- xhr.open('POST', `https://search.quasar.dev/indexes/${ process.env.SEARCH_INDEX }/search`)
124
+ xhr.open('POST', `https://search.quasar.dev/indexes/${import.meta.env.QCLI_SEARCH_INDEX}/search`)
125
125
  xhr.setRequestHeader('Content-Type', 'application/json')
126
126
  xhr.setRequestHeader('Authorization', 'Bearer b7a6ea9a9978a4e4d994c1f9451210327f207441adbcf04a4aada3d17d829359')
127
127
  xhr.send(data)
@@ -0,0 +1,90 @@
1
+ ---
2
+ title: Upgrade Guide
3
+ desc: Upgrade MD-Plugins and Q-Press to the 0.1.0 beta.
4
+ related:
5
+ - quasar-app-extensions/qpress/overview
6
+ - quasar-app-extensions/vite-md-plugin-app-ext/overview
7
+ - vite-plugins/vite-md-plugin/overview
8
+ ---
9
+
10
+ The `0.1.0` beta line moves MD-Plugins and Q-Press to the Quasar CLI Vite 3 beta toolchain. It is the right version to use when your Quasar application is being upgraded to `@quasar/app-vite` `^3.0.0-beta.12`.
11
+
12
+ ::: warning
13
+ Q-Press and the Quasar app extensions now target Quasar Vite projects using `@quasar/app-vite` `^3.0.0-beta.12`. They are not intended for Webpack projects or JavaScript-only Quasar projects.
14
+ :::
15
+
16
+ ## Before You Upgrade
17
+
18
+ - Make sure your app is already on a Quasar Vite setup.
19
+ - Upgrade the app to `@quasar/app-vite` `^3.0.0-beta.12` or newer in the same beta line.
20
+ - Use TypeScript in the consuming Quasar project.
21
+ - Commit or stash local changes before invoking Q-Press, because the update flow can overwrite files in `src/.q-press`.
22
+
23
+ ## Update Packages
24
+
25
+ For Q-Press projects, update the app extension package and then invoke it:
26
+
27
+ ```bash
28
+ pnpm up @md-plugins/quasar-app-extension-q-press@beta
29
+ quasar ext invoke @md-plugins/q-press
30
+ ```
31
+
32
+ When prompted, choose `Overwrite All` if you want the generated Q-Press files to match the beta templates.
33
+
34
+ For direct Vite plugin usage, update the packages you consume:
35
+
36
+ ```bash
37
+ pnpm up @md-plugins/vite-md-plugin@beta @md-plugins/vite-examples-plugin@beta
38
+ ```
39
+
40
+ ## File Name Check
41
+
42
+ Q-Press installs and updates this type shim:
43
+
44
+ ```text
45
+ src/q-press.globals.d.ts
46
+ ```
47
+
48
+ If your project still references `src/q-press.global.d.ts`, rename the reference to the plural `globals` filename.
49
+
50
+ ## Environment Variable Changes
51
+
52
+ Quasar CLI Vite 3 exposes runtime flags through `import.meta.env`. If you copied older Q-Press internals into your own code, update them:
53
+
54
+ | Old pattern | New pattern |
55
+ | ----------------------------- | ---------------------------------------- |
56
+ | `process.env.CLIENT` | `import.meta.env.QUASAR_CLIENT` |
57
+ | `process.env.SERVER` | `import.meta.env.QUASAR_SERVER` |
58
+ | `process.env.DEV` | `import.meta.env.QUASAR_DEV` |
59
+ | `process.env.PROD` | `import.meta.env.QUASAR_PROD` |
60
+ | `process.env.VUE_ROUTER_MODE` | `import.meta.env.QUASAR_VUE_ROUTER_MODE` |
61
+ | `process.env.VUE_ROUTER_BASE` | `import.meta.env.QUASAR_VUE_ROUTER_BASE` |
62
+
63
+ Q-Press also uses `QCLI_*` values for Quasar CLI provided build-time values, such as search index and filesystem paths.
64
+
65
+ ## Vite Plugin Configuration
66
+
67
+ `viteMdPlugin` should be configured with an options object:
68
+
69
+ ```ts
70
+ import { viteMdPlugin, type MenuItem } from '@md-plugins/vite-md-plugin'
71
+
72
+ vitePlugins: [
73
+ viteMdPlugin({
74
+ path: ctx.appPaths.srcDir + '/markdown',
75
+ menu: sidebar as MenuItem[],
76
+ }),
77
+ ]
78
+ ```
79
+
80
+ ## Verify The Upgrade
81
+
82
+ Run these checks in the consuming app:
83
+
84
+ ```bash
85
+ pnpm install
86
+ quasar prepare
87
+ quasar build
88
+ ```
89
+
90
+ If you use linting or formatting, run those checks after invoking Q-Press so any regenerated files are included.
@@ -682,7 +682,7 @@ md.use(codeblocksPlugin, {
682
682
  preClass: 'markdown-pre', // Customize the class for the pre tag
683
683
  codeClass: 'markdown-code', // Customize the class for the code tag
684
684
  pageScripts: [
685
- "import MarkdownPrerender from 'src/.q-presss/components/MarkdownPrerender'", // ts file
685
+ "import MarkdownPrerender from 'src/.q-press/components/MarkdownPrerender'", // ts file
686
686
  "import MarkdownCopyButton from 'src/.q-press/components/MarkdownCopyButton.vue'",
687
687
  ], // Include page scripts
688
688
  langList: [
@@ -4,3 +4,5 @@ desc: The changelog for MD-Plugins packages.
4
4
  ---
5
5
 
6
6
  Release notes (with changelog) for MD-Plugins packages are available on [GitHub Releases](https://github.com/md-plugins/md-plugins/releases).
7
+
8
+ If you are moving from the alpha packages to the `0.1.0` beta line, read the [Upgrade Guide](/guides/upgrade-guide) before updating a project.
@@ -6,11 +6,11 @@ desc: Q-Press App-Extension for Quasar.
6
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
7
 
8
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.
9
+ Q-Press is for Quasar Vite projects using `@quasar/app-vite` `^3.0.0-beta.12` at this time. TypeScript processing is also required. Do not use if you are using Webpack or have a JavaScript-only project.
10
10
  :::
11
11
 
12
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.
13
+ This website is built with **Q-Press**! When you install the App-Extension, you will be able to 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
14
  :::
15
15
 
16
16
  ## Key Features
@@ -33,14 +33,14 @@ quasar ext add @md-plugins/q-press
33
33
 
34
34
  - **New Install:**
35
35
  - `src/.q-press`
36
- - `src/q-press.global.d.ts`
36
+ - `src/q-press.globals.d.ts`
37
37
  - `src/components`
38
38
  - `src/markdown`
39
39
  - `src/examples`
40
40
  - `src/siteConfig`
41
41
  - **Update Install:**
42
42
  - `src/.q-press`
43
- - `src/q-press.global.d.ts`
43
+ - `src/q-press.globals.d.ts`
44
44
 
45
45
  ### Additional Dependencies
46
46
 
@@ -99,7 +99,7 @@ Import Q-Press styles:
99
99
  ### Modify `quasar.config.ts`
100
100
 
101
101
  ```ts [maxheight=400px]
102
- import { defineConfig } from '#q-app/wrappers'
102
+ import { defineConfig } from '#q-app'
103
103
  import type { Plugin } from 'vite'
104
104
  import { viteMdPlugin, type MenuItem, type MarkdownOptions } from '@md-plugins/vite-md-plugin'
105
105
 
@@ -283,14 +283,14 @@ If you don't have a `.prettierignore` file, create one in the root of your proje
283
283
 
284
284
  ```bash
285
285
  # Ignore all Markdown files:
286
- \*_/_.md
286
+ **/*.md
287
287
  ```
288
288
 
289
289
  :::
290
290
 
291
291
  ## Updating
292
292
 
293
- 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.
293
+ 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.
294
294
 
295
295
  To make it easier to update, you can use the following command:
296
296
 
@@ -8,6 +8,10 @@ related:
8
8
 
9
9
  The `viteMdPluginAppExt` is a [Quasar App Extension](https://quasar.dev/app-extensions/introduction) that integrates the `viteMdPlugin` into your Quasar project. This extension allows you to use Markdown files as Vue components, enabling a seamless integration of Markdown content into your Quasar application.
10
10
 
11
+ ::: warning
12
+ This app extension targets Quasar Vite projects using `@quasar/app-vite` `^3.0.0-beta.12`.
13
+ :::
14
+
11
15
  ## Key Features
12
16
 
13
17
  - **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.
@@ -46,16 +50,16 @@ framework: {
46
50
  To install the `viteMdPluginAppExt` extension, use the following command:
47
51
 
48
52
  ```bash
49
- pnpm add @md-plugins/vite-md-plugin-app-ext
53
+ quasar ext add @md-plugins/vite-md-plugin
50
54
  ```
51
55
 
52
56
  ## Usage
53
57
 
54
58
  After installing the extension, you need to configure it in your Quasar project. Here are the steps to get started:
55
59
 
56
- 1. **Import `@md-plugins/vite-md-plugin`:**
60
+ 1. **Import `viteMdPlugin`:**
57
61
 
58
- Update your `quasar.config.js` or `quasar.config.ts` to include the `@md-plugins/vite-md-plugin` extension:
62
+ Update your `quasar.config.js` or `quasar.config.ts` to include the `@md-plugins/vite-md-plugin` package:
59
63
 
60
64
  ```js
61
65
  import { viteMdPlugin, type MenuItem } from '@md-plugins/vite-md-plugin'
@@ -72,7 +76,10 @@ After installing the extension, you need to configure it in your Quasar project.
72
76
 
73
77
  ```js
74
78
  vitePlugins: [
75
- viteMdPlugin(ctx.appPaths.srcDir + '/markdown', sidebar as MenuItem[]),
79
+ viteMdPlugin({
80
+ path: ctx.appPaths.srcDir + '/markdown',
81
+ menu: sidebar as MenuItem[],
82
+ }),
76
83
  // ...
77
84
  ]
78
85
  ```
@@ -72,7 +72,7 @@ Here is an example of how you can configure the `viteExamplesPlugin` with custom
72
72
  ```typescript
73
73
  import { defineConfig } from 'vite'
74
74
  import vue from '@vitejs/plugin-vue'
75
- import { viteExamplesPlugin } from 'vite-examples-plugin'
75
+ import { viteExamplesPlugin } from '@md-plugins/vite-examples-plugin'
76
76
 
77
77
  export default defineConfig(({ mode }) => {
78
78
  const isProduction = mode === 'production'
@@ -103,7 +103,7 @@ If you’re using the Quasar Framework with Vite, additional configuration is ne
103
103
  1. **Update `quasar.config.(js|ts)`**:
104
104
 
105
105
  ```typescript
106
- import { viteExamplesPlugin } from 'vite-examples-plugin'
106
+ import { viteExamplesPlugin } from '@md-plugins/vite-examples-plugin'
107
107
 
108
108
  export default defineConfig(({ mode }) => {
109
109
  const isProduction = mode === 'production'
@@ -59,7 +59,7 @@ To use the Vite Examples plugin with Vite, you can configure it as follows:
59
59
  ```typescript
60
60
  import { defineConfig } from 'vite'
61
61
  import vue from '@vitejs/plugin-vue'
62
- import { viteExamplesPlugin, viteManualChunks } from 'vite-examples-plugin'
62
+ import { viteExamplesPlugin, viteManualChunks } from '@md-plugins/vite-examples-plugin'
63
63
 
64
64
  export default defineConfig(({ mode }) => {
65
65
  const isProduction = mode === 'production'
@@ -136,7 +136,7 @@ If you’re using the Quasar Framework with Vite, additional configuration is ne
136
136
 
137
137
  ```typescript
138
138
  import { viteMdPlugin, type MenuItem, type MarkdownOptions } from '@md-plugins/vite-md-plugin'
139
- import { menu } from './src/assets/menu'; // be sure to create this file
139
+ import { menu } from './src/assets/menu' // be sure to create this file
140
140
 
141
141
  export default defineConfig((ctx) => {
142
142
  // ...
@@ -148,14 +148,11 @@ export default defineConfig((ctx) => {
148
148
  },
149
149
 
150
150
  vitePlugins: [
151
- [
152
- viteMdPlugin,
153
- {
154
- path: ctx.appPaths.srcDir + '/markdown',
155
- menu: sidebar as MenuItem[],
156
- // options: myOptions as MarkdownOptions
157
- },
158
- ],
151
+ viteMdPlugin({
152
+ path: ctx.appPaths.srcDir + '/markdown',
153
+ menu: menu as MenuItem[],
154
+ // config: myOptions as MarkdownOptions,
155
+ }),
159
156
  // ...
160
157
  ],
161
158
  },
@@ -59,7 +59,7 @@ To use the `viteMdPlugin`, configure it in your Vite project:
59
59
  ```typescript
60
60
  import { defineConfig } from 'vite'
61
61
  import vue from '@vitejs/plugin-vue'
62
- import { viteMdPlugin } from 'vite-md-plugin'
62
+ import { viteMdPlugin } from '@md-plugins/vite-md-plugin'
63
63
 
64
64
  const menu = [] // Define your navigation menu structure here
65
65
  const basePath = '/docs' // Base path prefix
@@ -76,8 +76,8 @@ If you’re using the Quasar Framework, additional configuration is needed to en
76
76
  1. Update `quasar.config.(js|ts)`:
77
77
 
78
78
  ```typescript
79
- import { viteMdPlugin } from '@md-plugins/vite-md-plugin';
80
- import { menu } from './src/assets/menu'; // be sure to create this file
79
+ import { viteMdPlugin, type MenuItem, type MarkdownOptions } from '@md-plugins/vite-md-plugin'
80
+ import { menu } from './src/assets/menu' // be sure to create this file
81
81
 
82
82
  export default defineConfig((ctx) => {
83
83
  // ...
@@ -94,14 +94,11 @@ build: {
94
94
  },
95
95
 
96
96
  vitePlugins: [
97
- [
98
- viteMdPlugin,
99
- {
100
- path: ctx.appPaths.srcDir + '/markdown',
101
- menu: sidebar as MenuItem[],
102
- // options: myOptions as MarkdownOptions
103
- },
104
- ],
97
+ viteMdPlugin({
98
+ path: ctx.appPaths.srcDir + '/markdown',
99
+ menu: menu as MenuItem[],
100
+ // config: myOptions as MarkdownOptions,
101
+ }),
105
102
  // ...
106
103
  ],
107
104
  },
@@ -119,8 +116,8 @@ The `viteMdPlugin` allows you to define a navigation structure that can be updat
119
116
 
120
117
  ```typescript
121
118
  const menu = [
122
- { title: 'Home', path: '/home' },
123
- { title: 'About', path: '/about' },
119
+ { name: 'Home', path: '/home' },
120
+ { name: 'About', path: '/about' },
124
121
  ]
125
122
  ```
126
123
 
@@ -130,10 +127,10 @@ This menu is passed as a parameter to the plugin and can be used to build a dyna
130
127
 
131
128
  The `viteMdPlugin` accepts the following parameters:
132
129
 
133
- | Parameter | Type | Description |
134
- | --------- | ---------- | ------------------------------------------------------------------------------------------ |
135
- | path | string | The base path prefix for routing or file resolution. |
136
- | menu | MenuItem[] | An array representing the navigation menu structure. Each item should have title and path. |
130
+ | Parameter | Type | Description |
131
+ | --------- | ---------- | ----------------------------------------------------------------------------------------- |
132
+ | path | string | The base path prefix for routing or file resolution. |
133
+ | menu | MenuItem[] | An array representing the navigation menu structure. Each item should have name and path. |
137
134
 
138
135
  ## MenuItem Type
139
136
 
@@ -118,7 +118,7 @@ const socialLinks = {
118
118
  const netlifyLink = {
119
119
  path: 'https://www.netlify.com',
120
120
  external: true,
121
- image: 'https://www.netlify.com/img/global/badges/netlify-color-accent.svg',
121
+ image: 'https://www.netlify.com/assets/badges/netlify-badge-color-accent.svg',
122
122
  name: 'Deploys by Netlify',
123
123
  maxWidth: '120px',
124
124
  }
@@ -131,6 +131,7 @@ const SponsorsLinks = {
131
131
  path: netlifyLink.path,
132
132
  external: netlifyLink.external,
133
133
  image: netlifyLink.image,
134
+ maxWidth: netlifyLink.maxWidth,
134
135
  },
135
136
  ],
136
137
  }
@@ -289,6 +290,10 @@ const guidesMenu: SiteMenuItem = {
289
290
  name: 'Guides',
290
291
  mq: 1100, // media query breakpoint
291
292
  children: [
293
+ {
294
+ name: 'Upgrade Guide',
295
+ path: '/guides/upgrade-guide',
296
+ },
292
297
  {
293
298
  name: 'FAQ',
294
299
  path: '/guides/faq',
@@ -361,8 +361,8 @@ function getApiCount(parsedApi, tabs, innerTabs) {
361
361
  }
362
362
 
363
363
  const getJsonUrl =
364
- process.env.DEV === true
365
- ? (file) => `/@fs/${process.env.FS_QUASAR_FOLDER}/dist/api/${file}.json`
364
+ import.meta.env.QUASAR_DEV === true
365
+ ? (file) => `/@fs/${import.meta.env.QCLI_FS_QUASAR_FOLDER}/dist/api/${file}.json`
366
366
  : (file) => `/quasar-api/${file}.json`
367
367
 
368
368
  const props = defineProps({
@@ -466,7 +466,7 @@ function onFilterClick() {
466
466
  }
467
467
  }
468
468
 
469
- if (process.env.CLIENT) {
469
+ if (import.meta.env.QUASAR_CLIENT) {
470
470
  onMounted(() => {
471
471
  if (props.file) {
472
472
  fetch(getJsonUrl(props.file))
@@ -197,17 +197,17 @@ function toggleExpand() {
197
197
  expanded.value = expanded.value === false
198
198
  }
199
199
 
200
- if (process.env.CLIENT) {
200
+ if (import.meta.env.QUASAR_CLIENT) {
201
201
  onMounted(() => {
202
202
  examples.list.then((list) => {
203
203
  component.value = markRaw(
204
- process.env.DEV
204
+ import.meta.env.QUASAR_DEV
205
205
  ? list.code[`/src/examples/${examples.name}/${props.file}.vue`].default
206
206
  : list[props.file],
207
207
  )
208
208
 
209
209
  parseComponent(
210
- process.env.DEV
210
+ import.meta.env.QUASAR_DEV
211
211
  ? list.source[`/src/examples/${examples.name}/${props.file}.vue`]
212
212
  : list[`Raw${props.file}`],
213
213
  )
@@ -177,7 +177,6 @@ const tocClass = computed(
177
177
  () => `markdown-page__toc-container--${props.toc !== void 0 ? 'fixed' : 'flowing'}`,
178
178
  )
179
179
 
180
- console.log('MarkdownPage props', props)
181
180
  </script>
182
181
 
183
182
  <style lang="scss">
@@ -19,9 +19,14 @@
19
19
  :target="item.external ? '_blank' : void 0"
20
20
  class="markdown-layout__item"
21
21
  >
22
- <q-item-section v-if="item.image" class="letter-spacing-100"
23
- ><q-img :src="item.image" :style="{ maxWidth: item.maxWidth ?? '150px' }"
24
- /></q-item-section>
22
+ <q-item-section v-if="item.image" class="letter-spacing-100">
23
+ <img
24
+ :src="item.image"
25
+ :alt="item.name"
26
+ :style="{ maxWidth: item.maxWidth ?? '150px' }"
27
+ class="markdown-page-footer__image"
28
+ />
29
+ </q-item-section>
25
30
  <q-item-section v-else class="letter-spacing-100">{{ item.name }}</q-item-section>
26
31
  </q-item>
27
32
  </q-list>
@@ -105,6 +110,7 @@ function getMenu(path: string): SiteMenuItem[] {
105
110
  path: item.external === true ? item.path : `/${path}/${item.path}`,
106
111
  external: item.external,
107
112
  image: item.image ?? void 0,
113
+ maxWidth: item.maxWidth ?? void 0,
108
114
  } as SiteMenuItem)
109
115
  }
110
116
  }
@@ -140,6 +146,12 @@ const props = defineProps({
140
146
  font-size: ($font-size - 2px);
141
147
  }
142
148
 
149
+ &__image {
150
+ display: block;
151
+ height: auto;
152
+ width: 100%;
153
+ }
154
+
143
155
  &__nav {
144
156
  display: grid;
145
157
  grid-row-gap: 64px;
@@ -121,7 +121,7 @@ function fetchQuery (val, onResult, onError) {
121
121
  localRequestId === requestId && onError()
122
122
  })
123
123
 
124
- xhr.open('POST', `https://search.quasar.dev/indexes/${ process.env.SEARCH_INDEX }/search`)
124
+ xhr.open('POST', `https://search.quasar.dev/indexes/${import.meta.env.QCLI_SEARCH_INDEX}/search`)
125
125
  xhr.setRequestHeader('Content-Type', 'application/json')
126
126
  xhr.setRequestHeader('Authorization', 'Bearer b7a6ea9a9978a4e4d994c1f9451210327f207441adbcf04a4aada3d17d829359')
127
127
  xhr.send(data)