Skip to content

Commit

Permalink
chore: add missing Vue support for Vercel builds
Browse files Browse the repository at this point in the history
  • Loading branch information
trusktr committed Jul 16, 2023
1 parent 7da3521 commit b9fe1ce
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,58 @@
},
pathNamespaces: ['/es', '/de-de', '/ru-ru', '/zh-cn'],
},
vueComponents: {
'button-counter': {
template: /* html */ `<button @click="count += 1">You clicked me {{ count }} times</button>`,
data() {
return {
count: 0,
};
},
},
},
vueGlobalOptions: {
data() {
return {
count: 0,
message: 'Hello, World!',
// Fake API response
images: [
{ title: 'Image 1', url: 'https://picsum.photos/150?random=1' },
{ title: 'Image 2', url: 'https://picsum.photos/150?random=2' },
{ title: 'Image 3', url: 'https://picsum.photos/150?random=3' },
],
};
},
computed: {
timeOfDay() {
const date = new Date();
const hours = date.getHours();

if (hours < 12) {
return 'morning';
} else if (hours < 18) {
return 'afternoon';
} else {
return 'evening';
}
},
},
methods: {
hello() {
alert(this.message);
},
},
},
vueMounts: {
'#counter': {
data() {
return {
count: 0,
};
},
},
},
plugins: [
DocsifyCarbon.create('CEBI6KQE', 'docsifyjsorg'),
function (hook, vm) {
Expand Down Expand Up @@ -121,5 +173,7 @@
<script src="//cdn.jsdelivr.net/npm/prismjs/components/prism-markdown.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/prismjs/components/prism-nginx.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/prismjs/components/prism-php.min.js"></script>

<script src="//cdn.jsdelivr.net/npm/vue@2/dist/vue.min.js"></script>
</body>
</html>

0 comments on commit b9fe1ce

Please sign in to comment.