[READ-ONLY] Mirror of https://github.com/danielroe/firstcommit.is. Find your first open-source commit on GitHub
firstcommit.is
api
commit
github
nuxt
oauth
2.3 kB
104 lines
1import { createResolver } from 'nuxt/kit'
2
3const resolver = createResolver(import.meta.url)
4
5// https://nuxt.com/docs/api/configuration/nuxt-config
6export default defineNuxtConfig({
7 modules: ['@nuxtjs/tailwindcss', '@nuxtjs/fontaine', 'nuxt-time', 'nuxt-og-image', '@nuxtjs/plausible', '@nuxt/eslint'],
8 devtools: { enabled: true },
9 experimental: { typedPages: true, componentIslands: true },
10 fontMetrics: {
11 fonts: [
12 {
13 family: 'Cal Sans',
14 src: '../node_modules/cal-sans/fonts/webfonts/CalSans-SemiBold.woff2'
15 }
16 ],
17 },
18 app: {
19 head: {
20 link: [
21 {
22 rel: 'apple-touch-icon',
23 sizes: '180x180',
24 href: '/apple-touch-icon.png'
25 },
26 {
27 rel: 'icon',
28 type: 'image/png',
29 sizes: '32x32',
30 href: '/favicon-32x32.png'
31 },
32 {
33 rel: 'icon',
34 type: 'image/png',
35 sizes: '16x16',
36 href: '/favicon-16x16.png'
37 },
38 {
39 rel: 'manifest',
40 href: '/site.webmanifest'
41 },
42 {
43 rel: 'mask-icon',
44 href: '/safari-pinned-tab.svg',
45 color: '#000000'
46 },
47 ],
48 meta: [
49 { name: 'theme-color', content: '#ffffff' },
50 { name: 'msapplication-TileColor', content: '#000000' },
51 ],
52 }
53 },
54 vue: {
55 defineModel: true,
56 },
57 runtimeConfig: {
58 url: 'http://localhost:3000',
59 github: {
60 token: '',
61 // OAuth client
62 clientId: '',
63 clientSecret: '',
64 }
65 },
66 ogImage: {
67 fonts: [
68 'Inter:400',
69 'Inter:700',
70 {
71 name: 'Cal Sans',
72 weight: 600,
73 path: 'https://cdn.jsdelivr.net/npm/cal-sans@1.0.1/fonts/webfonts/CalSans-SemiBold.woff'
74 }
75 ]
76 },
77 plausible: {
78 domain: 'firstcommit.is',
79 apiHost: '/_v',
80 },
81 nitro: {
82 prerender: {
83 routes: ['/']
84 },
85 publicAssets: [
86 {
87 baseURL: '/fonts',
88 dir: resolver.resolve('./node_modules/cal-sans/fonts/webfonts'),
89 maxAge: 60 * 60 * 24 * 365
90 }
91 ]
92 },
93 routeRules: {
94 '/_v/**': { proxy: 'https://v.roe.dev/**' }
95 },
96 $production: {
97 routeRules: {
98 '/**': { isr: true },
99 '/_v/**': { isr: false },
100 '/oauth/**': { isr: false },
101 '/connect/**': { isr: false }
102 }
103 },
104})