Skip to content

Commit 05f89cc

Browse files
committed
Add xmldocs for IsPhantom
1 parent ecfebbc commit 05f89cc

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

src/Elastic.Documentation.Configuration/TableOfContents/ITocItem.cs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,19 @@ public record TocReference(Uri Source, ITableOfContentsScope TableOfContentsScop
2323
public IReadOnlyDictionary<Uri, TocReference> TocReferences { get; } =
2424
Children.OfType<TocReference>().ToDictionary(kv => kv.Source, kv => kv);
2525

26+
/// <summary>
27+
/// A phantom table of contents is a table of contents that is not rendered in the UI but is used to generate the TOC.
28+
/// This should be used sparingly and needs explicit configuration in navigation.yml.
29+
/// It's typically used for container TOC that holds various other TOC's where its children are rehomed throughout the navigation.
30+
/// <para>Examples of phantom toc's:</para>
31+
/// <list type="">
32+
/// <item> - toc: elasticsearch://reference</item>
33+
/// <item> - toc: docs-content://</item>
34+
/// </list>
35+
/// <para>Because navigation.yml does exhaustive checks to ensure all toc.yml files are referenced, marking these containers as phantoms
36+
/// ensures that these skip validation checks
37+
/// </para>
38+
/// </summary>
2639
public bool IsPhantom { get; init; }
2740
}
2841

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,10 +221,9 @@ void AddToNavigationItems(INavigationItem item, ref int fileIndex)
221221
continue;
222222
}
223223

224-
//var navigationIndex = Interlocked.Increment(ref fileIndex);
225-
//md.NavigationIndex = navigationIndex;
226224
md.PartOfNavigation = true;
227225

226+
// TODO these have to be refactor to be pure navigational properties
228227
md.ScopeDirectory = file.TableOfContentsScope.ScopeDirectory;
229228
md.NavigationRoot = topLevelGroup;
230229
md.NavigationSource = NavigationSource;

0 commit comments

Comments
 (0)