-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathgatsby-config.js
186 lines (182 loc) · 4.88 KB
/
gatsby-config.js
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
179
180
181
182
183
184
185
186
const path = require("path");
const fs = require("fs");
function getCurrentBranchName(p = process.cwd()) {
const gitHeadPath = `${p}/.git/HEAD`;
return fs.existsSync(p)
? fs.existsSync(gitHeadPath)
? fs.readFileSync(gitHeadPath, "utf-8").trim().split("/")[2]
: getCurrentBranchName(path.resolve(p, ".."))
: false;
}
const branch = getCurrentBranchName() || "master";
const prod = branch === "master";
module.exports = {
siteMetadata: {
title: prod ? "Linux Day Milano" : "Linux Day Milano (" + branch + ")",
description:
"Manifestazione italiana dedicata a GNU/Linux, al software libero, alla cultura aperta e alla condivisione.",
keywords:
"Linux Day, Milano, GNU, GNU/Linux, Open Source, Software Libero, Condivisione",
author: "unixMiB (https://unixmib.org)",
theme: "#343a40",
navbarVariant: "dark",
siteUrl: "https://linuxdaymilano.org/",
switches: {
schedule: true,
cfp: false,
sponsor_submit: false,
year_switcher: true,
},
event: {
date: new Date("2024-10-26"),
time: "9:00",
topic: "",
cfp: "https://survey.linux.it/index.php/315635",
cfs: "https://survey.linux.it/index.php/769265",
arguments: [
"Linux, software e hardware Open Source",
"Open Source nel mondo dell'istruzione",
"Alternative open a software proprietari",
"Innovazione nel mondo dell'Open Source",
"L'apprendimento mediante il Do It Yourself",
"Programmazione e tecniche di sviluppo",
],
},
contacts: {
email: "info@unixmib.org",
website: "https://unixmib.org",
place: {
name: "Università Milano Bicocca",
street: "Piazza dell'Ateneo Nuovo, 1",
building: "Edificio U6, primo piano",
cap: "20126 Milano MI",
},
},
},
graphqlTypegen: true,
plugins: [
"gatsby-plugin-react-helmet",
{
resolve: "gatsby-plugin-brotli",
options: {
extensions: ["css", "html", "js", "svg"],
},
},
{
resolve: `gatsby-plugin-sass`,
options: {
implementation: require("sass"),
},
},
{
resolve: "gatsby-plugin-canonical-urls",
options: {
siteUrl: "https://linuxdaymilano.org/",
},
},
"gatsby-transformer-yaml",
{
resolve: "gatsby-plugin-manifest",
options: {
name: prod ? "Linux Day Milano" : "Linux Day Milano (" + branch + ")",
short_name: prod ? "LDMI" : "LDMI λ",
start_url: "/",
lang: "it",
icon_options: {
purpose: "any",
},
description: "Sito ufficiale del Linux Day Milano",
background_color: "#212529",
theme_color: "#212529",
display: "minimal-ui",
icon: "./src/assets/favicon_foot_transparent.svg",
},
},
{
resolve: "gatsby-source-filesystem",
options: {
name: "brands",
path: path.join(__dirname, "src", "assets", "brands"),
},
},
{
resolve: "gatsby-source-filesystem",
options: {
name: "images",
path: path.join(__dirname, "src", "assets", "images"),
},
},
{
resolve: "gatsby-source-filesystem",
options: {
name: "schedules",
path: path.join(__dirname, "src", "schedules"),
},
},
"gatsby-plugin-offline",
{
resolve: "gatsby-plugin-robots-txt",
options: {
recachePages: [`/`, `/schedule`, `/404`],
policy: [
{
userAgent: "*",
allow: "/",
},
],
},
},
"gatsby-plugin-sitemap",
{
resolve: "gatsby-plugin-sharp",
options: {
useMozJpeg: true,
stripMetadata: true,
defaultQuality: 80,
},
},
"gatsby-transformer-sharp",
"gatsby-plugin-image",
{
resolve: "gatsby-transformer-remark",
options: {
plugins: [
{
resolve: "gatsby-remark-images",
options: {
maxWidth: 1920,
linkImagesToOriginal: true,
quality: 70,
withWebp: true,
},
},
],
},
},
"gatsby-plugin-catch-links",
{
resolve: "gatsby-plugin-netlify",
options: {
headers: {
"/sw.js": ["Cache-Control: no-cache"],
"/*": [
"Permissions-Policy: autoplay=(),camera=(),fullscreen=(self),geolocation=(),microphone=(),payment=()",
"Strict-Transport-Security: max-age=63072000; includeSubdomains; preload",
"X-Content-Type-Options: nosniff",
"Referrer-Policy: no-referrer",
],
},
mergeSecurityHeaders: true,
//mergeLinkHeaders: true,
mergeCachingHeaders: true,
},
},
{
resolve: "gatsby-plugin-nprogress",
options: {
color: "gray",
showSpinner: false,
},
},
],
};