feat: add pug example

This commit is contained in:
Clark Du 2017-10-28 00:38:47 +08:00
parent 1e4c95554a
commit 84783a988c
No known key found for this signature in database
GPG Key ID: D0E5986AF78B86D9
4 changed files with 24 additions and 4 deletions

View File

@ -3,7 +3,8 @@
"version": "1.0.0", "version": "1.0.0",
"dependencies": { "dependencies": {
"@nuxtjs/markdownit": "^1.1.2", "@nuxtjs/markdownit": "^1.1.2",
"nuxt": "latest" "nuxt": "latest",
"pug": "^2.0.0-rc.4"
}, },
"scripts": { "scripts": {
"dev": "nuxt", "dev": "nuxt",

View File

@ -1,5 +1,5 @@
<template lang="md"> <template lang="md">
# Hello World! # About Page!
Current route is: {{ $route.name }} Current route is: {{ $route.name }}
<nuxt-link to="/">Back home</nuxt-link> <nuxt-link to="/">Back home</nuxt-link>

View File

@ -6,13 +6,15 @@
Data model is: {{ model }} Data model is: {{ model }}
<nuxt-link to="/about">Goto About</nuxt-link> <nuxt-link to="/about">Goto About</nuxt-link>
<nuxt-link to="/pug">Goto Pug</nuxt-link>
</template> </template>
<<script> <script>
export default { export default {
data () { data () {
return { return {
model: 'abc' model: 'I am index'
} }
} }
} }

View 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>