RAXSY APPS
+
- Edit
- components/HelloWorld.vue to test HMR
-
- Check out - create-vue, the official Vue + Vite starter -
-- Learn more about IDE Support for Vue in the - Vue Docs Scaling up Guide. -
-Click on the Vite and Vue logos to learn more
- - - diff --git a/client/src/composables/head/Meta.ts b/client/src/composables/head/Meta.ts new file mode 100644 index 0000000..14eabc0 --- /dev/null +++ b/client/src/composables/head/Meta.ts @@ -0,0 +1,48 @@ +import type { MetaType } from '@/types/route-types/MetaType' +import { useHead } from '@unhead/vue' + +export const useMeta = (root: string) => ({ + setMeta: (meta: MetaType, path: string) => { + useHead({ + title: `${meta.title}`, + meta: [ + { + name: 'description', + content: `${meta.description}`, + }, + { + name: 'og:title', + content: `${meta.title}`, + }, + { + name: 'og:description', + content: `${meta.description}}`, + }, + { + name: 'og:image', + content: `${root}/img/ogp.png`, + }, + { + name: 'og:url', + content: `${root}${path}`, + }, + { + name: 'twitter:card', + content: 'summary_large_image', + }, + { + name: 'twitter:title', + content: `${meta.title}`, + }, + { + name: 'twitter:description', + content: `${meta.description}`, + }, + { + name: 'twitter:image', + content: `${root}/img/ogp.png`, + }, + ], + }) + }, +}) diff --git a/client/src/composables/router/RouteComponents.ts b/client/src/composables/router/RouteComponents.ts new file mode 100644 index 0000000..b13b56b --- /dev/null +++ b/client/src/composables/router/RouteComponents.ts @@ -0,0 +1,9 @@ + +import { UrlPathConfigs } from '@/configs/routes-config/UrlPathConfigs' +import type { Component } from 'vue' +import IndexPage from '@/components/05-pages/IndexPage.vue' + +export const RouteComponentRecord: Record