-
Notifications
You must be signed in to change notification settings - Fork 57
/
Copy pathnuxt.config.ts
138 lines (135 loc) · 5.33 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
import dotenv from 'dotenv';
import fs from 'fs';
import { defineNuxtConfig } from 'nuxt/config';
import { envPath, defaultEnvPath } from './env.config';
dotenv.config({
path: fs.existsSync(envPath) ? envPath : defaultEnvPath,
});
export default defineNuxtConfig({
alias: {
'@vue/devtools-api': '@vue/devtools-api',
},
runtimeConfig: {
public: {
meilisearch: {
searchApiKey: process.env.MEILISEARCH_SEARCH_API_KEY,
docIndex: process.env.MEILISEARCH_INDEX,
host: process.env.MEILISEARCH_HOST,
},
nodeops_playground_lite: {
host: process.env.NODEOPS_PLAYGROUND_LITE_HOST,
basicAuth: process.env.NODEOPS_PLAYGROUND_LITE_BASIC_AUTH,
user: process.env.NODEOPS_PLAYGROUND_LITE_USER,
},
}
},
generate: {
routes: ['/404'],
},
sourcemap: false,
build: {
transpile: ['@headlessui/vue'],
},
modules: [
['@nuxt/content', { documentDriven: true, navigation: { fields: ['parentSection'] } }],
'@nuxtjs/robots',
'nuxt-simple-sitemap',
],
postcss: {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
},
css: ['@/assets/css/app.css'],
app: {
head: {
htmlAttrs: { lang: 'en' },
charset: 'utf-8',
viewport: 'width=device-width, initial-scale=1',
title: 'Archway Docs',
meta: [
{
key: 'description',
name: 'description',
content:
'Learn how to build & launch decentralized apps (dapps) & smart contracts, including how to run a node OR participate in the Archway Ecosystem.',
},
{ key: 'og:url', property: 'og:url', content: 'https://docs.archway.io' },
{ key: 'og:type', property: 'og:type', content: 'website' },
{ key: 'og:title', property: 'og:title', content: 'Archway Docs' },
{
key: 'og:description',
property: 'og:description',
content:
'Learn how to build & launch decentralized apps (dapps) & smart contracts, including how to run a node OR participate in the Archway Ecosystem.',
},
{ key: 'og:site_name', property: 'og:site_name', content: 'Archway Docs' },
{ key: 'og:image', property: 'og:image', content: 'https://archway.io/og-image.jpg' },
{ key: 'twitter:card', name: 'twitter:card', content: 'summary_large_image' },
{ key: 'twitter:domain', name: 'twitter:domain', content: 'docs.archway.io' },
{ key: 'twitter:site', name: 'twitter:site', content: '@cosmos' },
{ key: 'twitter:title', name: 'twitter:title', content: 'Archway Docs' },
{
key: 'twitter:description',
name: 'twitter:description',
content:
'Learn how to build & launch decentralized apps (dapps) & smart contracts, including how to run a node OR participate in the Archway Ecosystem.',
},
{ key: 'twitter:image', name: 'twitter:image', content: 'https://archway.io/og-image.jpg' },
{ key: 'twitter:image:alt', name: 'twitter:image:alt', content: 'Archway Docs' },
{ key: 'theme-color-light', name: 'theme-color', content: '#ff4d00', media: '(prefers-color-scheme: light)' },
{ key: 'theme-color-dark', name: 'theme-color', content: '#ff4d00', media: '(prefers-color-scheme: dark)' },
],
link: [
{ rel: 'icon', href: '/favicon.ico' },
{ rel: 'icon', type: 'image/svg+xml', href: '/favicon.svg' },
{ rel: 'apple-touch-icon', sizes: '180x180', href: '/apple-touch-icon.png' },
{ rel: 'apple-touch-icon-precomposed', href: '/apple-touch-icon-precomposed.png' },
{ rel: 'icon', type: 'image/png', sizes: '32x32', href: '/favicon-32x32.png' },
{ rel: 'icon', type: 'image/png', sizes: '16x16', href: '/favicon-16x16.png' },
{ rel: 'mask-icon', href: '/safari-pinned-tab.svg', color: 'black' },
{ rel: 'preload', as: 'style', href: 'https://fonts.googleapis.com/css?family=Inter:500&display=swap' },
],
script: [
{
children: `(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-54W7BX3');`,
type: 'text/javascript',
},
],
noscript: [
{
children:
'<div style="background:#FF4D00;color:white;font-size:1rem;font-style:italic;padding-left:20px;margin-top:1750px">This site requires Javascript to be enabled.<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-54W7BX3" height="0" width="0" style="display:none;visibility:keyden"></iframe></div>',
},
],
},
},
content: {
highlight: {
theme: {
// Default theme (same as single string)
default: 'github-light',
// Theme used if `html.dark`
dark: 'github-dark',
// Theme used if `html.sepia`
sepia: 'monokai',
},
preload: ['c', 'cpp', 'java', 'js', 'rust', 'json', 'bash', 'yaml', 'toml'],
},
},
robots: {
configPath: 'robots.config.js',
},
sitemap: {
hostname: 'https://docs.archway.io',
},
ssr: true,
nitro: {
preset: 'firebase',
prerender: {
crawlLinks: true,
routes: ['/'],
},
},
});