Skip to content

Commit 9fbcc64

Browse files
authored
Merge pull request #245 from dotCMS/ecosystem-pages
Fixing docs pages because tags are optional
2 parents 675661b + c60170b commit 9fbcc64

3 files changed

Lines changed: 5 additions & 28 deletions

File tree

app/docs/[slug]/page.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,9 @@ export async function generateMetadata({ params, searchParams }) {
106106
}
107107

108108
// Check if the page's tags include 'dot:meta-no-index'
109-
const tags = pageAsset.urlContentMap.tag || [];
110-
const shouldNoIndex = Array.isArray(tags)
111-
? tags.includes('dot:meta-no-index')
109+
const tags = pageAsset.urlContentMap?.tag ?? [];
110+
const shouldNoIndex = Array.isArray(tags)
111+
? tags.includes('dot:meta-no-index')
112112
: typeof tags === 'string' && tags.includes('dot:meta-no-index');
113113

114114
// Check if this is a security issue detail page

components/documentation/Documentation.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,14 @@ const Documentation = ({ contentlet, sideNav, slug, deprecation }) => {
5050
<div className="markdown-content">
5151
<div className="flex items-center gap-3 mb-6">
5252
<h1 className="text-4xl font-bold">{contentlet.title}</h1>
53-
{contentlet.tag.includes("beta") && (
53+
{contentlet.tag?.includes("beta") && (
5454
<span className="inline-flex items-center px-3 py-1 rounded-full text-sm font-medium bg-blue-100 text-blue-800 border border-blue-200 shrink-0">
5555
<span className="w-2 h-2 bg-blue-400 rounded-full mr-2 animate-pulse"></span>
5656
Beta Feature
5757
</span>
5858
)}
5959
</div>
60-
{(matchedDeprecation || contentlet.tag.includes("deprecated")) && (
60+
{(matchedDeprecation || contentlet.tag?.includes("deprecated")) && (
6161
<div className="mb-6">
6262
{matchedDeprecation ? (
6363
<DeprecationCard deprecation={matchedDeprecation} variant="inline" />

package-lock.json

Lines changed: 0 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)