-
-
Notifications
You must be signed in to change notification settings - Fork 39
/
Copy pathnuxt.config.ts
142 lines (129 loc) · 2.97 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
import { defineNuxtConfig } from "nuxt/config"
// Base config
import head from "./config/head"
// Hooks
import { generateOgImages } from "./hooks/generateOgImages"
import { getBlogPosts } from "./hooks/scripts/getBlogPosts"
export default defineNuxtConfig({
nitro: {
preset: "netlify",
},
app: {
head,
pageTransition: { name: "fade", mode: "out-in" },
},
css: ["~/assets/css/main.scss"],
modules: [
"@vite-pwa/nuxt",
"@nuxtjs/color-mode",
"@nuxt/icon",
"@nuxt/content",
"@nuxtjs/sitemap",
[
"@nuxtjs/robots",
{
disableNuxtContentIntegration: true,
},
],
[
"@nuxtjs/google-fonts",
{
display: "swap",
families: {
Inter: [400, 500, 600, 700],
},
},
],
[
"@nuxtjs/tailwindcss",
{
viewer: false,
config: "~/tailwind.config.ts",
},
],
[
"nuxt-disqus",
{
shortname: "eggsy-xyz",
},
],
[
"nuxt-gtag",
{
enabled: process.env.NODE_ENV === "production",
id: process.env.GOOGLE_ANALYTICS_ID,
},
],
],
content: {
build: {
markdown: {
highlight: {
themes: ["vitesse-dark", "vitesse-light"],
theme: {
default: "vitesse-dark",
light: "vitesse-light",
dark: "vitesse-dark",
},
},
toc: {
depth: 5,
},
rehypePlugins: {
"rehype-external-links": {
target: "_blank",
rel: "noreferrer noopener",
},
"rehype-autolink-headings": {
behavior: "append",
},
},
},
},
},
sitemap: {
exclude: ["/api/content/posts/database.sql"],
urls: getBlogPosts().map((post) => `https://eggsy.xyz/blog/${post.slug}`),
},
site: {
url: "https://eggsy.xyz",
name: "eggsy.xyz",
},
pwa: {
manifest: {
name: "eggsy.xyz",
short_name: "eggsy.xyz",
theme_color: "#f56565",
description:
"Professional JavaScript developer from Turkey specializing in React.js, Vue.js, TypeScript, Node.js, and Flutter. Passionate about crafting innovative software solutions and continuously improving programming skills.",
lang: "en",
icons: [
{
src: "/icon.png",
sizes: "512x512",
type: "image/png",
},
],
},
},
runtimeConfig: {
public: {
social: {
twitter: "https://twitter.com/eggsydev/",
github: "https://github.com/eggsy/",
linkedIn: "https://linkedin.com/in/abdulbaki-dursun",
email: "eggsydev@gmail.com",
},
sponsor: {
github: "https://github.com/sponsors/eggsy",
},
isDev: process.env.NODE_ENV === "development",
},
},
hooks: {
"nitro:build:before": async () => {
if (process.env.NODE_ENV === "production") await generateOgImages()
},
},
compatibilityDate: "2025-01-16",
})