diff --git a/components/ui/MarkdownContent/stylesheets/code.scss b/components/ui/MarkdownContent/stylesheets/code.scss
index ff3bd837fd42..a6fe60f10464 100644
--- a/components/ui/MarkdownContent/stylesheets/code.scss
+++ b/components/ui/MarkdownContent/stylesheets/code.scss
@@ -5,9 +5,13 @@
border: 1px var(--color-border-default) solid;
}
+ pre code {
+ white-space: pre-wrap;
+ }
+
[class~="height-constrained-code-block"] pre {
max-height: 32rem;
- overflow: auto;
+ overflow-y: auto;
}
[class~="code-example"] {
diff --git a/data/learning-tracks/README.md b/data/learning-tracks/README.md
index 69d08c435a05..7bb8339b55a1 100644
--- a/data/learning-tracks/README.md
+++ b/data/learning-tracks/README.md
@@ -23,10 +23,6 @@ Learning track data for a product is defined in two places:
For example, in `data/learning-tracks/actions.yml`, each of the items from the content file's `learningTracks` array is represented with additional data such as `title`, `description`, and an array of `guides` links.
- One learning track in this YAML **per version** must be designated as a "featured" learning track via `featured_track: true`, which will set it to appear at the top of the product guides page. A test will fail if this property is missing.
-
- The `featured_track` property can be a simple boolean (i.e., `featured_track: true`) or it can be a string that includes versioning statements (e.g., `featured_track: '{% ifversion fpt %}true{% else %}false{% endif %}'`). If you use versioning, you'll have multiple `featured_track`s per YML file, but make sure that only one will render in each currently supported version. A test will fail if there are more or less than one featured link for each version.
-
## Versioning
Versioning for learning tracks is processed at page render time. The code lives in [`lib/learning-tracks.js`](lib/learning-tracks.js), which is called by `page.render()`. The processed learning tracks are then rendered by `components/guides`.
@@ -41,7 +37,6 @@ For example:
learning_track_name:
title: 'Learning track title'
description: 'Learning track description'
- featured_track: true
versions:
ghes: '>=3.0'
guides:
diff --git a/data/learning-tracks/actions.yml b/data/learning-tracks/actions.yml
index a8ce4be264e7..3d393acb530f 100644
--- a/data/learning-tracks/actions.yml
+++ b/data/learning-tracks/actions.yml
@@ -10,7 +10,6 @@ getting_started:
- /actions/using-workflows/about-workflows
- /actions/using-workflows/reusing-workflows
- /actions/security-guides/security-hardening-for-github-actions
- featured_track: true
adopting_github_actions_for_your_enterprise_ghec:
title: Adopt GitHub Actions for your enterprise
description: >-
diff --git a/data/learning-tracks/admin.yml b/data/learning-tracks/admin.yml
index 6b164e53434a..1551b86ac5d2 100644
--- a/data/learning-tracks/admin.yml
+++ b/data/learning-tracks/admin.yml
@@ -3,7 +3,6 @@ get_started_with_github_ae:
description: >-
Learn about {% data variables.product.prodname_ghe_managed %} and complete
the initial configuration of a new enterprise.
- featured_track: true
versions:
ghae: '*'
guides:
@@ -20,7 +19,6 @@ deploy_an_instance:
description: >-
Install {% data variables.product.prodname_ghe_server %} on your platform of
choice and configure SAML authentication.
- featured_track: true
versions:
ghes: '*'
guides:
diff --git a/data/learning-tracks/code-security.yml b/data/learning-tracks/code-security.yml
index f0e5eb892f21..ec1d77993cab 100644
--- a/data/learning-tracks/code-security.yml
+++ b/data/learning-tracks/code-security.yml
@@ -3,7 +3,6 @@ security_advisories:
description: >-
Using repository security advisories to privately fix a reported
vulnerability and get a CVE.
- featured_track: '{% ifversion fpt or ghec %}true{% else %}false{% endif %}'
guides:
- >-
/code-security/security-advisories/guidance-on-reporting-and-writing/about-coordinated-disclosure-of-security-vulnerabilities
@@ -174,7 +173,6 @@ code_security_actions:
description: >-
Check your default branch and every pull request to keep vulnerabilities and
errors out of your repository.
- featured_track: '{% ifversion ghae or ghes %}true{% else %}false{% endif %}'
guides:
- >-
/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning
diff --git a/lib/page.js b/lib/page.js
index 174b7ddfc03b..9036ba881c27 100644
--- a/lib/page.js
+++ b/lib/page.js
@@ -208,11 +208,7 @@ class Page {
// Learning tracks may contain Liquid and need to have versioning processed.
if (this.rawLearningTracks) {
- const { featuredTrack, learningTracks } = await processLearningTracks(
- this.rawLearningTracks,
- context,
- )
- this.featuredTrack = featuredTrack
+ const { learningTracks } = await processLearningTracks(this.rawLearningTracks, context)
this.learningTracks = learningTracks
}
diff --git a/src/content-linter/lib/learning-tracks-schema.js b/src/content-linter/lib/learning-tracks-schema.js
index 4025e18ea739..8543a5caf8dd 100644
--- a/src/content-linter/lib/learning-tracks-schema.js
+++ b/src/content-linter/lib/learning-tracks-schema.js
@@ -26,9 +26,6 @@ export default {
type: 'array',
items: { type: 'string' },
},
- featured_track: {
- type: ['boolean', 'string'],
- },
versions: versionsProps,
},
},
diff --git a/src/content-linter/tests/lint-files.js b/src/content-linter/tests/lint-files.js
index 3abec84fec8f..915f339ba542 100755
--- a/src/content-linter/tests/lint-files.js
+++ b/src/content-linter/tests/lint-files.js
@@ -18,18 +18,13 @@ import { frontmatter, deprecatedProperties } from '../../../lib/frontmatter.js'
import languages from '../../../lib/languages.js'
import releaseNotesSchema from '../lib/release-notes-schema.js'
import learningTracksSchema from '../lib/learning-tracks-schema.js'
-import { renderContent, liquid } from '#src/content-render/index.js'
-import getApplicableVersions from '../../../lib/get-applicable-versions.js'
-import { allVersions } from '../../../lib/all-versions.js'
+import { liquid } from '#src/content-render/index.js'
import { getDiffFiles } from '../lib/diff-files.js'
import { formatAjvErrors } from '../../../tests/helpers/schemas.js'
jest.useFakeTimers({ legacyFakeTimers: true })
const __dirname = path.dirname(fileURLToPath(import.meta.url))
-const enterpriseServerVersions = Object.keys(allVersions).filter((v) =>
- v.startsWith('enterprise-server@'),
-)
const rootDir = path.join(__dirname, '../../..')
const contentDir = path.join(rootDir, 'content')
@@ -1023,45 +1018,6 @@ describe('lint learning tracks', () => {
expect(valid, errors).toBe(true)
})
- it('has one and only one featured track per supported version', async () => {
- // Use the YAML filename to determine which product this refers to, and then peek
- // inside the product TOC frontmatter to see which versions the product is available in.
- const product = path.posix.basename(yamlRelPath, '.yml')
- const productTocPath = path.posix.join('content', product, 'index.md')
- const productContents = await fs.readFile(productTocPath, 'utf8')
- const { data } = frontmatter(productContents)
- const productVersions = getApplicableVersions(data.versions, productTocPath)
-
- const featuredTracks = {}
- const context = { enterpriseServerVersions }
-
- // For each of the product's versions, render the learning track data and look for a featured track.
- await Promise.all(
- productVersions.map(async (version) => {
- const featuredTracksPerVersion = []
-
- for (const entry of Object.values(dictionary)) {
- if (!entry.featured_track) return
- context.currentVersion = version
- context[allVersions[version].shortName] = true
- const isFeaturedLink =
- typeof entry.featured_track === 'boolean' ||
- (await renderContent(entry.featured_track, context, {
- textOnly: true,
- })) === 'true'
- featuredTracksPerVersion.push(isFeaturedLink)
- }
-
- featuredTracks[version] = featuredTracksPerVersion.length
- }),
- )
-
- Object.entries(featuredTracks).forEach(([version, numOfFeaturedTracks]) => {
- const errorMessage = `Expected 1 featured learning track but found ${numOfFeaturedTracks} for ${version} in ${yamlAbsPath}`
- expect(numOfFeaturedTracks, errorMessage).toBe(1)
- })
- })
-
it('contains valid liquid', () => {
const toLint = []
Object.values(dictionary).forEach(({ title, description }) => {
diff --git a/src/landings/components/GuidesHero.module.scss b/src/landings/components/GuidesHero.module.scss
deleted file mode 100644
index 63c86caf312f..000000000000
--- a/src/landings/components/GuidesHero.module.scss
+++ /dev/null
@@ -1,15 +0,0 @@
-.fadeLeft {
- background: linear-gradient(
- to right,
- var(--color-canvas-default),
- transparent
- );
-}
-
-.fadeRight {
- background: linear-gradient(
- to left,
- var(--color-canvas-default),
- transparent
- );
-}
diff --git a/src/landings/components/GuidesHero.tsx b/src/landings/components/GuidesHero.tsx
index 14c657e82b44..bf0536534137 100644
--- a/src/landings/components/GuidesHero.tsx
+++ b/src/landings/components/GuidesHero.tsx
@@ -1,92 +1,17 @@
-import cx from 'classnames'
import { useProductGuidesContext } from 'src/landings/components/ProductGuidesContext'
-import { ArrowRightIcon, StarFillIcon } from '@primer/octicons-react'
-import { useTranslation } from 'components/hooks/useTranslation'
-import { Link } from 'components/Link'
-import { TruncateLines } from 'components/ui/TruncateLines'
import { Lead } from 'components/ui/Lead'
-import styles from './GuidesHero.module.scss'
-export const GuidesHero = () => {
- const { title, intro, featuredTrack } = useProductGuidesContext()
- const { t } = useTranslation('product_guides')
- const cardWidth = 280
- const firstCardWidth = cardWidth + 10 // so the english text doesn't wrap
-
- const guideItems = featuredTrack?.guides?.map((guide) => (
-