gatsby-theme-wirehead-tree 0.0.7 → 0.0.9

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/README.md CHANGED
@@ -15,6 +15,7 @@ Specifically:
15
15
  * I want to be able to use a `type` key in the frontmatter to select the template because MDX has some weird stuff with it's native idea of templating and it doesn't really work the way I wanted it to.
16
16
  * I also want to be able to make JSX pages that have front matter in them. And I don't want to have a bunch of special-case code generating the navigational bits of the site that check if it's using JSX or MDX.
17
17
  * I wanted to mark something as a draft and have it not be published.
18
+ * I wanted to mark something as hidden and have it excluded from the page queries
18
19
 
19
20
  **WORK IN PROGRESS WARNING**: I'm totally not finished messing with this.
20
21
 
package/gatsby-node.js CHANGED
@@ -93,6 +93,19 @@ exports.onCreateNode = ({ node, actions }, pluginOptions) => {
93
93
  name: "date",
94
94
  value: node.frontmatter.date,
95
95
  });
96
+ if (node.frontmatter.hidden) {
97
+ createNodeField({
98
+ node,
99
+ name: "hidden",
100
+ value: node.frontmatter.hidden,
101
+ });
102
+ } else {
103
+ createNodeField({
104
+ node,
105
+ name: "hidden",
106
+ value: false,
107
+ });
108
+ }
96
109
  createNodeField({
97
110
  node,
98
111
  name: "updated",
@@ -129,6 +142,11 @@ exports.onCreateNode = ({ node, actions }, pluginOptions) => {
129
142
  name: "updated",
130
143
  value: null,
131
144
  });
145
+ createNodeField({
146
+ node,
147
+ name: "hidden",
148
+ value: null,
149
+ });
132
150
  }
133
151
  }
134
152
 
@@ -245,6 +263,7 @@ exports.createPages = async ({ actions, graphql, pathPrefix, reporter }, themeOp
245
263
  draft
246
264
  date
247
265
  updated
266
+ hidden
248
267
  }
249
268
  frontmatter {
250
269
  title
@@ -285,7 +304,7 @@ exports.createPages = async ({ actions, graphql, pathPrefix, reporter }, themeOp
285
304
  title: title,
286
305
  type: node.frontmatter.type,
287
306
  date: node.fields.date,
288
- hidden: node.frontmatter.hidden,
307
+ hidden: node.fields.hidden,
289
308
  breadcrumbs: toBreadcrumb(basePath, pagePath, titles),
290
309
  excerpt: node.frontmatter.description || node.excerpt,
291
310
  updated: node.fields.updated,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gatsby-theme-wirehead-tree",
3
- "version": "0.0.7",
3
+ "version": "0.0.9",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -28,17 +28,17 @@
28
28
  "node": ">=12.22.0"
29
29
  },
30
30
  "devDependencies": {
31
- "gatsby": "^3.3.0",
31
+ "gatsby": "^3.13.0",
32
32
  "react": "^17.0.2",
33
33
  "react-dom": "^17.0.2"
34
34
  },
35
35
  "peerDependencies": {
36
- "gatsby": "^3.3.0",
36
+ "gatsby": "^3.13.0",
37
37
  "react": "^17.0.2",
38
38
  "react-dom": "^17.0.2"
39
39
  },
40
40
  "dependencies": {
41
41
  "@babel/runtime": "^7.13.10",
42
- "gatsby-core-utils": "^2.3.0"
42
+ "gatsby-core-utils": "^2.15.0"
43
43
  }
44
44
  }