Skip to content

Commit 6e3586f

Browse files
authored
Merge pull request #13098 from github/repo-sync
repo sync
2 parents ec75bbf + 37be2fa commit 6e3586f

26 files changed

Lines changed: 1264 additions & 769 deletions

File tree

Dockerfile

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ WORKDIR /usr/src/docs
1717
# ---------------
1818
FROM base as all_deps
1919

20-
COPY package*.json ./
2120
COPY .npmrc ./
21+
COPY package*.json ./
2222

2323
RUN npm ci
2424

@@ -36,14 +36,12 @@ RUN npm prune --production
3636
# ---------------
3737
FROM all_deps as builder
3838

39-
ENV NODE_ENV production
40-
4139
COPY stylesheets ./stylesheets
4240
COPY pages ./pages
4341
COPY components ./components
4442
COPY lib ./lib
4543

46-
# one part of the build relies on this content file to pull all-products
44+
# One part of the build relies on this content file to pull all-products
4745
COPY content/index.md ./content/index.md
4846

4947
COPY next.config.js ./next.config.js
@@ -76,24 +74,27 @@ COPY --chown=node:node --from=builder /usr/src/docs/.next /usr/src/docs/.next
7674
# We should always be running in production mode
7775
ENV NODE_ENV production
7876

79-
# Hide iframes, add warnings to external links
80-
ENV AIRGAP true
77+
# Whether to hide iframes, add warnings to external links
78+
ENV AIRGAP false
79+
80+
# By default we typically don't want to run in clustered mode
81+
ENV WEB_CONCURRENCY 1
82+
83+
# This makes sure server.mjs always picks up the preferred port
84+
ENV PORT 4000
8185

8286
# Copy only what's needed to run the server
8387
COPY --chown=node:node assets ./assets
84-
COPY --chown=node:node content ./content
85-
COPY --chown=node:node data ./data
8688
COPY --chown=node:node includes ./includes
89+
COPY --chown=node:node translations ./translations
90+
COPY --chown=node:node content ./content
8791
COPY --chown=node:node lib ./lib
8892
COPY --chown=node:node middleware ./middleware
89-
COPY --chown=node:node translations ./translations
90-
COPY --chown=node:node server.mjs ./server.mjs
91-
COPY --chown=node:node package*.json ./
9293
COPY --chown=node:node feature-flags.json ./
94+
COPY --chown=node:node data ./data
9395
COPY --chown=node:node next.config.js ./
96+
COPY --chown=node:node server.mjs ./server.mjs
9497

95-
# This makes sure server.mjs always picks up the preferred port
96-
ENV PORT=4000
9798
EXPOSE $PORT
9899

99100
CMD ["node", "server.mjs"]

components/context/ProductLandingContext.tsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,9 @@ export const getFeaturedLinksFromReq = (req: any): Record<string, Array<Featured
8787
((entries as Array<any>) || []).map((entry: any) => ({
8888
href: entry.href,
8989
title: entry.title,
90-
intro: entry.intro,
91-
authors: entry.page.authors || [],
92-
fullTitle: entry.fullTitle,
90+
intro: entry.intro || null,
91+
authors: entry.page?.authors || [],
92+
fullTitle: entry.fullTitle || null,
9393
})),
9494
]
9595
})
@@ -141,13 +141,13 @@ export const getProductLandingContextFromRequest = (req: any): ProductLandingCon
141141

142142
featuredArticles: Object.entries(req.context.featuredLinks || [])
143143
.filter(([key]) => {
144-
return key === 'guides' || key === 'popular'
144+
return key === 'guides' || key === 'popular' || key === 'videos'
145145
})
146146
.map(([key, links]: any) => {
147147
return {
148148
label:
149-
key === 'popular'
150-
? req.context.page.featuredLinks.popularHeading || req.context.site.data.ui.toc[key]
149+
key === 'popular' || key === 'videos'
150+
? req.context.page.featuredLinks[key + 'Heading'] || req.context.site.data.ui.toc[key]
151151
: req.context.site.data.ui.toc[key],
152152
viewAllHref:
153153
key === 'guides' && !req.context.currentCategory && hasGuidesPage
@@ -158,9 +158,9 @@ export const getProductLandingContextFromRequest = (req: any): ProductLandingCon
158158
hideIntro: key === 'popular',
159159
href: link.href,
160160
title: link.title,
161-
intro: link.intro,
162-
authors: link.page.authors || [],
163-
fullTitle: link.fullTitle,
161+
intro: link.intro || null,
162+
authors: link.page?.authors || [],
163+
fullTitle: link.fullTitle || null,
164164
}
165165
}),
166166
}

content/actions/deployment/deploying-to-your-cloud-provider/deploying-to-azure-app-service.md

Lines changed: 0 additions & 148 deletions
This file was deleted.

0 commit comments

Comments
 (0)