mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-30 09:27:13 +00:00
Merge branch 'dev' into refacto-app
This commit is contained in:
commit
1794f7b30e
5
examples/markdownit/README.md
Normal file
5
examples/markdownit/README.md
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
# Markdown Example
|
||||||
|
|
||||||
|
> Convert Markdown file to HTML using markdown-it.
|
||||||
|
|
||||||
|
**See [Markdownit Module](https://github.com/nuxt-community/modules/tree/master/packages/markdownit) for easy integration with [Nuxt.js](https://nuxtjs.org).**
|
16
examples/markdownit/nuxt.config.js
Normal file
16
examples/markdownit/nuxt.config.js
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
module.exports = {
|
||||||
|
modules: [
|
||||||
|
'@nuxtjs/markdownit'
|
||||||
|
]
|
||||||
|
// [optional] markdownit options
|
||||||
|
// See https://github.com/markdown-it/markdown-it
|
||||||
|
// markdownit: {
|
||||||
|
// preset: 'default',
|
||||||
|
// linkify: true,
|
||||||
|
// breaks: true,
|
||||||
|
// use: [
|
||||||
|
// 'markdown-it-container',
|
||||||
|
// 'markdown-it-attrs'
|
||||||
|
// ]
|
||||||
|
// }
|
||||||
|
}
|
14
examples/markdownit/package.json
Normal file
14
examples/markdownit/package.json
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"name": "nuxt-markdownit",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"dependencies": {
|
||||||
|
"@nuxtjs/markdownit": "^1.1.2",
|
||||||
|
"nuxt": "latest",
|
||||||
|
"pug": "^2.0.0-rc.4"
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"dev": "nuxt",
|
||||||
|
"build": "nuxt build",
|
||||||
|
"start": "nuxt start"
|
||||||
|
}
|
||||||
|
}
|
6
examples/markdownit/pages/about.vue
Normal file
6
examples/markdownit/pages/about.vue
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<template lang="md">
|
||||||
|
# About Page!
|
||||||
|
Current route is: {{ $route.name }}
|
||||||
|
|
||||||
|
<nuxt-link to="/">Back home</nuxt-link>
|
||||||
|
</template>
|
21
examples/markdownit/pages/index.vue
Normal file
21
examples/markdownit/pages/index.vue
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
<template lang="md">
|
||||||
|
# Hello World!
|
||||||
|
|
||||||
|
Current route is: {{ $route.path }}
|
||||||
|
|
||||||
|
Data model is: {{ model }}
|
||||||
|
|
||||||
|
<nuxt-link to="/about">Goto About</nuxt-link>
|
||||||
|
|
||||||
|
<nuxt-link to="/pug">Goto Pug</nuxt-link>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
model: 'I am index'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
17
examples/markdownit/pages/pug.vue
Normal file
17
examples/markdownit/pages/pug.vue
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
<template lang="pug">
|
||||||
|
div
|
||||||
|
h1 Pug Page
|
||||||
|
div(language="md") Current route is: {{ $route.name }}
|
||||||
|
div(language="md") Data model is: {{ model }}
|
||||||
|
a(href='/') Back Home
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
model: 'I am pug'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
Loading…
Reference in New Issue
Block a user