Skip to content

Commit ba2b7f0

Browse files
authored
Merge pull request #15943 from github/repo-sync
repo sync
2 parents da91211 + e69144b commit ba2b7f0

File tree

489 files changed

+540752
-594024
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

489 files changed

+540752
-594024
lines changed

.github/workflows/browser-test.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,5 @@ jobs:
5959
path: .next/cache
6060
key: ${{ runner.os }}-nextjs-${{ hashFiles('package*.json') }}
6161

62-
- name: Cache lib/redirects/.redirects-cache_en_ja.json
63-
uses: actions/cache@937d24475381cd9c75ae6db12cb4e79714b926ed
64-
with:
65-
path: lib/redirects/.redirects-cache_en_ja.json
66-
key: ${{ runner.os }}-redirects-cache-${{ hashFiles('.github/workflows/browser-test.yml') }}
67-
6862
- name: Run browser-test
6963
run: npm run browser-test

Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ COPY stylesheets ./stylesheets
4646
COPY pages ./pages
4747
COPY components ./components
4848
COPY lib ./lib
49-
5049
# One part of the build relies on this content file to pull all-products
5150
COPY content/index.md ./content/index.md
5251

Loading
Loading
Loading
Loading
23.9 KB
Loading
21.7 KB
Loading

components/DefaultLayout.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,9 @@ export const DefaultLayout = (props: Props) => {
2424
fullUrl,
2525
status,
2626
} = useMainContext()
27-
const { t } = useTranslation(['errors', 'scroll_button'])
27+
const { t } = useTranslation(['errors', 'meta', 'scroll_button'])
2828
const router = useRouter()
29+
const metaDescription = page.introPlainText ? page.introPlainText : t('default_description')
2930
return (
3031
<div className="d-lg-flex">
3132
<Head>
@@ -37,7 +38,7 @@ export const DefaultLayout = (props: Props) => {
3738
) : null}
3839

3940
{/* For Google and Bots */}
40-
{page.introPlainText && <meta name="description" content={page.introPlainText} />}
41+
<meta name="description" content={metaDescription} />
4142
{page.hidden && <meta name="robots" content="noindex" />}
4243
{page.languageVariants.map((languageVariant) => {
4344
return (

components/article/ArticlePage.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { useState, useEffect } from 'react'
1+
import { useState, useEffect, ReactNode } from 'react'
22
import { useRouter } from 'next/router'
33
import dynamic from 'next/dynamic'
44
import cx from 'classnames'
@@ -50,7 +50,11 @@ const interactiveAlternatives: Record<string, { href: string }> = {
5050
},
5151
}
5252

53-
export const ArticlePage = () => {
53+
export type StructuredContentT = {
54+
structuredContent?: ReactNode
55+
}
56+
57+
export const ArticlePage = ({ structuredContent }: StructuredContentT) => {
5458
const { asPath } = useRouter()
5559
const {
5660
title,
@@ -65,6 +69,7 @@ export const ArticlePage = () => {
6569
miniTocItems,
6670
currentLearningTrack,
6771
} = useArticleContext()
72+
const renderedContent = structuredContent || renderedPage
6873
const { t } = useTranslation('pages')
6974
const currentPath = asPath.split('?')[0]
7075

@@ -236,7 +241,7 @@ export const ArticlePage = () => {
236241
}
237242
>
238243
<div id="article-contents">
239-
<MarkdownContent>{renderedPage}</MarkdownContent>
244+
<MarkdownContent>{renderedContent}</MarkdownContent>
240245
{effectiveDate && (
241246
<div className="mt-4" id="effectiveDate">
242247
Effective as of:{' '}

0 commit comments

Comments
 (0)