Skip to content

Commit e27b1d3

Browse files
committed
Merge branch 'refs/heads/main' into feature/add-applies-to-tests
2 parents 9a8f730 + 692f969 commit e27b1d3

File tree

4 files changed

+28
-19
lines changed

4 files changed

+28
-19
lines changed

config/assembler.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ environments:
2121
cookies_win: x
2222
feature_flags:
2323
SEARCH_OR_ASK_AI: true
24-
edge:
24+
edge:
2525
uri: https://d34ipnu52o64md.cloudfront.net
2626
path_prefix: docs
2727
content_source: edge
@@ -94,12 +94,14 @@ references:
9494
ecs-logging-python:
9595
ecs-logging-ruby:
9696
ecs-logging:
97+
elastic-agent:
9798
elastic-otel-dotnet:
9899
elastic-otel-java:
99100
elastic-otel-node:
100101
elastic-otel-php:
101102
elastic-otel-python:
102103
elastic-serverless-forwarder:
104+
fleet-server:
103105
integration-docs:
104106
private: true
105107
integrations:

config/navigation.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,13 @@ toc:
8080
- toc: kibana://release-notes
8181
path_prefix: release-notes/kibana
8282

83-
# Fleet and Elastic Agent
84-
# https://github.com/elastic/docs-content/blob/main/release-notes/fleet-elastic-agent/toc.yml
85-
- toc: docs-content://release-notes/fleet-elastic-agent
86-
path_prefix: release-notes/fleet
83+
# Elastic Agent
84+
- toc: elastic-agent://release-notes
85+
path_prefix: release-notes/elastic-agent
86+
87+
# Fleet Server
88+
- toc: fleet-server://release-notes
89+
path_prefix: release-notes/fleet-server
8790

8891
# Logstash
8992
# https://github.com/elastic/logstash/blob/main/docs/release-notes/toc.yml
@@ -107,7 +110,7 @@ toc:
107110
# https://github.com/elastic/cloud/blob/master/docs/docset.yml
108111
- toc: cloud://release-notes/cloud-hosted
109112
path_prefix: release-notes/cloud-hosted
110-
113+
111114
# Cloud Enterprise
112115
# https://github.com/elastic/cloud/blob/master/docs/release-notes/cloud-enterprise/toc.yml
113116
- toc: cloud://release-notes/cloud-enterprise
@@ -131,7 +134,7 @@ toc:
131134
# EDOT iOS / Swift
132135
# https://github.com/elastic/apm-agent-ios/blob/main/docs/release-notes/toc.yml
133136
- toc: apm-agent-ios://release-notes
134-
path_prefix: release-notes/edot/sdks/ios
137+
path_prefix: release-notes/edot/sdks/ios
135138
# EDOT Java
136139
# https://github.com/elastic/elastic-otel-java/blob/main/docs/release-notes/toc.yml
137140
- toc: elastic-otel-java://release-notes
@@ -308,7 +311,7 @@ toc:
308311
# https://github.com/elastic/elasticsearch/blob/main/docs/reference/elasticsearch-plugins/toc.yml
309312
- toc: elasticsearch://reference/elasticsearch-plugins
310313
path_prefix: reference/elasticsearch/plugins
311-
314+
312315
# Security
313316
# https://github.com/elastic/docs-content/blob/main/reference/security/toc.yml
314317
- toc: docs-content://reference/security

docs/_redirects.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,3 @@ redirects:
2222
'testing/redirects/third-page.md':
2323
anchors:
2424
'removed-anchor':
25-
# Related to https://github.com/elastic/docs-builder/pull/1614
26-
'docs/contribute/cumulative-docs.md': 'contribute/cumulative-docs/index.md'
27-
'docs/versions/content-patterns.md': 'contribute/cumulative-docs/example-scenarios.md'
28-
'docs/versions/index.md': 'contribute/cumulative-docs/index.md'
29-
# I shouldn't need to do this should I?
30-
# I'm just going to do it to get the preview to build...
31-
'docs/versions/_snippets/content-patterns-list.md': 'contribute/cumulative-docs/index.md'
32-
'docs/contribute/cumulative-docs/images/example-not-one-section.png': 'contribute/cumulative-docs/example-scenarios.md'
33-
'docs/contribute/cumulative-docs/images/example-one-section.png': 'contribute/cumulative-docs/example-scenarios.md'

src/Elastic.Markdown/Myst/InlineParsers/DiagnosticLinkInlineParser.cs

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
33
// See the LICENSE file in the project root for more information
44

5-
using System.Collections.Immutable;
65
using System.Diagnostics.CodeAnalysis;
76
using System.IO.Abstractions;
87
using System.Runtime.InteropServices;
@@ -248,9 +247,23 @@ private static void ValidateInternalUrl(InlineProcessor processor, string url, s
248247
if (string.IsNullOrWhiteSpace(url))
249248
return;
250249

250+
251251
var pathOnDisk = Path.GetFullPath(Path.Combine(includeFrom, url.TrimStart('/')));
252252
if (!context.Build.ReadFileSystem.File.Exists(pathOnDisk))
253-
processor.EmitError(link, $"`{url}` does not exist. resolved to `{pathOnDisk}");
253+
{
254+
if (context.Configuration.Redirects is not null && context.Configuration.Redirects.TryGetValue(url.TrimStart('/'), out var redirect))
255+
{
256+
var name = redirect.To ??
257+
(redirect.Many is not null
258+
? $"one of: {string.Join(", ", redirect.Many.Select(m => m.To))}"
259+
: "unknown"
260+
);
261+
processor.EmitWarning(link, $"Local file `{url}` has a redirect, please update this reference to: {name}");
262+
}
263+
else
264+
processor.EmitError(link, $"`{url}` does not exist. If it was recently removed add a redirect. resolved to `{pathOnDisk}");
265+
266+
}
254267
}
255268

256269
private static void ProcessLinkText(InlineProcessor processor, LinkInline link, MarkdownFile? markdown, string? anchor, string url, IFileInfo file)

0 commit comments

Comments
 (0)