@t2ca/gatsby-theme-showcase 1.0.60 → 1.0.61

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/gatsby-node.js CHANGED
@@ -15,7 +15,7 @@ exports.createSchemaCustomization = ({ actions }) => {
15
15
  const { createTypes } = actions
16
16
 
17
17
  const typeDefs = `
18
- type ProjectYaml implements Node @infer {
18
+ type ProjectsYaml implements Node @infer {
19
19
  id: ID!
20
20
  slug: String!
21
21
  date: Date @dateformat
@@ -28,7 +28,7 @@ exports.createSchemaCustomization = ({ actions }) => {
28
28
  exports.createResolvers = ({ createResolvers }, options) => {
29
29
  const basePath = options.basePath || "/"
30
30
 
31
- const slugify = str => {
31
+ const slugify = (str) => {
32
32
  const slug = str
33
33
  .toLowerCase()
34
34
  .replace(/[^a-z0-9]+/g, "-")
@@ -38,9 +38,9 @@ exports.createResolvers = ({ createResolvers }, options) => {
38
38
  }
39
39
 
40
40
  createResolvers({
41
- ProjectYaml: {
41
+ ProjectsYaml: {
42
42
  slug: {
43
- resolve: source => slugify(source.title),
43
+ resolve: (source) => slugify(source.title),
44
44
  },
45
45
  },
46
46
  })
@@ -56,7 +56,7 @@ exports.createPages = async ({ actions, graphql, reporter }, options) => {
56
56
 
57
57
  const result = await graphql(`
58
58
  query {
59
- allProjectYaml(sort: { fields: slug, order: ASC }) {
59
+ allProjectsYaml(sort: { fields: slug, order: ASC }) {
60
60
  nodes {
61
61
  id
62
62
  slug
@@ -70,9 +70,9 @@ exports.createPages = async ({ actions, graphql, reporter }, options) => {
70
70
  return
71
71
  }
72
72
 
73
- const projects = result.data.allProjectYaml.nodes
73
+ const projects = result.data.allProjectsYaml.nodes
74
74
 
75
- projects.forEach(project => {
75
+ projects.forEach((project) => {
76
76
  const slug = project.slug
77
77
 
78
78
  actions.createPage({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@t2ca/gatsby-theme-showcase",
3
- "version": "1.0.60",
3
+ "version": "1.0.61",
4
4
  "main": "index.js",
5
5
  "license": "MIT",
6
6
  "devDependencies": {
@@ -19,7 +19,7 @@ export default ProjectTemplates
19
19
 
20
20
  export const query = graphql`
21
21
  query($projectID: String!) {
22
- projectYaml(id: { eq: $projectID }) {
22
+ projectsYaml(id: { eq: $projectID }) {
23
23
  title
24
24
  url
25
25
  body
@@ -3,10 +3,10 @@ import { graphql, useStaticQuery } from "gatsby"
3
3
  import Layout from "../components/layout"
4
4
  import ProjectList from "../components/project-list"
5
5
 
6
- const ProjectsTemplates = props => {
6
+ const ProjectsTemplates = (props) => {
7
7
  const data = useStaticQuery(graphql`
8
8
  query {
9
- allProjectYaml(sort: { fields: slug, order: ASC }) {
9
+ allProjectsYaml(sort: { fields: slug, order: ASC }) {
10
10
  nodes {
11
11
  id
12
12
  title
@@ -16,7 +16,7 @@ const ProjectsTemplates = props => {
16
16
  }
17
17
  `)
18
18
 
19
- const projects = data.allProjectYaml.nodes
19
+ const projects = data.allProjectsYaml.nodes
20
20
 
21
21
  const styles = {
22
22
  bg: `Menu`,