@@ -24,6 +24,7 @@ export function correctTranslatedContentStrings(content, englishContent, context
|
||||
if (context.code === 'ru') {
|
||||
// We've seen a lot of these in the Russian translations:
|
||||
content = content.replaceAll('{% данных variables', '{% data variables')
|
||||
content = content.replaceAll('{% variables.', '{% data variables.')
|
||||
|
||||
// For the rather custom Russian translation of
|
||||
// the content/get-started/quickstart/github-glossary.md page
|
||||
|
||||
@@ -1031,7 +1031,13 @@ function getRetryAfterSleep(headerValue) {
|
||||
}
|
||||
|
||||
function checkImageSrc(src, $) {
|
||||
if (!src.startsWith('/') && !src.startsWith('http')) {
|
||||
return { CRITICAL: 'Image path is not absolute. Should start with a /' }
|
||||
}
|
||||
const pathname = new URL(src, 'http://example.com').pathname
|
||||
if (pathname.startsWith('http://')) {
|
||||
return { CRITICAL: "Don't use insecure HTTP:// for external images" }
|
||||
}
|
||||
if (!pathname.startsWith('/')) {
|
||||
return { WARNING: "External images can't not be checked" }
|
||||
}
|
||||
|
||||
@@ -339,9 +339,22 @@ async function indexVersion(client, indexName, version, language, sourceDirector
|
||||
mappings: {
|
||||
properties: {
|
||||
url: { type: 'keyword' },
|
||||
title: { type: 'text', analyzer: 'text_analyzer', norms: false },
|
||||
title: {
|
||||
type: 'text',
|
||||
analyzer: 'text_analyzer',
|
||||
norms: false,
|
||||
// This is used for fast highlighting. Uses more space but makes
|
||||
// the searches faster.
|
||||
term_vector: 'with_positions_offsets',
|
||||
},
|
||||
title_explicit: { type: 'text', analyzer: 'text_analyzer_explicit', norms: false },
|
||||
content: { type: 'text', analyzer: 'text_analyzer' },
|
||||
content: {
|
||||
type: 'text',
|
||||
analyzer: 'text_analyzer',
|
||||
// This is used for fast highlighting. Uses more space but makes
|
||||
// the searches faster.
|
||||
term_vector: 'with_positions_offsets',
|
||||
},
|
||||
content_explicit: { type: 'text', analyzer: 'text_analyzer_explicit' },
|
||||
headings: { type: 'text', analyzer: 'text_analyzer', norms: false },
|
||||
headings_explicit: { type: 'text', analyzer: 'text_analyzer_explicit', norms: false },
|
||||
|
||||
Reference in New Issue
Block a user