@deepsel/cms-utils 1.1.6 → 1.4.6

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.
@@ -1,4 +1,5 @@
1
1
  export declare const WebsiteDataTypes: {
2
+ readonly Home: "Home";
2
3
  readonly Page: "Page";
3
4
  readonly BlogList: "BlogList";
4
5
  readonly BlogPost: "BlogPost";
@@ -1,4 +1,5 @@
1
1
  export const WebsiteDataTypes = {
2
+ Home: 'Home',
2
3
  Page: 'Page',
3
4
  BlogList: 'BlogList',
4
5
  BlogPost: 'BlogPost',
@@ -6,6 +6,9 @@ export function getPathType(path) {
6
6
  if (path.startsWith('/')) {
7
7
  path = path.slice(1);
8
8
  }
9
+ if (path === '' || path === '/') {
10
+ return { pathType: WebsiteDataTypes.Home };
11
+ }
9
12
  if (path === 'search' || path.startsWith('search?') || path.startsWith('search/')) {
10
13
  return { pathType: WebsiteDataTypes.SearchResults };
11
14
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deepsel/cms-utils",
3
- "version": "1.1.6",
3
+ "version": "1.4.6",
4
4
  "description": "Helper utilities for Deepsel CMS",
5
5
  "repository": {
6
6
  "type": "git",