mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +00:00
parent
8666b53998
commit
bf505eccd5
3
examples/pug/README.md
Normal file
3
examples/pug/README.md
Normal file
@ -0,0 +1,3 @@
|
||||
# Nuxt.js with Pug
|
||||
|
||||
No further packages needed. It works out of the box.
|
11
examples/pug/package.json
Normal file
11
examples/pug/package.json
Normal file
@ -0,0 +1,11 @@
|
||||
{
|
||||
"name": "example-pug",
|
||||
"dependencies": {
|
||||
"nuxt-edge": "latest"
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "nuxt",
|
||||
"build": "nuxt build",
|
||||
"start": "nuxt start"
|
||||
}
|
||||
}
|
18
examples/pug/pages/about.vue
Executable file
18
examples/pug/pages/about.vue
Executable file
@ -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>
|
13
examples/pug/pages/index.vue
Executable file
13
examples/pug/pages/index.vue
Executable file
@ -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
Block a user