{title}
{title}
-- {description} -
-
- diff --git a/content/articles/2020-07-02-second-article.md b/content/articles/2020-07-02-second-article.md index 3fcf081..5880c25 100644 --- a/content/articles/2020-07-02-second-article.md +++ b/content/articles/2020-07-02-second-article.md @@ -33,12 +33,12 @@ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc non fermentum ligu  ```js - module.exports = { - plugins: [ - { + module.exports = { + plugins: [ + { resolve: `plugin` - } - ] + } + ] } ``` diff --git a/gatsby-config.js b/gatsby-config.js index 857ee34..871f43f 100644 --- a/gatsby-config.js +++ b/gatsby-config.js @@ -35,6 +35,18 @@ module.exports = { resolve: `gatsby-transformer-remark`, options: { plugins: [ + { + 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: { diff --git a/package-lock.json b/package-lock.json index ee13c76..e248380 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7615,6 +7615,36 @@ } } }, + "gatsby-remark-autolink-headers": { + "version": "2.3.10", + "resolved": "https://registry.npmjs.org/gatsby-remark-autolink-headers/-/gatsby-remark-autolink-headers-2.3.10.tgz", + "integrity": "sha512-kSdYaU/rRxWKFfjtFCXFu+3ZG4aR45FTTjpe7murmduN4N8zj7xGNEK8yubecwv882DKJXAS/lTrgcJUJfoW3g==", + "requires": { + "@babel/runtime": "^7.10.3", + "github-slugger": "^1.3.0", + "lodash": "^4.17.15", + "mdast-util-to-string": "^1.1.0", + "unist-util-visit": "^1.4.1" + }, + "dependencies": { + "unist-util-visit": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-1.4.1.tgz", + "integrity": "sha512-AvGNk7Bb//EmJZyhtRUnNMEpId/AZ5Ph/KUpTI09WHQuDZHKovQ1oEv3mfmKpWKtoMzyMC4GLBm1Zy5k12fjIw==", + "requires": { + "unist-util-visit-parents": "^2.0.0" + } + }, + "unist-util-visit-parents": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-2.1.2.tgz", + "integrity": "sha512-DyN5vD4NE3aSeB+PXYNKxzGsfocxp6asDc2XXE3b0ekO2BaRUpBicbbUygfSvYfUz1IkmjFR1YF7dPklraMZ2g==", + "requires": { + "unist-util-is": "^3.0.0" + } + } + } + }, "gatsby-remark-prismjs": { "version": "3.5.9", "resolved": "https://registry.npmjs.org/gatsby-remark-prismjs/-/gatsby-remark-prismjs-3.5.9.tgz", diff --git a/package.json b/package.json index 384c658..92955e0 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,7 @@ "gatsby-plugin-react-helmet": "^3.3.8", "gatsby-plugin-react-svg": "^3.0.0", "gatsby-plugin-sass": "^2.3.7", + "gatsby-remark-autolink-headers": "^2.3.10", "gatsby-remark-prismjs": "^3.5.9", "gatsby-source-filesystem": "^2.3.18", "gatsby-transformer-remark": "^2.8.23", diff --git a/src/components/Article/Article.js b/src/components/Article/Article.js index c44f4a0..55b0b3a 100644 --- a/src/components/Article/Article.js +++ b/src/components/Article/Article.js @@ -1,4 +1,5 @@ import React from 'react'; +import SEO from '../SEO/SEO' import { Link } from 'gatsby' import './Article.scss' @@ -7,67 +8,77 @@ import VkIcon from '../../images/vk-icon.svg' import TwitterIcon from '../../images/twitter-icon__large.svg' import FacebookIcon from '../../images/facebook-icon__large.svg' -const Article = ({ data: { title, description, category, tags, time }, html }) => { +const Article = ({ data: { title, description, category, tags, time, date }, html }) => { return ( -
- {description} -
-
-