-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgatsby-config.ts
65 lines (61 loc) · 1.42 KB
/
gatsby-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
import type { GatsbyConfig } from "gatsby";
import { JaenSource } from "jaen-utils";
import { IJaenPage } from "@snek-at/jaen";
JaenSource.jaenData.read();
const siteUrl = JaenSource.jaenData.internal?.siteMetadata?.siteUrl || "";
const config: GatsbyConfig = {
flags: {
DEV_SSR: false,
},
siteMetadata: {
title: `vienna-hotels`,
siteUrl: `https://www.yourdomain.tld`,
},
jsxRuntime: "automatic",
plugins: [
{
resolve: `gatsby-source-filesystem`,
options: {
name: "iamges",
path: `${__dirname}/src/images/`,
},
},
{
resolve: `gatsby-plugin-jaen`,
options: {
snekResourceId: `63571eee-f41c-4745-9130-d746c2cb97a3`,
},
},
{
resolve: `gatsby-plugin-sitemap`,
options: {
excludes: [`/jaen/admin`, `/_`],
query: `
{
allSitePage {
nodes {
path
}
}
}`,
resolveSiteUrl: () => siteUrl,
resolvePages: ({
allSitePage: { nodes: allPages },
}: {
allSitePage: { nodes: IJaenPage[] };
}) => {
return allPages.map((page) => {
return { ...page };
});
},
serialize: ({ path, modifiedGmt }: any) => {
return {
url: path,
lastmod: modifiedGmt,
};
},
},
},
],
};
export default config;