mirror of
https://github.com/SantaSpeen/santaspeen.ru-blog.git
synced 2026-02-16 02:30:58 +00:00
133 lines
3.6 KiB
JavaScript
133 lines
3.6 KiB
JavaScript
/**
|
|
* @type {import('gatsby').GatsbyConfig}
|
|
*/
|
|
module.exports = {
|
|
siteMetadata: {
|
|
title: `Artur Akmalov`,
|
|
siteUrl: `https://dev.akmalov.com`,
|
|
description: 'The personal blog Artur Akmalov',
|
|
image: './images/icon.png',
|
|
keywords: ['React', 'React Native', 'Node'],
|
|
githubUrl: 'https://github.com/akmalovaa',
|
|
linkedInUrl: 'https://linkedin.com/in/akmalovaa',
|
|
},
|
|
plugins: ["gatsby-plugin-image", "gatsby-plugin-sitemap", "gatsby-plugin-postcss", {
|
|
resolve: 'gatsby-plugin-manifest',
|
|
options: {
|
|
name: 'Artur Akmalov',
|
|
short_name: 'Artur Akmalov',
|
|
start_url: '/',
|
|
background_color: '#282a36',
|
|
theme_color: '#ffb86c',
|
|
display: 'standalone',
|
|
icon: 'src/images/icon.png',
|
|
lang: 'ru',
|
|
icons: [
|
|
{
|
|
src: 'src/images/icon.png',
|
|
sizes: '512x512',
|
|
type: 'image/png',
|
|
purpose: 'any maskable',
|
|
},
|
|
],
|
|
}
|
|
}, "gatsby-transformer-remark", "gatsby-plugin-sharp", "gatsby-transformer-sharp",
|
|
{
|
|
resolve: 'gatsby-plugin-mdx',
|
|
options: {
|
|
gatsbyRemarkPlugins: [
|
|
{
|
|
resolve: 'gatsby-remark-images',
|
|
options: {
|
|
maxWidth: 800,
|
|
},
|
|
},
|
|
],
|
|
},
|
|
},
|
|
{
|
|
resolve: 'gatsby-source-filesystem',
|
|
options: {
|
|
name: 'blog',
|
|
path: 'blog',
|
|
// ignore: isDev ? [] : ['**/drafts'],
|
|
},
|
|
},
|
|
{
|
|
resolve: 'gatsby-source-filesystem',
|
|
options: {
|
|
"name": "images",
|
|
"path": "./src/images/"
|
|
},
|
|
__key: "images"
|
|
},
|
|
{
|
|
resolve: 'gatsby-source-filesystem',
|
|
options: {
|
|
"name": "pages",
|
|
"path": "./src/pages/"
|
|
},
|
|
__key: "pages"
|
|
},
|
|
{
|
|
resolve: `gatsby-plugin-feed`,
|
|
options: {
|
|
query: `
|
|
{
|
|
site {
|
|
siteMetadata {
|
|
title
|
|
description
|
|
siteUrl
|
|
site_url: siteUrl
|
|
}
|
|
}
|
|
}
|
|
`,
|
|
feeds: [
|
|
{
|
|
serialize: ({ query: { site, allMarkdownRemark } }) => {
|
|
return allMarkdownRemark.nodes.map(node => {
|
|
return Object.assign({}, node.frontmatter, {
|
|
description: node.excerpt,
|
|
date: node.frontmatter.date,
|
|
url: site.siteMetadata.siteUrl + node.fields.slug,
|
|
guid: site.siteMetadata.siteUrl + node.fields.slug,
|
|
custom_elements: [{ "content:encoded": node.html }],
|
|
})
|
|
})
|
|
},
|
|
query: `
|
|
{
|
|
allMarkdownRemark(
|
|
sort: { order: DESC, fields: [frontmatter___date] },
|
|
) {
|
|
nodes {
|
|
excerpt
|
|
html
|
|
fields {
|
|
slug
|
|
}
|
|
frontmatter {
|
|
title
|
|
date
|
|
}
|
|
}
|
|
}
|
|
}
|
|
`,
|
|
output: "/feed.xml",
|
|
title: "Akmalov RSS Feed",
|
|
// optional configuration to insert feed reference in pages:
|
|
// if `string` is used, it will be used to create RegExp and then test if pathname of
|
|
// current page satisfied this regular expression;
|
|
// if not provided or `undefined`, all pages will have feed reference inserted
|
|
match: "^/blog/",
|
|
// optional configuration to specify external rss feed, such as feedburner
|
|
link: "https://feeds.feedburner.com/gatsby/blog",
|
|
},
|
|
],
|
|
},
|
|
},
|
|
],
|
|
}; |