@anywayseo/gatsby-plugin 2.6.1 → 2.8.0

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@anywayseo/gatsby-plugin",
3
3
  "description": "Shared config for Anywayseo sites",
4
- "version": "2.6.1",
4
+ "version": "2.8.0",
5
5
  "author": "zerg41",
6
6
  "license": "MIT",
7
7
  "publishConfig": {
@@ -11,7 +11,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.createMdxPages = createMdxPages;
13
13
  const path_1 = require("path");
14
- const slug_1 = require("../slug");
14
+ const slug_1 = require("../utils/slug");
15
15
  function createMdxPages(_a, root_1) {
16
16
  return __awaiter(this, arguments, void 0, function* ({ actions, reporter, graphql }, root) {
17
17
  var _b, _c, _d, _e, _f, _g;
@@ -52,7 +52,7 @@ function createMdxPages(_a, root_1) {
52
52
  const slug = frontmatter === null || frontmatter === void 0 ? void 0 : frontmatter.slug;
53
53
  const contentFilePath = internal.contentFilePath;
54
54
  if (slug && contentFilePath) {
55
- const existingPage = strapiPages.find((strapiPage) => (0, slug_1.normalizeSlug)(strapiPage === null || strapiPage === void 0 ? void 0 : strapiPage.slug) === (0, slug_1.normalizeSlug)(slug));
55
+ const existingPage = strapiPages.find((strapiPage) => (0, slug_1.isEqualSlug)(strapiPage === null || strapiPage === void 0 ? void 0 : strapiPage.slug, slug));
56
56
  if (!!existingPage) {
57
57
  reporter.warn(`Skipping MDX page creation: "${slug}" already exists`);
58
58
  return;
@@ -60,7 +60,7 @@ function createMdxPages(_a, root_1) {
60
60
  const mdxPageTemplate = (0, path_1.resolve)(root, `./src/templates/mdx-page.jsx`);
61
61
  const component = `${mdxPageTemplate}?__contentFilePath=${contentFilePath}`;
62
62
  actions.createPage({
63
- path: `/${(0, slug_1.normalizeSlug)(slug)}`,
63
+ path: (0, slug_1.buildPath)(slug),
64
64
  component,
65
65
  context: { slug },
66
66
  });
@@ -11,7 +11,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.createStrapiPages = createStrapiPages;
13
13
  const path_1 = require("path");
14
- const slug_1 = require("../slug");
14
+ const slug_1 = require("../utils/slug");
15
+ const hreflang_1 = require("../utils/hreflang");
15
16
  function createStrapiPages(_a, root_1) {
16
17
  return __awaiter(this, arguments, void 0, function* ({ actions, reporter, graphql }, root) {
17
18
  var _b, _c, _d, _e;
@@ -42,21 +43,26 @@ function createStrapiPages(_a, root_1) {
42
43
  return;
43
44
  }
44
45
  reporter.info(`Found ${strapiPages.length} Strapi pages`);
46
+ const hrefLangMap = (0, hreflang_1.buildHrefLangMap)(strapiPages, defaultLocale);
47
+ reporter.info(`Generated hrefLangs for Strapi pages`);
45
48
  let pageCount = 0;
46
49
  strapiPages.forEach(({ id, slug, title, locale }) => {
47
- if (slug === slug_1.DUMMY_PAGE_SLUG) {
50
+ var _a;
51
+ if ((0, slug_1.isDummyPage)(slug)) {
48
52
  reporter.warn('Skipping page creation: dummy page detected');
49
53
  return;
50
54
  }
51
- if (!title && !slug) {
55
+ if ((0, slug_1.isEmptyPage)(title, slug)) {
52
56
  reporter.warn('Skipping page creation: empty page detected');
53
57
  return;
54
58
  }
55
59
  const strapiPageTemplate = (0, path_1.resolve)(root, `./src/templates/strapi-page.tsx`);
60
+ const strapiPagePath = (0, slug_1.buildPath)(slug, locale, defaultLocale);
61
+ const strapiPageHrefLangs = (_a = hrefLangMap[strapiPagePath]) !== null && _a !== void 0 ? _a : [];
56
62
  actions.createPage({
57
- path: `/${locale === defaultLocale ? '' : locale + '/'}${(0, slug_1.normalizeSlug)(slug)}`,
63
+ path: strapiPagePath,
58
64
  component: strapiPageTemplate,
59
- context: { id },
65
+ context: { id, hrefLangs: strapiPageHrefLangs },
60
66
  });
61
67
  pageCount++;
62
68
  });
@@ -0,0 +1,2 @@
1
+ import type { HrefLangMap, IPage } from './types';
2
+ export declare function buildHrefLangMap(pages: IPage[], defaultLocale?: string): HrefLangMap;
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.buildHrefLangMap = buildHrefLangMap;
4
+ const slug_1 = require("./slug");
5
+ /** Choose x-default: prefer defaultLocale, fallback to first locale */
6
+ function getDefaultHrefLang(pages, defaultLocale) {
7
+ var _a;
8
+ const defaultPage = (_a = pages.find((page) => page.locale === defaultLocale)) !== null && _a !== void 0 ? _a : pages[0];
9
+ return { href: (0, slug_1.buildPath)(defaultPage.slug, defaultPage.locale, defaultLocale), hrefLang: 'x-default' };
10
+ }
11
+ function buildHrefLangMap(pages, defaultLocale = 'en') {
12
+ const hrefLangMap = {};
13
+ for (const pageGroup of Object.values((0, slug_1.groupPagesBySlug)(pages, defaultLocale))) {
14
+ const defaultHreflang = getDefaultHrefLang(pageGroup, defaultLocale);
15
+ for (const page of pageGroup) {
16
+ const hrefLangs = pageGroup.map(({ slug, locale }) => ({
17
+ hrefLang: locale,
18
+ href: (0, slug_1.buildPath)(slug, locale, defaultLocale),
19
+ }));
20
+ hrefLangs.push(defaultHreflang);
21
+ const path = (0, slug_1.buildPath)(page.slug, page.locale, defaultLocale);
22
+ hrefLangMap[path] = hrefLangs;
23
+ }
24
+ }
25
+ return hrefLangMap;
26
+ }
@@ -0,0 +1,6 @@
1
+ import type { IPage, PageGroup } from './types';
2
+ export declare function buildPath(slug?: IPage['slug'], locale?: IPage['locale'], defaultLocale?: string): string;
3
+ export declare function isEqualSlug(a?: IPage['slug'], b?: IPage['slug']): boolean;
4
+ export declare function isEmptyPage(title?: IPage['title'], slug?: IPage['slug']): boolean;
5
+ export declare function isDummyPage(slug?: IPage['slug']): boolean;
6
+ export declare function groupPagesBySlug(pages: IPage[], defaultLocale: string): PageGroup;
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.buildPath = buildPath;
4
+ exports.isEqualSlug = isEqualSlug;
5
+ exports.isEmptyPage = isEmptyPage;
6
+ exports.isDummyPage = isDummyPage;
7
+ exports.groupPagesBySlug = groupPagesBySlug;
8
+ const INDEX_PAGE_SLUG = 'index';
9
+ const DUMMY_PAGE_SLUG = 'dummy';
10
+ function normalizeSlug(slug) {
11
+ if (!slug || slug === INDEX_PAGE_SLUG) {
12
+ return '';
13
+ }
14
+ return slug.toLowerCase();
15
+ }
16
+ function normalizeLocale(locale) {
17
+ return (locale !== null && locale !== void 0 ? locale : '').toLowerCase();
18
+ }
19
+ function buildPath(slug, locale, defaultLocale) {
20
+ const normalizedLocale = normalizeLocale(locale);
21
+ const normalizedDefaultLocale = normalizeLocale(defaultLocale);
22
+ const localePrefix = normalizedLocale === normalizedDefaultLocale ? '/' : `/${normalizedLocale}/`;
23
+ return `${localePrefix}${normalizeSlug(slug)}`;
24
+ }
25
+ function isEqualSlug(a, b) {
26
+ return normalizeSlug(a) === normalizeSlug(b);
27
+ }
28
+ function isEmptyPage(title, slug) {
29
+ return !title && !slug;
30
+ }
31
+ function isDummyPage(slug) {
32
+ return normalizeSlug(slug) === DUMMY_PAGE_SLUG;
33
+ }
34
+ function groupPagesBySlug(pages, defaultLocale) {
35
+ var _a;
36
+ const groups = {};
37
+ for (const page of pages) {
38
+ if (!page.slug)
39
+ continue;
40
+ if (!groups[page.slug]) {
41
+ groups[page.slug] = [];
42
+ }
43
+ groups[page.slug].push({ slug: page.slug, locale: (_a = page.locale) !== null && _a !== void 0 ? _a : defaultLocale });
44
+ }
45
+ return groups;
46
+ }
@@ -0,0 +1,17 @@
1
+ type Path = string;
2
+ export interface IPage {
3
+ title?: string | null;
4
+ slug?: string | null;
5
+ locale?: string | null;
6
+ }
7
+ interface IExistedPage {
8
+ slug: NonNullable<IPage['slug']>;
9
+ locale: NonNullable<IPage['locale']>;
10
+ }
11
+ export type PageGroup = Record<IExistedPage['slug'], IExistedPage[]>;
12
+ export interface IHrefLang {
13
+ href: string;
14
+ hrefLang: string;
15
+ }
16
+ export type HrefLangMap = Record<Path, IHrefLang[]>;
17
+ export {};
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export declare const partner = "\n # === PARTNER DEFINITION ===\n type Partner {\n name: String!\n refLink: String\n }\n ";
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.partner = void 0;
4
+ exports.partner = `
5
+ # === PARTNER DEFINITION ===
6
+ type Partner {
7
+ name: String!
8
+ refLink: String
9
+ }
10
+ `;
@@ -1 +1 @@
1
- export declare const content = "\n # === COMPONENT DEFINITIONS ===\n union ContentComponent =\n STRAPI__COMPONENT_CONTENT_CONTACTS_PAGE\n | STRAPI__COMPONENT_CONTENT_COOKIE_POLICY_PAGE \n | STRAPI__COMPONENT_CONTENT_FAQ\n | STRAPI__COMPONENT_CONTENT_FEATURES\n | STRAPI__COMPONENT_CONTENT_GAME_CARDS\n | STRAPI__COMPONENT_CONTENT_GAME_CARD_TABS\n | STRAPI__COMPONENT_CONTENT_GAME_DEMO\n | STRAPI__COMPONENT_CONTENT_GAME_INFO\n | STRAPI__COMPONENT_CONTENT_HOW_TO\n | STRAPI__COMPONENT_CONTENT_LIST\n | STRAPI__COMPONENT_CONTENT_MEDIA\n | STRAPI__COMPONENT_CONTENT_PRIVACY_POLICY_PAGE\n | STRAPI__COMPONENT_CONTENT_PROS_CONS\n | STRAPI__COMPONENT_CONTENT_RICH_TEXT\n | STRAPI__COMPONENT_CONTENT_TABLE\n | STRAPI__COMPONENT_CONTENT_TERMS_CONDITIONS_PAGE\n | STRAPI__COMPONENT_CONTENT_TIP\n\n # === CONTACTS ===\n type STRAPI__COMPONENT_CONTENT_CONTACTS_PAGE @dontInfer {\n id: ID\n }\n\n # === COOKIE_POLICY ===\n type STRAPI__COMPONENT_CONTENT_COOKIE_POLICY_PAGE @dontInfer {\n id: ID\n }\n\n # === FAQ ===\n type STRAPI__COMPONENT_CONTENT_FAQ @dontInfer {\n items: [FaqItem!]\n }\n\n # === FEATURES ===\n type STRAPI__COMPONENT_CONTENT_FEATURES @dontInfer {\n items: [FeaturesItem!]\n }\n\n # === GAME CARDS ===\n type STRAPI__COMPONENT_CONTENT_GAME_CARDS @dontInfer {\n items: [GameCard!]\n order: String!\n randomSeed: Int\n cardHeight: String\n }\n\n # === GAME CARD TABS ===\n type STRAPI__COMPONENT_CONTENT_GAME_CARD_TABS @dontInfer {\n items: [GameCardTab!]\n }\n\n # === GAME_DEMO ===\n type STRAPI__COMPONENT_CONTENT_GAME_DEMO @dontInfer {\n name: String!\n src: String!\n href: String\n previewImage: Image!\n }\n\n # === GAME_INFO ===\n type STRAPI__COMPONENT_CONTENT_GAME_INFO @dontInfer {\n general: GameInfoGeneral\n features: GameInfoFeatures\n currency: CurrencyList\n }\n\n # === HOW_TO ===\n type STRAPI__COMPONENT_CONTENT_HOW_TO @dontInfer {\n steps: [HowToStep!]\n }\n\n # === LIST ===\n type STRAPI__COMPONENT_CONTENT_LIST @dontInfer {\n bullet: String\n content: JsonValue\n }\n\n # === MEDIA ===\n type STRAPI__COMPONENT_CONTENT_MEDIA @dontInfer {\n file: Image\n }\n\n # === PRIVACY_POLICY ===\n type STRAPI__COMPONENT_CONTENT_PRIVACY_POLICY_PAGE @dontInfer {\n contactsSlug: String\n }\n\n # === PROS_CONS ===\n type STRAPI__COMPONENT_CONTENT_PROS_CONS @dontInfer {\n pros: [ProsConsItem!]\n cons: [ProsConsItem!]\n }\n\n # === RICH_TEXT ===\n type STRAPI__COMPONENT_CONTENT_RICH_TEXT @dontInfer {\n content: RichTextContent\n }\n\n # === TABLE ===\n type STRAPI__COMPONENT_CONTENT_TABLE @dontInfer {\n columnNumber: Int!\n content: JsonValue\n caption: String\n striped: Boolean\n bordered: Boolean\n scrollable: Boolean\n }\n\n # === TERMS_CONDITIONS ===\n type STRAPI__COMPONENT_CONTENT_TERMS_CONDITIONS_PAGE @dontInfer {\n privacyPolicySlug: String\n }\n\n # === TIP ===\n type STRAPI__COMPONENT_CONTENT_TIP @dontInfer {\n tip: String!\n author: Author\n }\n ";
1
+ export declare const content = "\n # === COMPONENT DEFINITIONS ===\n union ContentComponent =\n STRAPI__COMPONENT_CONTENT_ACTION_BUTTON\n | STRAPI__COMPONENT_CONTENT_CONTACTS_PAGE\n | STRAPI__COMPONENT_CONTENT_COOKIE_POLICY_PAGE \n | STRAPI__COMPONENT_CONTENT_FAQ\n | STRAPI__COMPONENT_CONTENT_FEATURES\n | STRAPI__COMPONENT_CONTENT_GAME_CARDS\n | STRAPI__COMPONENT_CONTENT_GAME_CARD_TABS\n | STRAPI__COMPONENT_CONTENT_GAME_DEMO\n | STRAPI__COMPONENT_CONTENT_GAME_INFO\n | STRAPI__COMPONENT_CONTENT_HOW_TO\n | STRAPI__COMPONENT_CONTENT_INFORMER\n | STRAPI__COMPONENT_CONTENT_LIST\n | STRAPI__COMPONENT_CONTENT_MEDIA\n | STRAPI__COMPONENT_CONTENT_PRIVACY_POLICY_PAGE\n | STRAPI__COMPONENT_CONTENT_PROS_CONS\n | STRAPI__COMPONENT_CONTENT_RICH_TEXT\n | STRAPI__COMPONENT_CONTENT_TABLE\n | STRAPI__COMPONENT_CONTENT_TERMS_CONDITIONS_PAGE\n | STRAPI__COMPONENT_CONTENT_TIP\n\n # === ACTION_BUTTON ===\n type STRAPI__COMPONENT_CONTENT_ACTION_BUTTON @dontInfer {\n label: String!\n url: String!\n }\n\n # === CONTACTS ===\n type STRAPI__COMPONENT_CONTENT_CONTACTS_PAGE @dontInfer {\n id: ID\n }\n\n # === COOKIE_POLICY ===\n type STRAPI__COMPONENT_CONTENT_COOKIE_POLICY_PAGE @dontInfer {\n id: ID\n }\n\n # === FAQ ===\n type STRAPI__COMPONENT_CONTENT_FAQ @dontInfer {\n items: [FaqItem!]\n }\n\n # === FEATURES ===\n type STRAPI__COMPONENT_CONTENT_FEATURES @dontInfer {\n items: [FeaturesItem!]\n }\n\n # === GAME CARDS ===\n type STRAPI__COMPONENT_CONTENT_GAME_CARDS @dontInfer {\n items: [GameCard!]\n order: String!\n randomSeed: Int\n cardHeight: String\n }\n\n # === GAME CARD TABS ===\n type STRAPI__COMPONENT_CONTENT_GAME_CARD_TABS @dontInfer {\n items: [GameCardTab!]\n }\n\n # === GAME_DEMO ===\n type STRAPI__COMPONENT_CONTENT_GAME_DEMO @dontInfer {\n name: String!\n src: String\n href: String\n previewImage: Image!\n partner: Partner\n }\n\n # === GAME_INFO ===\n type STRAPI__COMPONENT_CONTENT_GAME_INFO @dontInfer {\n general: GameInfoGeneral\n features: GameInfoFeatures\n currency: CurrencyList\n }\n\n # === INFORMER ===\n type STRAPI__COMPONENT_CONTENT_INFORMER @dontInfer {\n type: String!\n text: String!\n author: Author\n }\n\n # === HOW_TO ===\n type STRAPI__COMPONENT_CONTENT_HOW_TO @dontInfer {\n steps: [HowToStep!]\n }\n\n # === LIST ===\n type STRAPI__COMPONENT_CONTENT_LIST @dontInfer {\n bullet: String\n content: JsonValue\n }\n\n # === MEDIA ===\n type STRAPI__COMPONENT_CONTENT_MEDIA @dontInfer {\n file: Image\n }\n\n # === PRIVACY_POLICY ===\n type STRAPI__COMPONENT_CONTENT_PRIVACY_POLICY_PAGE @dontInfer {\n contactsSlug: String\n }\n\n # === PROS_CONS ===\n type STRAPI__COMPONENT_CONTENT_PROS_CONS @dontInfer {\n pros: [ProsConsItem!]\n cons: [ProsConsItem!]\n }\n\n # === RICH_TEXT ===\n type STRAPI__COMPONENT_CONTENT_RICH_TEXT @dontInfer {\n content: RichTextContent\n }\n\n # === TABLE ===\n type STRAPI__COMPONENT_CONTENT_TABLE @dontInfer {\n columnNumber: Int!\n content: JsonValue\n caption: String\n striped: Boolean\n bordered: Boolean\n scrollable: Boolean\n }\n\n # === TERMS_CONDITIONS ===\n type STRAPI__COMPONENT_CONTENT_TERMS_CONDITIONS_PAGE @dontInfer {\n privacyPolicySlug: String\n }\n\n # === TIP ===\n type STRAPI__COMPONENT_CONTENT_TIP @dontInfer {\n tip: String!\n author: Author\n }\n ";
@@ -4,7 +4,8 @@ exports.content = void 0;
4
4
  exports.content = `
5
5
  # === COMPONENT DEFINITIONS ===
6
6
  union ContentComponent =
7
- STRAPI__COMPONENT_CONTENT_CONTACTS_PAGE
7
+ STRAPI__COMPONENT_CONTENT_ACTION_BUTTON
8
+ | STRAPI__COMPONENT_CONTENT_CONTACTS_PAGE
8
9
  | STRAPI__COMPONENT_CONTENT_COOKIE_POLICY_PAGE
9
10
  | STRAPI__COMPONENT_CONTENT_FAQ
10
11
  | STRAPI__COMPONENT_CONTENT_FEATURES
@@ -13,6 +14,7 @@ exports.content = `
13
14
  | STRAPI__COMPONENT_CONTENT_GAME_DEMO
14
15
  | STRAPI__COMPONENT_CONTENT_GAME_INFO
15
16
  | STRAPI__COMPONENT_CONTENT_HOW_TO
17
+ | STRAPI__COMPONENT_CONTENT_INFORMER
16
18
  | STRAPI__COMPONENT_CONTENT_LIST
17
19
  | STRAPI__COMPONENT_CONTENT_MEDIA
18
20
  | STRAPI__COMPONENT_CONTENT_PRIVACY_POLICY_PAGE
@@ -22,6 +24,12 @@ exports.content = `
22
24
  | STRAPI__COMPONENT_CONTENT_TERMS_CONDITIONS_PAGE
23
25
  | STRAPI__COMPONENT_CONTENT_TIP
24
26
 
27
+ # === ACTION_BUTTON ===
28
+ type STRAPI__COMPONENT_CONTENT_ACTION_BUTTON @dontInfer {
29
+ label: String!
30
+ url: String!
31
+ }
32
+
25
33
  # === CONTACTS ===
26
34
  type STRAPI__COMPONENT_CONTENT_CONTACTS_PAGE @dontInfer {
27
35
  id: ID
@@ -58,9 +66,10 @@ exports.content = `
58
66
  # === GAME_DEMO ===
59
67
  type STRAPI__COMPONENT_CONTENT_GAME_DEMO @dontInfer {
60
68
  name: String!
61
- src: String!
69
+ src: String
62
70
  href: String
63
71
  previewImage: Image!
72
+ partner: Partner
64
73
  }
65
74
 
66
75
  # === GAME_INFO ===
@@ -70,6 +79,13 @@ exports.content = `
70
79
  currency: CurrencyList
71
80
  }
72
81
 
82
+ # === INFORMER ===
83
+ type STRAPI__COMPONENT_CONTENT_INFORMER @dontInfer {
84
+ type: String!
85
+ text: String!
86
+ author: Author
87
+ }
88
+
73
89
  # === HOW_TO ===
74
90
  type STRAPI__COMPONENT_CONTENT_HOW_TO @dontInfer {
75
91
  steps: [HowToStep!]
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.typeDefs = void 0;
4
4
  const author_1 = require("./collections/author");
5
5
  const page_1 = require("./collections/page");
6
+ const partner_1 = require("./collections/partner");
6
7
  const base_1 = require("./components/base");
7
8
  const content_1 = require("./components/content");
8
9
  const shared_1 = require("./components/shared");
@@ -10,4 +11,4 @@ const primitives_1 = require("./primitives");
10
11
  const localization_1 = require("./single/localization");
11
12
  const navigation_1 = require("./single/navigation");
12
13
  const site_1 = require("./single/site");
13
- exports.typeDefs = [author_1.author, page_1.page, base_1.base, content_1.content, shared_1.shared, primitives_1.primitives, localization_1.localization, navigation_1.navigation, site_1.site].join('\n');
14
+ exports.typeDefs = [author_1.author, page_1.page, partner_1.partner, base_1.base, content_1.content, shared_1.shared, primitives_1.primitives, localization_1.localization, navigation_1.navigation, site_1.site].join('\n');
@@ -52,6 +52,9 @@ function sourceStrapiContentNode(args, strapiClient, config) {
52
52
  },
53
53
  content: {
54
54
  on: {
55
+ 'content.action-button': {
56
+ populate: '*',
57
+ },
55
58
  'content.contacts-page': {
56
59
  populate: '*',
57
60
  },
@@ -109,6 +112,9 @@ function sourceStrapiContentNode(args, strapiClient, config) {
109
112
  },
110
113
  },
111
114
  },
115
+ 'content.informer': {
116
+ populate: '*',
117
+ },
112
118
  'content.list': {
113
119
  populate: '*',
114
120
  },
@@ -1,2 +0,0 @@
1
- export declare const DUMMY_PAGE_SLUG = "dummy";
2
- export declare function normalizeSlug(slug?: string | null): string;
@@ -1,8 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DUMMY_PAGE_SLUG = void 0;
4
- exports.normalizeSlug = normalizeSlug;
5
- exports.DUMMY_PAGE_SLUG = 'dummy';
6
- function normalizeSlug(slug) {
7
- return slug && slug !== 'index' ? slug : '';
8
- }