Skip to content

Commit d6aa8e2

Browse files
authored
Merge pull request #43627 from github/repo-sync
Repo sync
2 parents bef30b7 + 0b3dadf commit d6aa8e2

File tree

3 files changed

+16
-17
lines changed

3 files changed

+16
-17
lines changed

.github/dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ updates:
1313
schedule:
1414
interval: weekly
1515
day: tuesday
16+
cooldown:
17+
default-days: 7
1618
ignore:
1719
# Because this is so dependent on the remote server we use
1820
- dependency-name: '@elastic/elasticsearch'
@@ -27,6 +29,8 @@ updates:
2729
schedule:
2830
interval: weekly
2931
day: tuesday
32+
cooldown:
33+
default-days: 7
3034
ignore:
3135
- dependency-name: '*'
3236
update-types:
@@ -39,6 +43,8 @@ updates:
3943
directory: '/'
4044
schedule:
4145
interval: daily
46+
cooldown:
47+
default-days: 7
4248
groups:
4349
baseImages:
4450
patterns:

config/kubernetes/production/deployments/webapp.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ metadata:
66
moda.github.net/allow-missing-ready-pods: '0'
77
moda.github.net/inject-unified-service-tag-env-var: docs-internal
88
spec:
9-
replicas: 12
9+
replicas: 6
1010
strategy:
1111
type: RollingUpdate
1212
rollingUpdate:

src/article-api/transformers/secret-scanning-transformer.ts

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ import type { Context, Page } from '@/types'
22
import type { PageTransformer } from './types'
33
import { load } from 'js-yaml'
44
import path from 'path'
5-
import { liquid, renderContent } from '@/content-render/index'
5+
import { liquid } from '@/content-render/index'
66
import { allVersions } from '@/versions/lib/all-versions'
77
import { loadTemplate } from '@/article-api/lib/load-template'
88
import { getSecretScanningData } from '@/secret-scanning/lib/get-secret-scanning-data'
99

1010
/**
1111
* Transformer for Secret Scanning pages.
12-
* Loads pattern data and converts secret scanning documentation into markdown format using a Liquid template.
12+
* Loads pattern data and converts secret scanning documentation into markdown format.
1313
* Used by the Article API to render Secret Scanning documentation dynamically.
1414
*/
1515
export class SecretScanningTransformer implements PageTransformer {
@@ -87,22 +87,15 @@ export class SecretScanningTransformer implements PageTransformer {
8787

8888
const intro = page.intro ? await page.renderProp('intro', context, { textOnly: true }) : ''
8989

90-
// Prepare template data
91-
const templateData: Record<string, unknown> = {
92-
page: {
93-
title: page.title,
94-
intro,
95-
},
96-
content,
97-
}
98-
99-
// Load and render template
90+
// Render the template with Liquid only — page.render() already ran
91+
// rewriteLocalLinks on all markdown links, and the regex cleanup above
92+
// only creates fragment links (e.g. #token-versions) which don't need
93+
// link rewriting. So we skip the expensive remark re-parse.
10094
const templateContent = loadTemplate(this.templateName)
101-
102-
return await renderContent(templateContent, {
95+
return await liquid.parseAndRender(templateContent, {
10396
...context,
104-
...templateData,
105-
markdownRequested: true,
97+
page: { title: page.title, intro },
98+
content,
10699
})
107100
}
108101
}

0 commit comments

Comments
 (0)