Skip to content

Commit

Permalink
Merge pull request #45 from ojvribeiro/feat-head-management
Browse files Browse the repository at this point in the history
feat(core): head management
  • Loading branch information
ojvribeiro authored Sep 28, 2022
2 parents 61f08f1 + 297ea40 commit 469eb94
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 5 deletions.
9 changes: 9 additions & 0 deletions .vulmix/components/Head.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<template>
<Head>
<slot />
</Head>
</template>

<script setup>
import { Head } from '@vueuse/head'
</script>
5 changes: 0 additions & 5 deletions .vulmix/index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<!-- Primary Meta Tags -->
<title>Vue 3 + Laravel Mix = Vulmix</title>
<meta name="title" content="Your application title">
<meta name="description" content="Your application description">

<link rel="stylesheet" href="<%= mix('/assets/_vulmix/css/main.vulmix.css') %>">
<link rel="stylesheet" href="<%= mix('/assets/css/main.css') %>">

Expand Down
3 changes: 3 additions & 0 deletions .vulmix/main.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import { createApp } from 'vue'
import { createRouter, createWebHistory } from 'vue-router'
import { createHead } from '@vueuse/head'

import App from '../app.vue'

const app = createApp(App)
const head = createHead()

app.component('App', require('@/App.vue').default)

Expand Down Expand Up @@ -83,5 +85,6 @@ const router = createRouter({
})

app.use(router)
app.use(head)

app.mount('#app')
6 changes: 6 additions & 0 deletions .vulmix/pages/404.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
<template>
<Head>
<title>
Page not found
</title>
</Head>

<div class="grid place-items-center h-full text-center bg-zinc-800">
<div class="space-y-4">
<h1 class="text-8xl text-blue-200 font-black">404</h1>
Expand Down
9 changes: 9 additions & 0 deletions app.vue
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
<template>
<Head>
<title>
Vue + Laravel Mix = Vulmix
</title>

<meta name="title" content="Your application title">
<meta name="description" content="Your application description">
</Head>

<App />
</template>
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"devDependencies": {
"@vue/compiler-sfc": "^3.2.37",
"@vueuse/core": "^9.2.0",
"@vueuse/head": "^0.7.12",
"autoprefixer": "^10.4.8",
"browser-sync": "^2.27.10",
"browser-sync-webpack-plugin": "^2.3.0",
Expand Down
6 changes: 6 additions & 0 deletions pages/test-page.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
<template>
<Head>
<title>
Test page
</title>
</Head>

<div class="grid place-items-center h-full text-center bg-zinc-800 text-white">
<div class="space-y-4">
<h1 class="text-5xl text-blue-200 font-black">Test page!</h1>
Expand Down

1 comment on commit 469eb94

@vercel
Copy link

@vercel vercel bot commented on 469eb94 Sep 28, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

vulmix – ./

vulmix-git-main-ojvribeiro.vercel.app
vulmix-ojvribeiro.vercel.app
vulmix.vercel.app

Please sign in to comment.