Skip to content

Commit e8ce45b

Browse files
committed
Docs: Install and config vue-announcer in theme-default
1 parent e168d12 commit e8ce45b

File tree

7 files changed

+38
-4
lines changed

7 files changed

+38
-4
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<template>
2+
<div id="global-layout">
3+
<VueAnnouncer />
4+
<component :is="layout"/>
5+
</div>
6+
</template>
7+
8+
<script>
9+
export default {
10+
computed: {
11+
layout () {
12+
if (this.$page.path) {
13+
if (this.$frontmatter.layout) return this.$frontmatter.layout
14+
return 'Layout'
15+
}
16+
return 'NotFound'
17+
}
18+
}
19+
}
20+
</script>

docs/.vuepress/config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module.exports = {
22
title: 'Vue announcer',
33
description: '',
4-
serviceWorker: true,
4+
serviceWorker: true,
55
themeConfig: {
66
home: false,
77
repo: 'vue-a11y/vue-announcer',

docs/.vuepress/enhanceApp.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import VueAnnouncer from '../../dist/vue-announcer.esm'
2+
3+
export default ({ Vue, router, isServer }) => {
4+
if (!isServer) {
5+
Vue.use(VueAnnouncer, {}, router)
6+
}
7+
}

docs/.vuepress/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
globalLayout: './components/GlobalLayout'
3+
}

docs/demos/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<iframe
44
src="https://codesandbox.io/embed/vue-announcer-vue-project-z049t?fontsize=14&hidenavigation=1&theme=dark&view=editor"
55
style="width:100%; height:500px; border:0; border-radius: 4px; overflow:hidden;"
6-
title="vue-announcer-vue-project"
6+
title="example vue-announcer to vue.js projects"
77
allow="accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr"
88
sandbox="allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts"
99
></iframe>

docs/demos/nuxt.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ In your `layouts/default.vue`
4444
<iframe
4545
src="https://codesandbox.io/embed/vue-announcer-nuxt-project-breih?fontsize=14&hidenavigation=1&module=%2Fplugins%2Fvue-announcer.js&theme=dark&view=editor"
4646
style="width:100%; height:500px; border:0; border-radius: 4px; overflow:hidden;"
47-
title="vue-announcer-nuxt-project"
47+
title="example vue-announcer to nuxt.js projects"
4848
allow="accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr"
4949
sandbox="allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts"
5050
></iframe>
5151
52-
<a href="https://codesandbox.io/s/vue-announcer-nuxt-project-breih" target="_blank" rel="noopener">Open sandbox example</a>
52+
<a href="https://codesandbox.io/s/vue-announcer-nuxt-project-breih" target="_blank" rel="noopener">Open sandbox example</a>

docs/demos/vuepress.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
---
2+
title: Example of how to use in a Vuepress application
3+
---
4+
15
# Vuepress
26

37
### Coming soon

0 commit comments

Comments
 (0)