2022-04-16 16:25:55 +02:00
|
|
|
import path from "path";
|
2018-11-09 18:08:48 +01:00
|
|
|
|
2022-04-16 16:25:55 +02:00
|
|
|
import config from "./content/config.json";
|
|
|
|
import * as types from "./internal/gatsby/types";
|
|
|
|
|
|
|
|
export default {
|
2022-01-09 21:12:31 +01:00
|
|
|
pathPrefix: config.pathPrefix,
|
2022-10-17 17:11:55 +02:00
|
|
|
trailingSlash: "always",
|
2017-08-20 13:43:49 +02:00
|
|
|
siteMetadata: {
|
2022-10-17 18:39:04 +02:00
|
|
|
siteUrl: config.url,
|
2022-01-09 21:12:31 +01:00
|
|
|
url: config.url,
|
2022-04-16 16:25:55 +02:00
|
|
|
menu: config.menu,
|
2022-09-10 09:27:37 +02:00
|
|
|
legalMenu: config.legalMenu,
|
2022-01-09 21:12:31 +01:00
|
|
|
title: config.title,
|
2022-04-16 16:25:55 +02:00
|
|
|
author: config.author,
|
2022-01-09 21:12:31 +01:00
|
|
|
subtitle: config.subtitle,
|
|
|
|
copyright: config.copyright,
|
2022-04-16 16:25:55 +02:00
|
|
|
postsLimit: config.postsLimit,
|
2022-01-09 21:12:31 +01:00
|
|
|
disqusShortname: config.disqusShortname,
|
2017-08-20 13:43:49 +02:00
|
|
|
},
|
|
|
|
plugins: [
|
|
|
|
{
|
2022-01-09 21:12:31 +01:00
|
|
|
resolve: "gatsby-source-filesystem",
|
2019-07-19 19:42:20 +02:00
|
|
|
options: {
|
2022-01-09 21:12:31 +01:00
|
|
|
name: "content",
|
2022-04-16 16:25:55 +02:00
|
|
|
path: path.resolve("content"),
|
2022-01-09 21:12:31 +01:00
|
|
|
},
|
2018-11-09 20:20:44 +01:00
|
|
|
},
|
2017-08-20 13:43:49 +02:00
|
|
|
{
|
2022-01-09 21:12:31 +01:00
|
|
|
resolve: "gatsby-plugin-feed",
|
2017-08-20 13:43:49 +02:00
|
|
|
options: {
|
|
|
|
query: `
|
|
|
|
{
|
|
|
|
site {
|
|
|
|
siteMetadata {
|
2022-01-09 21:12:31 +01:00
|
|
|
url
|
2017-08-20 13:43:49 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`,
|
2022-01-09 21:12:31 +01:00
|
|
|
feeds: [
|
|
|
|
{
|
2022-04-16 16:25:55 +02:00
|
|
|
serialize: ({
|
|
|
|
query: { site, allMarkdownRemark },
|
|
|
|
}: {
|
|
|
|
query: {
|
|
|
|
site: {
|
|
|
|
siteMetadata: {
|
|
|
|
url: string;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
allMarkdownRemark: {
|
|
|
|
edges: Array<types.Edge>;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}) =>
|
|
|
|
allMarkdownRemark.edges.map(({ node }) => ({
|
|
|
|
...node.frontmatter,
|
|
|
|
date: node?.frontmatter?.date,
|
|
|
|
description: node?.frontmatter?.description,
|
|
|
|
url: site.siteMetadata.url + node?.fields?.slug,
|
|
|
|
guid: site.siteMetadata.url + node?.fields?.slug,
|
|
|
|
custom_elements: [{ "content:encoded": node.html }],
|
2022-01-09 21:12:31 +01:00
|
|
|
})),
|
2023-03-26 23:20:54 +02:00
|
|
|
query: `{
|
|
|
|
allMarkdownRemark(
|
|
|
|
limit: 1000
|
|
|
|
sort: {frontmatter: {date: DESC}}
|
|
|
|
filter: {frontmatter: {template: {eq: "post"}, draft: {ne: true}}}
|
|
|
|
) {
|
|
|
|
edges {
|
|
|
|
node {
|
|
|
|
html
|
|
|
|
fields {
|
|
|
|
slug
|
|
|
|
}
|
|
|
|
frontmatter {
|
|
|
|
date
|
|
|
|
title
|
|
|
|
description
|
2017-08-20 13:43:49 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2023-03-26 23:20:54 +02:00
|
|
|
}`,
|
2022-01-09 21:12:31 +01:00
|
|
|
output: "/rss.xml",
|
|
|
|
title: config.title,
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
2017-08-20 13:43:49 +02:00
|
|
|
},
|
|
|
|
{
|
2022-01-09 21:12:31 +01:00
|
|
|
resolve: "gatsby-transformer-remark",
|
2017-08-20 13:43:49 +02:00
|
|
|
options: {
|
|
|
|
plugins: [
|
|
|
|
{
|
2022-01-09 21:12:31 +01:00
|
|
|
resolve: "gatsby-remark-images",
|
2019-07-16 13:58:11 +02:00
|
|
|
options: {
|
|
|
|
maxWidth: 960,
|
2022-01-09 21:12:31 +01:00
|
|
|
withWebp: true,
|
2022-09-20 18:48:33 +02:00
|
|
|
linkImagesToOriginal: false,
|
|
|
|
showCaptions: ["title"],
|
2022-01-09 21:12:31 +01:00
|
|
|
},
|
2017-08-20 13:43:49 +02:00
|
|
|
},
|
|
|
|
{
|
2022-01-09 21:12:31 +01:00
|
|
|
resolve: "gatsby-remark-responsive-iframe",
|
|
|
|
options: { wrapperStyle: "margin-bottom: 1.0725rem" },
|
2017-08-20 13:43:49 +02:00
|
|
|
},
|
2022-09-20 18:48:33 +02:00
|
|
|
{
|
|
|
|
resolve: "gatsby-remark-images-medium-zoom",
|
2023-04-12 23:06:52 +02:00
|
|
|
options: { background: "rgb(0, 0, 0,70%)" },
|
2022-09-20 18:48:33 +02:00
|
|
|
},
|
2022-01-09 21:12:31 +01:00
|
|
|
"gatsby-remark-autolink-headers",
|
|
|
|
"gatsby-remark-prismjs",
|
|
|
|
"gatsby-remark-copy-linked-files",
|
|
|
|
"gatsby-remark-smartypants",
|
|
|
|
"gatsby-remark-external-links",
|
|
|
|
],
|
|
|
|
},
|
2018-01-21 16:54:33 +01:00
|
|
|
},
|
2022-01-09 21:12:31 +01:00
|
|
|
"gatsby-transformer-sharp",
|
|
|
|
"gatsby-plugin-sharp",
|
2022-10-13 22:57:43 +02:00
|
|
|
{
|
|
|
|
resolve: "gatsby-plugin-google-gtag",
|
|
|
|
options: {
|
|
|
|
trackingIds: [config.googleAnalyticsId],
|
|
|
|
pluginConfig: {
|
|
|
|
head: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2017-08-20 13:43:49 +02:00
|
|
|
{
|
2022-01-09 21:12:31 +01:00
|
|
|
resolve: "gatsby-plugin-sitemap",
|
2017-08-20 13:43:49 +02:00
|
|
|
options: {
|
|
|
|
query: `
|
2018-11-09 18:08:48 +01:00
|
|
|
{
|
|
|
|
site {
|
|
|
|
siteMetadata {
|
2019-05-10 02:52:30 +02:00
|
|
|
siteUrl: url
|
2017-08-20 13:43:49 +02:00
|
|
|
}
|
2018-11-09 18:08:48 +01:00
|
|
|
}
|
|
|
|
allSitePage(
|
|
|
|
filter: {
|
|
|
|
path: { regex: "/^(?!/404/|/404.html|/dev-404-page/)/" }
|
|
|
|
}
|
|
|
|
) {
|
2022-04-16 16:25:55 +02:00
|
|
|
nodes {
|
|
|
|
path
|
2017-08-20 13:43:49 +02:00
|
|
|
}
|
2018-11-09 18:08:48 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
`,
|
2022-01-09 21:12:31 +01:00
|
|
|
},
|
2017-08-20 13:43:49 +02:00
|
|
|
},
|
2019-01-21 23:11:07 +01:00
|
|
|
{
|
2022-01-09 21:12:31 +01:00
|
|
|
resolve: "gatsby-plugin-manifest",
|
2019-01-21 23:11:07 +01:00
|
|
|
options: {
|
2022-01-09 21:12:31 +01:00
|
|
|
name: config.title,
|
|
|
|
short_name: config.title,
|
2022-04-16 16:25:55 +02:00
|
|
|
theme_color: "hsl(31, 92%, 62%)",
|
|
|
|
background_color: "hsl(0, 0%, 100%)",
|
2022-09-04 23:58:49 +02:00
|
|
|
icon: "content/me.png",
|
2022-04-16 16:25:55 +02:00
|
|
|
display: "standalone",
|
|
|
|
start_url: "/",
|
2019-01-21 23:11:07 +01:00
|
|
|
},
|
|
|
|
},
|
2023-03-26 23:20:54 +02:00
|
|
|
{
|
|
|
|
resolve: "gatsby-plugin-react-helmet-canonical-urls",
|
|
|
|
options: {
|
|
|
|
siteUrl: config.url,
|
|
|
|
stripQueryString: true,
|
|
|
|
},
|
|
|
|
},
|
2023-09-24 01:25:53 +02:00
|
|
|
// remove the old service worker if it is available.
|
2023-04-19 09:15:11 +02:00
|
|
|
"gatsby-plugin-remove-serviceworker",
|
2022-04-16 16:25:55 +02:00
|
|
|
"gatsby-plugin-image",
|
|
|
|
"gatsby-plugin-catch-links",
|
|
|
|
"gatsby-plugin-react-helmet",
|
2022-01-09 21:12:31 +01:00
|
|
|
"gatsby-plugin-optimize-svgs",
|
2022-04-16 16:25:55 +02:00
|
|
|
"gatsby-plugin-sass",
|
2022-10-17 18:39:04 +02:00
|
|
|
"gatsby-plugin-robots-txt",
|
2022-01-09 21:12:31 +01:00
|
|
|
],
|
2017-08-20 13:43:49 +02:00
|
|
|
};
|