File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
src/project/types/website Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -491,6 +491,7 @@ function navigationHtmlPostprocessor(
491491
492492 // handle repo links
493493 handleRepoLinks (
494+ format ,
494495 doc ,
495496 pathWithForwardSlashes ( sourceRelative ) ,
496497 language ,
@@ -529,6 +530,7 @@ function navigationHtmlPostprocessor(
529530}
530531
531532function handleRepoLinks (
533+ format : Format ,
532534 doc : Document ,
533535 source : string ,
534536 language : FormatLanguage ,
@@ -539,6 +541,7 @@ function handleRepoLinks(
539541 kWebsite ,
540542 config ,
541543 ) ;
544+ const forecRepoActions = format . metadata [ kSiteRepoActions ] === true ;
542545
543546 const elRepoSource = doc . querySelector (
544547 "[" + kDataQuartoSourceUrl + '="repo"]' ,
@@ -550,7 +553,7 @@ function handleRepoLinks(
550553 if ( repoActions . length > 0 ) {
551554 // find the toc
552555 let repoTarget = doc . querySelector ( `nav[role="doc-toc"]` ) ;
553- if ( repoTarget === null ) {
556+ if ( repoTarget === null && forecRepoActions ) {
554557 repoTarget = doc . querySelector ( "#quarto-margin-sidebar" ) ;
555558 }
556559
You can’t perform that action at this time.
0 commit comments