Merge branch 'main' of https://github.com/github/docs-internal into grace-header-styling
This commit is contained in:
@@ -72,6 +72,9 @@ const schema = {
|
||||
type: 'string'
|
||||
}
|
||||
},
|
||||
examples_source: {
|
||||
type: 'string'
|
||||
},
|
||||
featuredLinks: {
|
||||
type: 'object',
|
||||
properties: {
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
"Mutation.createDeployment"
|
||||
],
|
||||
"owning_teams": [
|
||||
"@github/ecosystem-api"
|
||||
"@github/c2c-actions-service"
|
||||
],
|
||||
"accept_header": "application/vnd.github.flash-preview+json",
|
||||
"href": "/graphql/overview/schema-previews#deployments-preview"
|
||||
@@ -940,7 +940,7 @@
|
||||
"Mutation.createDeployment"
|
||||
],
|
||||
"owning_teams": [
|
||||
"@github/ecosystem-api"
|
||||
"@github/c2c-actions-service"
|
||||
],
|
||||
"accept_header": "application/vnd.github.flash-preview+json",
|
||||
"href": "/graphql/overview/schema-previews#deployments-preview"
|
||||
|
||||
@@ -2048,7 +2048,7 @@
|
||||
"Mutation.createDeployment"
|
||||
],
|
||||
"owning_teams": [
|
||||
"@github/ecosystem-api"
|
||||
"@github/c2c-actions-service"
|
||||
],
|
||||
"accept_header": "application/vnd.github.flash-preview+json",
|
||||
"href": "/graphql/overview/schema-previews#deployments-preview"
|
||||
@@ -2106,7 +2106,7 @@
|
||||
"Mutation.createDeployment"
|
||||
],
|
||||
"owning_teams": [
|
||||
"@github/ecosystem-api"
|
||||
"@github/c2c-actions-service"
|
||||
],
|
||||
"accept_header": "application/vnd.github.flash-preview+json",
|
||||
"href": "/graphql/overview/schema-previews#deployments-preview"
|
||||
@@ -14984,7 +14984,7 @@
|
||||
"Mutation.createDeployment"
|
||||
],
|
||||
"owning_teams": [
|
||||
"@github/ecosystem-api"
|
||||
"@github/c2c-actions-service"
|
||||
],
|
||||
"accept_header": "application/vnd.github.flash-preview+json",
|
||||
"href": "/graphql/overview/schema-previews#deployments-preview"
|
||||
@@ -70019,7 +70019,7 @@
|
||||
"Mutation.createDeployment"
|
||||
],
|
||||
"owning_teams": [
|
||||
"@github/ecosystem-api"
|
||||
"@github/c2c-actions-service"
|
||||
],
|
||||
"accept_header": "application/vnd.github.flash-preview+json",
|
||||
"href": "/graphql/overview/schema-previews#deployments-preview"
|
||||
@@ -70118,7 +70118,7 @@
|
||||
"Mutation.createDeployment"
|
||||
],
|
||||
"owning_teams": [
|
||||
"@github/ecosystem-api"
|
||||
"@github/c2c-actions-service"
|
||||
],
|
||||
"accept_header": "application/vnd.github.flash-preview+json",
|
||||
"href": "/graphql/overview/schema-previews#deployments-preview"
|
||||
|
||||
@@ -1605,7 +1605,7 @@
|
||||
"Mutation.createDeployment"
|
||||
],
|
||||
"owning_teams": [
|
||||
"@github/ecosystem-api"
|
||||
"@github/c2c-actions-service"
|
||||
],
|
||||
"accept_header": "application/vnd.github.flash-preview+json",
|
||||
"href": "/graphql/overview/schema-previews#deployments-preview"
|
||||
@@ -1663,7 +1663,7 @@
|
||||
"Mutation.createDeployment"
|
||||
],
|
||||
"owning_teams": [
|
||||
"@github/ecosystem-api"
|
||||
"@github/c2c-actions-service"
|
||||
],
|
||||
"accept_header": "application/vnd.github.flash-preview+json",
|
||||
"href": "/graphql/overview/schema-previews#deployments-preview"
|
||||
@@ -13546,7 +13546,7 @@
|
||||
"Mutation.createDeployment"
|
||||
],
|
||||
"owning_teams": [
|
||||
"@github/ecosystem-api"
|
||||
"@github/c2c-actions-service"
|
||||
],
|
||||
"accept_header": "application/vnd.github.flash-preview+json",
|
||||
"href": "/graphql/overview/schema-previews#deployments-preview"
|
||||
@@ -64861,7 +64861,7 @@
|
||||
"Mutation.createDeployment"
|
||||
],
|
||||
"owning_teams": [
|
||||
"@github/ecosystem-api"
|
||||
"@github/c2c-actions-service"
|
||||
],
|
||||
"accept_header": "application/vnd.github.flash-preview+json",
|
||||
"href": "/graphql/overview/schema-previews#deployments-preview"
|
||||
@@ -64960,7 +64960,7 @@
|
||||
"Mutation.createDeployment"
|
||||
],
|
||||
"owning_teams": [
|
||||
"@github/ecosystem-api"
|
||||
"@github/c2c-actions-service"
|
||||
],
|
||||
"accept_header": "application/vnd.github.flash-preview+json",
|
||||
"href": "/graphql/overview/schema-previews#deployments-preview"
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
const renderContent = require('./render-content')
|
||||
const getLinkData = require('./get-link-data')
|
||||
const getApplicableVersions = require('./get-applicable-versions')
|
||||
|
||||
const renderOpts = { textOnly: true, encodeEntities: true }
|
||||
|
||||
@@ -21,6 +22,16 @@ module.exports = async function processLearningTracks (rawLearningTracks, contex
|
||||
const track = context.site.data['learning-tracks'][context.currentProduct][renderedTrackName]
|
||||
if (!track) continue
|
||||
|
||||
// If there is no `versions` prop in the learning track frontmatter, assume the track should display in all versions.
|
||||
if (track.versions) {
|
||||
const trackVersions = getApplicableVersions(track.versions)
|
||||
|
||||
// If the current version is not included, do not display the track.
|
||||
if (!trackVersions.includes(context.currentVersion)) {
|
||||
continue
|
||||
}
|
||||
}
|
||||
|
||||
const learningTrack = {
|
||||
trackName: renderedTrackName,
|
||||
title: await renderContent(track.title, context, renderOpts),
|
||||
|
||||
@@ -109075,6 +109075,10 @@
|
||||
"name",
|
||||
"html_url"
|
||||
]
|
||||
},
|
||||
"has_advanced_security": {
|
||||
"type": "boolean",
|
||||
"example": true
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -114337,6 +114341,10 @@
|
||||
"name",
|
||||
"html_url"
|
||||
]
|
||||
},
|
||||
"has_advanced_security": {
|
||||
"type": "boolean",
|
||||
"example": true
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -202347,6 +202355,10 @@
|
||||
"name",
|
||||
"html_url"
|
||||
]
|
||||
},
|
||||
"has_advanced_security": {
|
||||
"type": "boolean",
|
||||
"example": true
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
|
||||
@@ -67302,6 +67302,10 @@
|
||||
"name",
|
||||
"html_url"
|
||||
]
|
||||
},
|
||||
"has_advanced_security": {
|
||||
"type": "boolean",
|
||||
"example": true
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -72482,6 +72486,10 @@
|
||||
"name",
|
||||
"html_url"
|
||||
]
|
||||
},
|
||||
"has_advanced_security": {
|
||||
"type": "boolean",
|
||||
"example": true
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -132284,6 +132292,10 @@
|
||||
"name",
|
||||
"html_url"
|
||||
]
|
||||
},
|
||||
"has_advanced_security": {
|
||||
"type": "boolean",
|
||||
"example": true
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -250127,6 +250139,10 @@
|
||||
"name",
|
||||
"html_url"
|
||||
]
|
||||
},
|
||||
"has_advanced_security": {
|
||||
"type": "boolean",
|
||||
"example": true
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
|
||||
@@ -67938,6 +67938,10 @@
|
||||
"name",
|
||||
"html_url"
|
||||
]
|
||||
},
|
||||
"has_advanced_security": {
|
||||
"type": "boolean",
|
||||
"example": true
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -73118,6 +73122,10 @@
|
||||
"name",
|
||||
"html_url"
|
||||
]
|
||||
},
|
||||
"has_advanced_security": {
|
||||
"type": "boolean",
|
||||
"example": true
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -135366,6 +135374,10 @@
|
||||
"name",
|
||||
"html_url"
|
||||
]
|
||||
},
|
||||
"has_advanced_security": {
|
||||
"type": "boolean",
|
||||
"example": true
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -253438,6 +253450,10 @@
|
||||
"name",
|
||||
"html_url"
|
||||
]
|
||||
},
|
||||
"has_advanced_security": {
|
||||
"type": "boolean",
|
||||
"example": true
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
|
||||
@@ -71061,6 +71061,10 @@
|
||||
"name",
|
||||
"html_url"
|
||||
]
|
||||
},
|
||||
"has_advanced_security": {
|
||||
"type": "boolean",
|
||||
"example": true
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -76280,6 +76284,10 @@
|
||||
"name",
|
||||
"html_url"
|
||||
]
|
||||
},
|
||||
"has_advanced_security": {
|
||||
"type": "boolean",
|
||||
"example": true
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -137636,6 +137644,10 @@
|
||||
"name",
|
||||
"html_url"
|
||||
]
|
||||
},
|
||||
"has_advanced_security": {
|
||||
"type": "boolean",
|
||||
"example": true
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -256589,6 +256601,10 @@
|
||||
"name",
|
||||
"html_url"
|
||||
]
|
||||
},
|
||||
"has_advanced_security": {
|
||||
"type": "boolean",
|
||||
"example": true
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
|
||||
@@ -82464,6 +82464,10 @@
|
||||
"name",
|
||||
"html_url"
|
||||
]
|
||||
},
|
||||
"has_advanced_security": {
|
||||
"type": "boolean",
|
||||
"example": true
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -87716,6 +87720,10 @@
|
||||
"name",
|
||||
"html_url"
|
||||
]
|
||||
},
|
||||
"has_advanced_security": {
|
||||
"type": "boolean",
|
||||
"example": true
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -149558,6 +149566,10 @@
|
||||
"name",
|
||||
"html_url"
|
||||
]
|
||||
},
|
||||
"has_advanced_security": {
|
||||
"type": "boolean",
|
||||
"example": true
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
|
||||
@@ -94335,6 +94335,10 @@
|
||||
"name",
|
||||
"html_url"
|
||||
]
|
||||
},
|
||||
"has_advanced_security": {
|
||||
"type": "boolean",
|
||||
"example": true
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -99597,6 +99601,10 @@
|
||||
"name",
|
||||
"html_url"
|
||||
]
|
||||
},
|
||||
"has_advanced_security": {
|
||||
"type": "boolean",
|
||||
"example": true
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -180454,6 +180462,10 @@
|
||||
"name",
|
||||
"html_url"
|
||||
]
|
||||
},
|
||||
"has_advanced_security": {
|
||||
"type": "boolean",
|
||||
"example": true
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
|
||||
@@ -99052,6 +99052,10 @@
|
||||
"name",
|
||||
"html_url"
|
||||
]
|
||||
},
|
||||
"has_advanced_security": {
|
||||
"type": "boolean",
|
||||
"example": true
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -104314,6 +104318,10 @@
|
||||
"name",
|
||||
"html_url"
|
||||
]
|
||||
},
|
||||
"has_advanced_security": {
|
||||
"type": "boolean",
|
||||
"example": true
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -185849,6 +185857,10 @@
|
||||
"name",
|
||||
"html_url"
|
||||
]
|
||||
},
|
||||
"has_advanced_security": {
|
||||
"type": "boolean",
|
||||
"example": true
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
|
||||
@@ -99333,6 +99333,10 @@
|
||||
"name",
|
||||
"html_url"
|
||||
]
|
||||
},
|
||||
"has_advanced_security": {
|
||||
"type": "boolean",
|
||||
"example": true
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -104595,6 +104599,10 @@
|
||||
"name",
|
||||
"html_url"
|
||||
]
|
||||
},
|
||||
"has_advanced_security": {
|
||||
"type": "boolean",
|
||||
"example": true
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -188733,6 +188741,10 @@
|
||||
"name",
|
||||
"html_url"
|
||||
]
|
||||
},
|
||||
"has_advanced_security": {
|
||||
"type": "boolean",
|
||||
"example": true
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
|
||||
@@ -71996,6 +71996,10 @@
|
||||
"name",
|
||||
"html_url"
|
||||
]
|
||||
},
|
||||
"has_advanced_security": {
|
||||
"type": "boolean",
|
||||
"example": true
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -77258,6 +77262,10 @@
|
||||
"name",
|
||||
"html_url"
|
||||
]
|
||||
},
|
||||
"has_advanced_security": {
|
||||
"type": "boolean",
|
||||
"example": true
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -157129,6 +157137,10 @@
|
||||
"name",
|
||||
"html_url"
|
||||
]
|
||||
},
|
||||
"has_advanced_security": {
|
||||
"type": "boolean",
|
||||
"example": true
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
|
||||
Reference in New Issue
Block a user