Skip to content

Commit 65598b0

Browse files
authored
Merge branch 'main' into refactor/commands
2 parents 28324af + 5719f0a commit 65598b0

File tree

20 files changed

+222
-185
lines changed

20 files changed

+222
-185
lines changed

docs/syntax/links.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,8 @@ The syntax follows the format `<scheme>://<path>`, where:
8989
- `path`: The file path within that repository
9090

9191
:::{important}
92-
The `path` in cross-repo links must be relative to the `docset.yml` file and not the full path within the repo
92+
- The `path` in cross-repo links must be relative to the `docset.yml` file and not the full path within the repo.
93+
- The link text is mandatory; if you omit it, the link will fail to be displayed.
9394
:::
9495

9596
Never use a full URL for links across documentation repositories.

src/Elastic.ApiExplorer/OpenApiGenerator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ private async Task<IFileInfo> Render<T>(INavigationItem current, T page, ApiRend
288288
if (!outputFile.Directory!.Exists)
289289
outputFile.Directory.Create();
290290

291-
var navigationRenderResult = await navigationRenderer.RenderNavigation(current.NavigationRoot, new Uri("http://ignored.example"), INavigationHtmlWriter.AllLevels, ctx);
291+
var navigationRenderResult = await navigationRenderer.RenderNavigation(current.NavigationRoot, INavigationHtmlWriter.AllLevels, ctx);
292292
renderContext = renderContext with
293293
{
294294
CurrentNavigation = current,

src/Elastic.Documentation.Site/Navigation/INavigationHtmlWriter.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ public interface INavigationHtmlWriter
1010
{
1111
const int AllLevels = -1;
1212

13-
Task<NavigationRenderResult> RenderNavigation(IRootNavigationItem<INavigationModel, INavigationItem> currentRootNavigation, Uri navigationSource,
14-
int maxLevel, Cancel ctx = default);
13+
Task<NavigationRenderResult> RenderNavigation(IRootNavigationItem<INavigationModel, INavigationItem> currentRootNavigation, int maxLevel, Cancel ctx = default);
1514

1615
async Task<string> Render(NavigationViewModel model, Cancel ctx)
1716
{

src/Elastic.Documentation.Site/Navigation/IsolatedBuildNavigationHtmlWriter.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ public class IsolatedBuildNavigationHtmlWriter(BuildContext context, IRootNaviga
1313
{
1414
private readonly ConcurrentDictionary<(string, int), string> _renderedNavigationCache = [];
1515

16-
public async Task<NavigationRenderResult> RenderNavigation(IRootNavigationItem<INavigationModel, INavigationItem> currentRootNavigation,
17-
Uri navigationSource, int maxLevel, Cancel ctx = default)
16+
public async Task<NavigationRenderResult> RenderNavigation(
17+
IRootNavigationItem<INavigationModel, INavigationItem> currentRootNavigation, int maxLevel, Cancel ctx = default
18+
)
1819
{
1920
var navigation = context.Configuration.Features.PrimaryNavEnabled || currentRootNavigation.IsUsingNavigationDropdown
2021
? currentRootNavigation

src/Elastic.Documentation.Site/package-lock.json

Lines changed: 34 additions & 21 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Elastic.Documentation.Site/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232
"private": true,
3333
"devDependencies": {
3434
"@elastic/datemath": "5.0.3",
35-
"@elastic/eui": "104.1.0",
36-
"@elastic/eui-theme-borealis": "3.1.0",
35+
"@elastic/eui": "105.0.0",
36+
"@elastic/eui-theme-borealis": "3.2.0",
3737
"@emotion/css": "11.13.5",
3838
"@emotion/react": "11.14.0",
3939
"@eslint/js": "9.30.1",
@@ -48,7 +48,7 @@
4848
"postcss": "8.5.6",
4949
"postcss-import": "16.1.1",
5050
"prettier": "3.6.2",
51-
"prettier-plugin-tailwindcss": "0.6.13",
51+
"prettier-plugin-tailwindcss": "0.6.14",
5252
"react": "18.3.1",
5353
"react-dom": "18.3.1",
5454
"typescript-eslint": "8.35.1"

src/Elastic.Markdown/HtmlWriter.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ private async Task<RenderResult> RenderLayout(MarkdownFile markdown, MarkdownDoc
5656
var html = MarkdownFile.CreateHtml(document);
5757
await DocumentationSet.Tree.Resolve(ctx);
5858

59-
var fullNavigationRenderResult = await NavigationHtmlWriter.RenderNavigation(markdown.NavigationRoot, markdown.NavigationSource, INavigationHtmlWriter.AllLevels, ctx);
60-
var miniNavigationRenderResult = await NavigationHtmlWriter.RenderNavigation(markdown.NavigationRoot, markdown.NavigationSource, 1, ctx);
59+
var fullNavigationRenderResult = await NavigationHtmlWriter.RenderNavigation(markdown.NavigationRoot, INavigationHtmlWriter.AllLevels, ctx);
60+
var miniNavigationRenderResult = await NavigationHtmlWriter.RenderNavigation(markdown.NavigationRoot, 1, ctx);
6161

6262
var navigationHtmlRenderResult = DocumentationSet.Context.Configuration.Features.LazyLoadNavigation
6363
? miniNavigationRenderResult
@@ -135,7 +135,7 @@ private async Task<RenderResult> RenderLayout(MarkdownFile markdown, MarkdownDoc
135135
UrlPathPrefix = markdown.UrlPathPrefix,
136136
AppliesTo = markdown.YamlFrontMatter?.AppliesTo,
137137
GithubEditUrl = editUrl,
138-
AllowIndexing = DocumentationSet.Context.AllowIndexing && (markdown is DetectionRuleFile || !current.Hidden),
138+
AllowIndexing = DocumentationSet.Context.AllowIndexing && (markdown.CrossLink.Equals("docs-content://index.md", StringComparison.OrdinalIgnoreCase) || markdown is DetectionRuleFile || !current.Hidden),
139139
CanonicalBaseUrl = DocumentationSet.Context.CanonicalBaseUrl,
140140
GoogleTagManager = DocumentationSet.Context.GoogleTagManager,
141141
Features = DocumentationSet.Configuration.Features,

src/Elastic.Markdown/IO/MarkdownFile.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ DocumentationSet set
5757
ScopeDirectory = build.Configuration.ScopeDirectory;
5858

5959
NavigationRoot = set.Tree;
60-
NavigationSource = set.Source;
6160
}
6261

6362
public bool PartOfNavigation { get; set; }
@@ -66,8 +65,6 @@ DocumentationSet set
6665

6766
public IRootNavigationItem<INavigationModel, INavigationItem> NavigationRoot { get; set; }
6867

69-
public Uri NavigationSource { get; set; }
70-
7168
private IDiagnosticsCollector Collector { get; }
7269

7370
public string? UrlPathPrefix { get; }

src/Elastic.Markdown/IO/Navigation/DocumentationGroup.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
namespace Elastic.Markdown.IO.Navigation;
1313

14-
[DebuggerDisplay("Group >{Depth} {FolderName} ({NavigationItems.Count} items)")]
14+
[DebuggerDisplay("Toc: {Depth} {NavigationSource} > ({NavigationItems.Count} items)")]
1515
public class DocumentationGroup : INodeNavigationItem<MarkdownFile, INavigationItem>
1616
{
1717
private readonly TableOfContentsTreeCollector _treeCollector;
@@ -138,7 +138,6 @@ void AddToNavigationItems(INavigationItem item, ref int fileIndex)
138138
// TODO these have to be refactor to be pure navigational properties
139139
md.ScopeDirectory = file.TableOfContentsScope.ScopeDirectory;
140140
md.NavigationRoot = rootNavigationItem;
141-
md.NavigationSource = NavigationSource;
142141

143142
foreach (var extension in lookups.EnabledExtensions)
144143
extension.Visit(d, tocItem);

src/Elastic.Markdown/IO/Navigation/TableOfContentsTree.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
namespace Elastic.Markdown.IO.Navigation;
1010

11-
[DebuggerDisplay("Toc >{Depth} {FolderName} ({NavigationItems.Count} items)")]
11+
[DebuggerDisplay("Toc: {Depth} {NavigationSource} > ({NavigationItems.Count} items)")]
1212
public class TableOfContentsTree : DocumentationGroup, IRootNavigationItem<MarkdownFile, INavigationItem>
1313
{
1414
public Uri Source { get; }

0 commit comments

Comments
 (0)