diff --git a/src/components/Article/Article.js b/src/components/Article/Article.js
index 1b92cea..905aafa 100644
--- a/src/components/Article/Article.js
+++ b/src/components/Article/Article.js
@@ -6,6 +6,7 @@ import ViewCounter from '../ViewCounter/ViewCounter'
import useSiteMetadataQuery from '../../hooks/useSiteMetadataQuery'
import slugify from '../../helpers/slugify'
import { Link } from 'gatsby'
+import { useLocation } from '@reach/router'
import ViewsIcon from '../../images/views-icon.svg'
import VkIcon from '../../images/vk-icon.svg'
@@ -14,6 +15,8 @@ import FacebookIcon from '../../images/facebook-icon__large.svg'
const Article = ({ data: { slug, keywords, title, image, description, category, tags, time, date }, html }) => {
const { siteMetadata: { siteUrl } } = useSiteMetadataQuery()
+ const { pathname } = useLocation()
+
return (
<>
@@ -26,7 +29,7 @@ const Article = ({ data: { slug, keywords, title, image, description, category,
-
+
diff --git a/static/admin/config.yml b/static/admin/config.yml
index a5b83bd..05271e0 100644
--- a/static/admin/config.yml
+++ b/static/admin/config.yml
@@ -26,7 +26,7 @@ collections:
label: "Category"
folder: 'content/categories'
create: true
- slug: "{{year}}-{{month}}-{{day}}"
+ slug: "{{slug}}"
fields:
- {label: "Template key", name: "templateKey", widget: "hidden", default: "category"}
- {label: "Название категории", name: "title", widget: "string"}
@@ -34,7 +34,7 @@ collections:
label: "Tag"
folder: 'content/tags'
create: true
- slug: "{{year}}-{{month}}-{{day}}"
+ slug: "{{slug}}"
fields:
- {label: "Template key", name: "templateKey", widget: "hidden", default: "tag"}
- {label: "Название тэга", name: "title", widget: "string"}
@@ -42,7 +42,7 @@ collections:
label: "Book"
folder: 'content/books'
create: true
- slug: "{{year}}-{{month}}-{{day}}"
+ slug: "{{slug}}"
fields:
- {label: "Template key", name: "templateKey", widget: "hidden", default: "book"}
- {label: "Название книги", name: "title", widget: "string"}