mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +00:00
feat: add pug example
This commit is contained in:
parent
1e4c95554a
commit
84783a988c
@ -3,7 +3,8 @@
|
||||
"version": "1.0.0",
|
||||
"dependencies": {
|
||||
"@nuxtjs/markdownit": "^1.1.2",
|
||||
"nuxt": "latest"
|
||||
"nuxt": "latest",
|
||||
"pug": "^2.0.0-rc.4"
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "nuxt",
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template lang="md">
|
||||
# Hello World!
|
||||
# About Page!
|
||||
Current route is: {{ $route.name }}
|
||||
|
||||
<nuxt-link to="/">Back home</nuxt-link>
|
||||
|
@ -6,13 +6,15 @@
|
||||
Data model is: {{ model }}
|
||||
|
||||
<nuxt-link to="/about">Goto About</nuxt-link>
|
||||
|
||||
<nuxt-link to="/pug">Goto Pug</nuxt-link>
|
||||
</template>
|
||||
|
||||
<<script>
|
||||
<script>
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
model: 'abc'
|
||||
model: 'I am index'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
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