refactor(starter): upgrade to new version of gatsby

This commit is contained in:
Alexander Shelepenok
2022-01-09 20:12:31 +00:00
parent 84bdc5899d
commit 67ebabbaac
397 changed files with 26665 additions and 34984 deletions

View File

@@ -0,0 +1,52 @@
export default {
allMarkdownRemark: {
group: [
{
fieldValue: "typography",
totalCount: 1,
},
{
fieldValue: "design inspiration",
totalCount: 1,
},
],
edges: [
{
node: {
id: "08870ea6-bdc8-4ec6-bf72-1e7d4488eb72",
fields: {
slug: "/posts/perfecting-the-art-of-perfection",
categorySlug: "/typography",
},
frontmatter: {
date: "2016-09-01",
description:
"An Essay on Typography by Eric Gill takes the reader back to the year 1930. The year when a conflict between two worlds came to its term. The machines of the industrial world finally took over the handicrafts.",
category: "typography",
title: "Perfecting the Art of Perfection",
template: "post",
},
html: "",
},
},
{
node: {
id: "066adc91-f87a-4e57-9fef-7a677baf5c1d",
fields: {
slug: "/posts/the-birth-of-movable-type",
categorySlug: "/design-inspiration",
},
frontmatter: {
date: "2016-09-01",
description:
"German inventor Johannes Gutenberg developed a method of movable type and used it to create one of the western worlds first major printed books, the “FortyTwoLine” Bible.",
category: "design inspiration",
title: "Johannes Gutenberg: The Birth of Movable Type",
template: "post",
},
html: "",
},
},
],
},
};

View File

@@ -0,0 +1,8 @@
import contacts from "./contacts";
export default {
photo: "/static/photo.jpg",
bio: "Pellentesque odio nisi, euismod in, pharetra a, ultricies in, diam. Sed arcu.",
name: "John Doe",
contacts,
};

View File

@@ -0,0 +1,8 @@
export default {
rss: "#",
email: "#",
github: "#",
twitter: "#",
telegram: "#",
vkontakte: "#",
};

View File

@@ -0,0 +1,28 @@
import React from "react";
const gatsby = jest.requireActual("gatsby");
export default {
...gatsby,
graphql: jest.fn(),
Link: jest
.fn()
.mockImplementation(
({
activeClassName,
activeStyle,
getProps,
innerRef,
ref,
replace,
to,
...rest
}) =>
React.createElement("a", {
...rest,
href: to,
}),
),
StaticQuery: jest.fn(),
useStaticQuery: jest.fn(),
};

View File

@@ -0,0 +1,7 @@
export { default as allMarkdownRemark } from "./all-markdown-remark";
export { default as markdownRemark } from "./markdown-remark";
export { default as siteMetadata } from "./site-metadata";
export { default as pageContext } from "./page-context";
export { default as contacts } from "./contacts";
export { default as author } from "./author";
export { default as menu } from "./menu";

View File

@@ -0,0 +1,16 @@
export default {
id: "08870ea6-bdc8-4ec6-bf72-1e7d4488eb72",
fields: {
slug: "/posts/perfecting-the-art-of-perfection",
categorySlug: "/typography",
},
frontmatter: {
date: "2016-09-01",
description:
"An Essay on Typography by Eric Gill takes the reader back to the year 1930. The year when a conflict between two worlds came to its term. The machines of the industrial world finally took over the handicrafts.",
category: "typography",
title: "Perfecting the Art of Perfection",
template: "post",
},
html: "",
};

View File

@@ -0,0 +1,5 @@
export default [
{ label: "Articles", path: "/" },
{ label: "About Me", path: "/pages/about" },
{ label: "Contact Me", path: "/pages/contacts" },
];

View File

@@ -0,0 +1,12 @@
export default {
pageContext: {
group: "typography",
pagination: {
currentPage: 2,
prevPagePath: "/typography/page/1",
nextPagePath: "/typography/page/3",
hasNextPage: true,
hasPrevPage: true,
},
},
};

View File

@@ -0,0 +1,17 @@
import author from "./author";
import menu from "./menu";
export default {
site: {
siteMetadata: {
url: "https://www.lumen.local",
title: "Blog by John Doe",
subtitle:
"Pellentesque odio nisi, euismod in, pharetra a, ultricies in, diam. Sed arcu.",
copyright: "All rights reserved.",
postsPerPage: 4,
author,
menu,
},
},
};