@@ -329,6 +329,8 @@ void ValidateExists(string from, string to, IReadOnlyDictionary<string, string?>
329329
330330 public FrozenSet < MarkdownFile > MarkdownFiles { get ; }
331331
332+ public string FirstInterestingUrl => NavigationIndexedByOrder . Values . OfType < FileNavigationItem > ( ) . First ( ) . Url ;
333+
332334 public DocumentationFile ? DocumentationFileLookup ( IFileInfo sourceFile )
333335 {
334336 var relativePath = Path . GetRelativePath ( SourceDirectory . FullName , sourceFile . FullName ) ;
@@ -377,15 +379,17 @@ public RepositoryLinks CreateLinkReference()
377379 {
378380 var redirects = Configuration . Redirects ;
379381 var crossLinks = Context . Collector . CrossLinks . ToHashSet ( ) . ToArray ( ) ;
380- var links = MarkdownFiles
381- . Select ( m => ( m . LinkReferenceRelativePath , File : m ) )
382+ var links = NavigationIndexedByOrder
383+ . Select ( kv => kv . Value )
384+ . OfType < FileNavigationItem > ( )
385+ . Select ( m => ( m . Model . LinkReferenceRelativePath , Navigation : m ) )
382386 . ToDictionary ( k => RuntimeInformation . IsOSPlatform ( OSPlatform . Windows )
383387 ? k . LinkReferenceRelativePath . Replace ( '\\ ' , '/' )
384388 : k . LinkReferenceRelativePath , v =>
385389 {
386- var anchors = v . File . Anchors . Count == 0 ? null : v . File . Anchors . ToArray ( ) ;
387- var nav = ( ( IPositionalNavigation ) this ) . GetCurrent ( v . File ) ;
388- return new LinkMetadata { Anchors = anchors , Hidden = nav . Hidden } ;
390+ var md = v . Navigation . Model ;
391+ var anchors = md . Anchors . Count == 0 ? null : md . Anchors . ToArray ( ) ;
392+ return new LinkMetadata { Anchors = anchors , Hidden = v . Navigation . Hidden } ;
389393 } ) ;
390394
391395 return new RepositoryLinks
0 commit comments