@jungvonmatt/cssg-plugin-hugo 1.4.10 → 1.4.11

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.
Files changed (3) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/index.js +2 -1
  3. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [1.4.11](https://github.com/jungvonmatt/contentful-ssg/compare/v1.4.10...v1.4.11) (2022-02-23)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **hugo-menu:** makes menu roots configurable ([ac10c2f](https://github.com/jungvonmatt/contentful-ssg/commit/ac10c2f73646016d3ac69fd96f8a2ebca2247043))
12
+
13
+
14
+
15
+
16
+
6
17
  ## [1.4.10](https://github.com/jungvonmatt/contentful-ssg/compare/v1.4.9...v1.4.10) (2022-02-22)
7
18
 
8
19
 
package/index.js CHANGED
@@ -26,6 +26,7 @@ const defaultOptions = {
26
26
  fieldIdMenuEntries: 'entries',
27
27
  fieldIdMenuHide: 'hide_in_menu',
28
28
  fieldIdMenuPos: 'menu_pos',
29
+ menuRootTypes: ['page', 'folder', 'x-folder'],
29
30
  typeConfig: {
30
31
  [TYPE_CONTENT]: ['page'],
31
32
  },
@@ -95,7 +96,7 @@ export default (args) => {
95
96
  const node = entryMap.get(id);
96
97
  const contentType = node?.sys?.contentType?.sys?.id ?? '';
97
98
  const pageId = node?.fields?.link_to_entry?.sys?.id;
98
- if (contentType === 'page') {
99
+ if (options.menuRootTypes.contains(contentType)) {
99
100
  return node;
100
101
  }
101
102
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jungvonmatt/cssg-plugin-hugo",
3
- "version": "1.4.10",
3
+ "version": "1.4.11",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "typings": "./index.d.ts",
@@ -30,5 +30,5 @@
30
30
  "fs-extra": "^10.0.0",
31
31
  "micromatch": "^4.0.4"
32
32
  },
33
- "gitHead": "53f5bcf6494911e56ec8f2d7975de6b3286633fd"
33
+ "gitHead": "0ea3a4740c8c7842e523bcc1dea109d0b527c77e"
34
34
  }