-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnuxt.config.ts
101 lines (90 loc) · 2.37 KB
/
nuxt.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
import { headConfig } from "./meta.config";
const baseURL = process.env.NUXT_PUBLIC_BASE_URL || "";
const origin = process.env.NUXT_PUBLIC_ORIGIN || "";
const appURL = origin + baseURL;
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
runtimeConfig: {
// footer: process.env.footer,
public: {
appURL,
},
},
modules: ["@nuxt/content", "@nuxtjs/i18n"],
typescript: {
typeCheck: true,
strict: true,
},
i18n: {
locales: [
{ code: "ja", language: "ja", file: "ja.js" },
{ code: "en", language: "en", file: "en.js" },
],
langDir: "locales/",
defaultLocale: headConfig.lang,
lazy: true,
detectBrowserLanguage: {
useCookie: true,
cookieKey: "i18n_redirected",
redirectOn: "root", // recommended
},
},
app: {
baseURL,
head: {
htmlAttrs: {
lang: headConfig.lang,
},
title: headConfig.siteName,
meta: [
{ charset: "utf-8" },
{ "http-equiv": "x-ua-compatible", content: "ie=edge" },
{ name: "viewport", content: "width=device-width, initial-scale=1" },
{
name: "format-detection",
content: "telephone=no, email=no, address=no",
},
// SEO関連
{ name: "description", content: headConfig.description },
{ name: "keywords", content: headConfig.keywords },
// ogp関連
{
property: "og:site_name",
content: headConfig.siteName,
},
{ property: "og:type", content: "website" },
{ property: "og:url", content: appURL },
{ property: "og:title", content: headConfig.siteName },
{
property: "og:description",
content: headConfig.description,
},
{
property: "og:image",
content: `${appURL}${headConfig.image}`,
},
{
property: "og:locale",
content: "ja_JP",
},
{ name: "twitter:card", content: "summary" },
],
link: [
{
rel: "icon",
type: "image/x-icon",
href: `${appURL}${headConfig.favicon}`,
},
],
},
},
css: ["@/assets/styles/vuetify.css", "@/assets/styles/main.css"],
build: {
transpile: ["vuetify"],
},
components: {
global: true,
dirs: ["~/components"],
},
compatibilityDate: "2024-09-26",
});