mirror of https://github.com/nuxt/nuxt.git
parent
8666b53998
commit
bf505eccd5
|
@ -0,0 +1,3 @@
|
|||
# Nuxt.js with Pug
|
||||
|
||||
No further packages needed. It works out of the box.
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"name": "example-pug",
|
||||
"dependencies": {
|
||||
"nuxt-edge": "latest"
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "nuxt",
|
||||
"build": "nuxt build",
|
||||
"start": "nuxt start"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
<template lang="pug">
|
||||
div
|
||||
p Hi from {{ name }}
|
||||
NuxtLink(to="/") Home Page
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
asyncData() {
|
||||
return {
|
||||
name: process.static ? 'static' : (process.server ? 'server' : 'client')
|
||||
}
|
||||
},
|
||||
head: {
|
||||
title: 'About page'
|
||||
}
|
||||
}
|
||||
</script>
|
|
@ -0,0 +1,13 @@
|
|||
<template lang="pug">
|
||||
div
|
||||
h1 Welcome
|
||||
NuxtLink(to="/about") About Page
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
head: {
|
||||
title: 'Home page'
|
||||
}
|
||||
}
|
||||
</script>
|
Loading…
Reference in New Issue