1 | # Quasar App Extension QMarkdown
|
2 |
|
3 | [![npm](https://img.shields.io/npm/v/@quasar/quasar-app-extension-qmarkdown.svg?label=quasar-app-extension-qmarkdown)](https://www.npmjs.com/package/@quasar/quasar-app-extension-qmarkdown)
|
4 | [![npm](https://img.shields.io/npm/dt/@quasar/quasar-app-extension-qmarkdown.svg)](https://www.npmjs.com/package/@quasar/quasar-app-extension-qmarkdown)
|
5 |
|
6 |
|
7 | The QMarkdown app extension can do the following:
|
8 | 1. Automatically inject the `@quasar/quasar-ui-qmarkdown` component using the Quasar CLI.
|
9 | 2. Modify webpack to allow importing of markdown (\*.md) files.
|
10 | 3. Modify webpack to allow importing of vue+markdown (\*.vmd) files.
|
11 |
|
12 | Remember, app extensions can _only_ be used with the Quasar CLI.
|
13 |
|
14 | [![npm](https://img.shields.io/npm/v/@quasar/quasar-app-extension-qmarkdown.svg?label=@quasar/quasar-app-extension-qmarkdown)](https://www.npmjs.com/package/quasar-app-extension-qmarkdown)
|
15 | [![npm](https://img.shields.io/npm/dt/@quasar/quasar-app-extension-qmarkdown.svg)](https://www.npmjs.com/package/@quasar/quasar-app-extension-qmarkdown)
|
16 |
|
17 | # Updating
|
18 | If you already have the app extension installed, you can use the Quasar CLI to automatically update it via:
|
19 | ```bash
|
20 | quasar upgrade -i
|
21 | ```
|
22 | If you are updating from a beta version, to v1.0.0, you will also need to do the following:
|
23 | ```bash
|
24 | quasar ext invoke @quasar/qmarkdown
|
25 | ```
|
26 | At which point you will be asked two questions about importing markdown (\*.md) and vue+markdown (\*.vmd) files.
|
27 |
|
28 | # New Install
|
29 | ```bash
|
30 | quasar ext add @quasar/qmarkdown
|
31 | ```
|
32 | Quasar CLI will retrieve it from NPM and install the extension.
|
33 |
|
34 | ## Prompts
|
35 |
|
36 | When installing the QMarkdown app extension, you will be prompted with two questions:
|
37 |
|
38 | 1) "Do you want to be able to import markdown (*.md) files?"
|
39 |
|
40 | The default is `true` for the above question. It allows you to do this in your Quasar apps:
|
41 |
|
42 | ```js
|
43 | import markdown from '../examples/myMarkdownFile.md'
|
44 | ```
|
45 |
|
46 | You can now use the QMarkdown component to process the markdown file to be displayed on your page.
|
47 |
|
48 | 2) "Do you want to be able to import vue+markdown (*.vmd) files?"
|
49 |
|
50 | The default is `true` for the above question. It allows you to do this in your Quasar apps:
|
51 |
|
52 | ```js
|
53 | import vmd from '../examples/myVuePlusMarkdownFile.vmd'
|
54 |
|
55 | components: {
|
56 | myComponent: vmd
|
57 | }
|
58 | ```
|
59 |
|
60 | **vmd** files also allow you to provide front-matter as part of the processing. Be sure to read the documentation to understand how this works.
|
61 |
|
62 | # Uninstall
|
63 | ```bash
|
64 | quasar ext remove @quasar/qmarkdown
|
65 | ```
|
66 |
|
67 | # Describe
|
68 | You can use `quasar describe QMarkdown` for the QMarkdown component
|
69 |
|
70 | # Demo Project (source)
|
71 | Can be found [here](https://github.com/quasarframework/quasar-ui-qmarkdown/tree/master/demo).
|
72 |
|
73 |
|
74 | # Documentation
|
75 | Can be found [here](https://quasarframework.github.io/quasar-ui-qmarkdown/).
|
76 |
|
77 | # Live Demo
|
78 | Can be found [here](https://quasarframework.github.io/quasar-ui-qmarkdown/demo).
|
79 |
|
80 | # Donate
|
81 | If you appreciate the work that went into this project, please consider donating to [Quasar](https://donate.quasar.dev) or [Jeff](https://github.com/sponsors/hawkeye64).
|
82 |
|
83 | # License
|
84 | MIT (c) Jeff Galbraith <jeff@quasar.dev>
|