const queries = require('./src/utils/algolia') require('dotenv').config() module.exports = { siteMetadata: { title: 'devthread.ru', keywords: 'веб разработка, javascript, seo, программирование, reactjs, graphql', siteName: 'Cборник статей и руководств - devthread.ru', titleTemplate: '%s · статьи и руководства по веб-разработке', description: 'Cборник статей и руководств по тематике веб-разработки и IT для того чтобы помочь вам', url: 'https://devthread.netlify.app', menuLinks: [ { name: 'Статьи', link: '/articles' }, { name: 'О сайте', link: '/about' }, { name: 'Контакты', link: '/contacts' }, { name: 'Ресурсы', link: '/books' } ], social: { email: 'support@devthread.ru', telegram: 'https://t.me/devthread', twitter: 'https://twitter.com/devthread', yadzen: 'https://zen.yandex.ru/' } }, plugins: [ 'gatsby-plugin-react-helmet', 'gatsby-plugin-sass', { resolve: 'gatsby-source-filesystem', options: { path: `${__dirname}/static/assets`, name: 'assets', }, }, { resolve: `gatsby-plugin-algolia`, options: { appId: process.env.GATSBY_ALGOLIA_APP_ID, apiKey: process.env.ALGOLIA_ADMIN_KEY, queries, chunkSize: 10000, }, }, { resolve: `gatsby-plugin-manifest`, options: { name: `devthread`, short_name: `devthread`, start_url: `/`, background_color: `#ffffff`, icons: [ { src: `/android-chrome-192x192.png`, sizes: `192x192`, type: `image/png`, }, { src: `/android-chrome-512x512.png`, sizes: `512x512`, type: `image/png`, }, ], theme_color: `#ffffff`, display: `standalone`, }, }, "gatsby-plugin-sharp", "gatsby-transformer-sharp", { resolve: `gatsby-transformer-remark`, options: { plugins: [ { resolve: `gatsby-remark-relative-images`, options: { name: "assets" } }, { resolve: `gatsby-remark-images`, }, { resolve: `gatsby-remark-autolink-headers`, options: { offsetY: `140`, icon: ``, className: `anchor-link`, maintainCase: true, removeAccents: true, isIconAfterHeader: true, elements: [`h1`, `h2`, `h3`, `h4`], }, }, { resolve: `gatsby-remark-prismjs`, options: { classPrefix: "language-", inlineCodeMarker: null, aliases: {}, showLineNumbers: false, noInlineHighlight: false, languageExtensions: [ { language: "superscript", extend: "javascript", definition: { superscript_types: /(SuperType)/, }, insertBefore: { function: { superscript_keywords: /(superif|superelse)/, }, }, }, ], prompt: { user: "root", host: "localhost", global: false, }, escapeEntities: {}, }, } ], }, }, { resolve: 'gatsby-plugin-local-search', options: { name: 'pages', engine: 'flexsearch', engineOptions: 'speed', query: ` { allMarkdownRemark(filter: { frontmatter: { templateKey: { eq: "article" } } }) { nodes { id frontmatter { slug title category image { childImageSharp { fluid(maxWidth: 960) { aspectRatio base64 sizes src srcSet } } } tags description } rawMarkdownBody } } } `, ref: 'id', index: ['title', 'category', 'body', 'tags', 'description'], store: ['id', 'slug', 'title', 'category', 'tags', 'description', 'image'], normalizer: ({ data }) => data.allMarkdownRemark.nodes.map(node => ({ id: node.id, slug: node.frontmatter.slug, title: node.frontmatter.title, category: node.frontmatter.category, description: node.frontmatter.description, image: node.frontmatter.image, tags: node.frontmatter.tags, body: node.rawMarkdownBody, })), }, }, { resolve: 'gatsby-plugin-react-svg', options: { rule: { include: /images/ } } }, { resolve: 'gatsby-source-filesystem', options: { name: 'content', path: `${__dirname}/content` } }, 'gatsby-plugin-netlify-cms', ], }