-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconstants.ts
178 lines (172 loc) · 3.72 KB
/
constants.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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
import { z } from 'zod'
import { SeoMetadataOptional } from '@/types'
export const DEFAULT_SEO_SCHEMA = z.object({
title: z.string().optional(),
description: z.string().optional(),
keywords: z.array(z.string()).optional(),
openGraph: z
.object({
type: z.string(),
url: z.string(),
title: z.string(),
description: z.string(),
locale: z.string(),
siteName: z.string()
})
.optional(),
twitter: z
.object({
card: z.string(),
site: z.string(),
title: z.string(),
description: z.string()
})
.optional(),
robots: z.string().optional(),
category: z.string().optional(),
applicationName: z.string().optional(),
generator: z.string().optional()
})
export type SeoMetadata = z.infer<typeof DEFAULT_SEO_SCHEMA> & SeoMetadataOptional
export const DIRECTORIES_TO_IGNORE = [
'node_modules',
'.git',
'.github',
'logs',
'.dvc',
'.pytest_cache',
'.svn',
'.tox',
'.vscode',
'.idea',
'assets',
'data',
'dist',
'docs',
'htmlcov',
'imgs',
'media',
'static',
'tests',
'testing',
'__tests__',
'tools',
'.DS_Store',
'examples',
'samples',
'output',
'out',
'.next',
'.nuxt',
'build',
'tmp',
'.husky',
'release',
'.devcontainer',
'.changeset',
'utils',
'.svelte-kit'
]
// I think a regular expression is better here to catch all config files, etc.
export const FILES_TO_IGNORE = [
'.editorconfig',
'.gitignore',
'.npmignore',
'.dockerignore',
'.env',
'.env.example',
'.env.local',
'.env.development.local',
'.env.test.local',
'.env.production.local',
'.babelrc',
'.dvcignore',
'.flake8',
'.git',
'.gitattributes',
'.gitkeep',
'.gitlab-ci',
'.gitmodules',
'.pre-commit-config.yaml',
'.project-root',
'.whitesource',
'AUTHORS',
'CHANGELOG',
'CODE_OF_CONDUCT',
'CONTRIBUTING',
'LICENSE',
'LICENSE-APACHE',
'LICENSE_APACHE-2.0',
'LICENSE-MIT',
'MANIFEST',
'README',
'README.md',
'appimage',
'bundle_dmg',
'gradlew',
'start',
'test_binary',
'mkdocs.yml',
'.markdownlint.yml',
'pnpm-lock.yaml',
'pnpm-workspace.yaml',
'tsconfig.json',
'.eslintignore',
'.eslintrc',
'.eslintrc.js',
'.eslintrc.json',
'.eslintcache',
'.nvmrc',
'.prettierrc.js',
'.prettierrc.json',
'.prettierrc',
'.prettierignore',
'favicon',
'__init__.py',
'package.json',
'package-lock.json',
'yarn.lock',
'jest.config.js',
'karma.conf.js',
'webpack.config.js',
'rollup.config.js',
'babel.config.js',
'vite.config.js',
'lerna.json',
'.npmrc',
'gulpfile.js',
'Gruntfile.js',
'vitest.config.ts',
'turbo.json',
'next.config.js',
'next.config.mjs',
'tailwind.config.ts',
'tailwind.config.js',
'tsup.config.ts',
'.turbo',
'next-env.d.ts',
'postcss.config.js',
'coverage',
'nuxt.config.ts',
'svelte.config.js',
'vite.config.ts'
]
type OptionValue = SeoMetadataOptional & { core: string }
type OptionTag = { value: keyof OptionValue; label: string; hint?: string }
export const OPTIONS_TAGS: OptionTag[] = [
{ value: 'core', label: 'Core SEO tags', hint: 'recommended' },
{ value: 'icons', label: 'Icons', hint: 'recommended' },
{ value: 'authors', label: 'Authors' },
{ value: 'creator', label: 'Creator' },
{ value: 'publisher', label: 'Publisher' },
{ value: 'classification', label: 'Classification' },
{ value: 'bookmarks', label: 'Bookmarks' },
{ value: 'assets', label: 'Assets' },
{ value: 'archives', label: 'Archives' },
{ value: 'referrer', label: 'Referrer' },
{ value: 'alternates', label: 'Canonical URL' },
{ value: 'formatDetection', label: 'Format Detection' },
{ value: 'manifest', label: 'Manifest' },
{ value: 'verification', label: 'Verification' },
{ value: 'viewport', label: 'Colors' }
]