Skip to content

Commit aeeb32f

Browse files
committed
chore(docs): updated info about importing *.md files
1 parent 5333945 commit aeeb32f

File tree

2 files changed

+42
-3
lines changed

2 files changed

+42
-3
lines changed

docs/src/components/page-parts/LandingPageContent.vue

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
</div>
1818
</div>
1919
</div>
20-
<div class="full-width row justify-center q-pb-xl">
20+
<div class="full-width row justify-center q-pb-xl q-gutter-sm">
2121
<q-btn
2222
to="/all-about-qmarkdown/what-is-qmarkdown"
2323
no-caps
@@ -31,6 +31,19 @@
3131
<q-icon :name="biArrowRightCircle" />
3232
</div>
3333
</q-btn>
34+
<q-btn
35+
to="/developing/using-qmarkdown"
36+
no-caps
37+
class="bg-green-8"
38+
>
39+
<div
40+
class="row justify-around items-center"
41+
style="width: 140px;"
42+
>
43+
<div>Examples</div>
44+
<q-icon :name="biArrowRightSquare" />
45+
</div>
46+
</q-btn>
3447
</div>
3548
</section>
3649
</template>
@@ -39,7 +52,8 @@
3952
import { defineComponent, computed } from 'vue'
4053
import { useQuasar } from 'quasar'
4154
import {
42-
biArrowRightCircle
55+
biArrowRightCircle,
56+
biArrowRightSquare
4357
} from '@quasar/extras/bootstrap-icons'
4458
4559
export default defineComponent({
@@ -54,7 +68,8 @@ export default defineComponent({
5468
5569
return {
5670
layout,
57-
biArrowRightCircle
71+
biArrowRightCircle,
72+
biArrowRightSquare
5873
}
5974
}
6075
})

docs/src/pages/developing/using-qmarkdown.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,30 @@ components:
1010

1111
## Markdown
1212

13+
## Importing Markdown
14+
15+
The app extension needs to be installed in order to import markdown (*.md) files. This works for both @quasar/app-webpack and @quasar/app-vite. To import markdown files, **DO NOT** place them into your `public` folder. Put them into your `assets` folder.
16+
17+
```js
18+
<template>
19+
<q-markdown :src="ContactUs" show-copy />
20+
</template>
21+
22+
<script>
23+
import { defineComponent } from 'vue'
24+
import ContactUs from 'assets/contact-us.md'
25+
26+
export default defineComponent({
27+
setup () {
28+
return {
29+
ContactUs
30+
}
31+
}
32+
})
33+
</script>
34+
35+
```
36+
1337
## Extending Prism
1438

1539
The `prismjs` package is used for language highlighting. When Prism is installed by QMarkdown, it loads itself globally. You can acces it via `window.Prism`. Visit their [documentation](https://prismjs.com/) on modifying the run-time, like adding additional language support.

0 commit comments

Comments
 (0)