@ndlib/component-library 0.0.83 → 0.0.85
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.
|
@@ -36,7 +36,7 @@ export const NavMenu = (props) => {
|
|
|
36
36
|
}
|
|
37
37
|
const leafMenuItems = submenuItem.action.submenu.items;
|
|
38
38
|
const submenuPath = [topLevelMenuId, submenuItem.id];
|
|
39
|
-
const link = '
|
|
39
|
+
const link = '//' + document.location.host + topLevelMenuId;
|
|
40
40
|
const category = topLevelMenuId.charAt(1).toUpperCase() + topLevelMenuId.slice(2);
|
|
41
41
|
return (_jsxs(Column, Object.assign({ sx: { flexBasis: '275px', p: 2, flexShrink: 0, flexGrow: 0 } }, { children: [_jsx(Heading, Object.assign({ standalone: true, size: HEADING_SIZE.SM, underline: true }, getMenuItemProps(submenuPath), { children: submenuItem.label })), _jsx(List, Object.assign({}, getMenuProps(submenuPath), { icon: ChevronRightIcon }, { children: leafMenuItems.map((leafMenuItem, i) => {
|
|
42
42
|
const leafMenuPath = submenuPath.concat(leafMenuItem.id);
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { siteMetadata } from './siteMetadata';
|
|
3
|
-
export const Seo = ({ title, description, image, nofollow, noindex, }) => {
|
|
3
|
+
export const Seo = ({ title, description, image, nofollow, noindex, pathname, }) => {
|
|
4
4
|
const { title: defaultTitle, description: defaultDescription, image: defaultImage, nofollow: defaultNoindex, noindex: defaultNofollow, siteUrl, twitterUsername, } = siteMetadata();
|
|
5
5
|
const seo = {
|
|
6
6
|
title: title || defaultTitle,
|
|
7
7
|
description: description || defaultDescription,
|
|
8
8
|
image: image ? image : defaultImage,
|
|
9
|
-
url: siteUrl +
|
|
9
|
+
url: siteUrl + pathname || '',
|
|
10
10
|
nofollow: nofollow || defaultNofollow,
|
|
11
11
|
noindex: noindex || defaultNoindex,
|
|
12
12
|
twitterUsername,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export type StructuredDataProps = {
|
|
3
3
|
title?: string;
|
|
4
|
+
pathname?: string;
|
|
4
5
|
description?: string;
|
|
5
6
|
siteUrl?: string;
|
|
6
7
|
nofollow?: string;
|
|
@@ -33,6 +34,6 @@ export type StructuredDataProps = {
|
|
|
33
34
|
publishedDate: string;
|
|
34
35
|
}[];
|
|
35
36
|
};
|
|
36
|
-
export declare const getStructuredDataSchemas: ({ title, description, nofollow, noindex, image, events, news, }: StructuredDataProps) => string[];
|
|
37
|
+
export declare const getStructuredDataSchemas: ({ title, pathname, description, nofollow, noindex, image, events, news, }: StructuredDataProps) => string[];
|
|
37
38
|
export declare const StructuredData: React.FC<StructuredDataProps>;
|
|
38
39
|
export default StructuredData;
|
|
@@ -3,7 +3,7 @@ import { siteMetadata } from './siteMetadata';
|
|
|
3
3
|
import { stringifyWebpageSchema } from './sdWebsite';
|
|
4
4
|
import { stringifyEventSchema } from './sdEvent';
|
|
5
5
|
import { stringifyNewsSchema } from './sdNews';
|
|
6
|
-
export const getStructuredDataSchemas = ({ title, description, nofollow, noindex, image, events, news, }) => {
|
|
6
|
+
export const getStructuredDataSchemas = ({ title, pathname, description, nofollow, noindex, image, events, news, }) => {
|
|
7
7
|
const { title: defaultTitle, description: defaultDescription, image: defaultImage, siteUrl, nofollow: defaultNofollow, noindex: defaultNoindex, } = siteMetadata();
|
|
8
8
|
const metadata = {
|
|
9
9
|
title: title || defaultTitle,
|
|
@@ -11,13 +11,13 @@ export const getStructuredDataSchemas = ({ title, description, nofollow, noindex
|
|
|
11
11
|
nofollow: nofollow || defaultNofollow,
|
|
12
12
|
noindex: noindex || defaultNoindex,
|
|
13
13
|
image: image || defaultImage,
|
|
14
|
-
url: `${siteUrl}${
|
|
14
|
+
url: `${siteUrl}${pathname || ''}`,
|
|
15
15
|
lang: 'en',
|
|
16
16
|
events: events,
|
|
17
17
|
news: news,
|
|
18
18
|
};
|
|
19
19
|
const schemas = [];
|
|
20
|
-
if (
|
|
20
|
+
if (pathname !== '') {
|
|
21
21
|
schemas.push(stringifyWebpageSchema({
|
|
22
22
|
name: metadata.title,
|
|
23
23
|
description: metadata.description,
|