Skip to content

Commit b7d70d2

Browse files
committed
Fix vignette toc hiding and styling for pkgdown 2.1.3
1 parent eca1966 commit b7d70d2

6 files changed

Lines changed: 42 additions & 16 deletions

File tree

Lines changed: 37 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,63 @@
1-
{{^as_is}}$for(header-includes)$ $header-includes$ $endfor${{/as_is}}
1+
<!-- Last updated: pkgdown 2.1.3 -->
2+
{{^as_is}}$for(header-includes)$
3+
$header-includes$
4+
$endfor${{/as_is}}
25

36
<div class="row">
4-
<!-- Don't add toc if the article has no toc -->
7+
<!-- Allow content to be full-width if article has no toc -->
58
<main id="main" $if(toc)$class="col-md-9" $endif$>
69
<div class="page-header">
7-
{{#logo}}<img src="{{logo.src}}" class="logo" alt="" />{{/logo}}
10+
{{#logo}}<img src="{{logo.src}}" class="logo" alt="" >{{/logo}}
811
<h1>{{{pagetitle}}}</h1>
912
$if(subtitle)$
1013
<h3 data-toc-skip class="subtitle">$subtitle$</h3>
11-
$endif$ $for(author)$ $if(author.name)$
14+
$endif$
15+
$for(author)$
16+
$if(author.name)$
1217
<h4 data-toc-skip class="author">$author.name$</h4>
1318
$if(author.affiliation)$
1419
<address class="author_afil">
15-
$author.affiliation$<br />$endif$ $if(author.email)$
16-
<a class="author_email" href="mailto:#">$author.email$</a>
20+
$author.affiliation$<br>$endif$
21+
$if(author.email)$
22+
<a class="author_email" href="mailto:#">$author.email$</a>
1723
</address>
18-
$endif$ $else$
24+
$endif$
25+
$else$
1926
<h4 data-toc-skip class="author">$author$</h4>
20-
$endif$ $endfor$ $if(date)$
27+
$endif$
28+
$endfor$
29+
30+
$if(date)$
2131
<h4 data-toc-skip class="date">$date$</h4>
22-
$endif$ {{#source}}<small class="dont-index">{{{.}}}</small>{{/source}}
32+
$endif$
33+
34+
{{#source}}<small class="dont-index">{{{.}}}</small>{{/source}}
2335
<div class="d-none name"><code>{{filename}}</code></div>
2436
</div>
2537

26-
$for(include-before)$ $include-before$ $endfor$ $if(abstract)$
38+
$for(include-before)$
39+
$include-before$
40+
$endfor$
41+
42+
$if(abstract)$
2743
<div class="abstract">
28-
<p class="abstract">Abstract</p>
44+
<p class="abstract">{{#translate}}{{abstract}}{{/translate}}</p>
2945
$abstract$
3046
</div>
31-
$endif$ $body$
47+
$endif$
48+
49+
$body$
3250
</main>
33-
$if(toc)$
51+
{{#toc}}
3452
<aside class="col-md-3">
35-
<nav id="toc">
53+
<nav id="toc" aria-label="{{#translate}}{{toc}}{{/translate}}">
3654
<h2>{{#translate}}{{on_this_page}}{{/translate}}</h2>
3755
</nav>
3856
</aside>
39-
$endif$
57+
{{/toc}}
58+
4059
</div>
4160

42-
$for(include-after)$ $include-after$ $endfor$
61+
$for(include-after)$
62+
$include-after$
63+
$endfor$

vignettes/cran-packages/cran-packages.Rmd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
title: "CRAN Packages"
33
output: html_document
4+
toc: false
45
resource_files:
56
- '.'
67
---

vignettes/nba-box-score/nba-box-score.Rmd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
title: NBA Box Score
33
output: html_document
4+
toc: false
45
resource_files:
56
- '.'
67
---

vignettes/popular-movies/popular-movies.Rmd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
title: "Popular Movies"
33
output: html_document
4+
toc: false
45
resource_files:
56
- '.'
67
---

vignettes/twitter-followers/twitter-followers.Rmd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
title: "Twitter Followers"
33
output: html_document
4+
toc: false
45
resource_files:
56
- '.'
67
---

vignettes/womens-world-cup/womens-world-cup.Rmd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
title: "Women's World Cup Predictions"
33
output: html_document
4+
toc: false
45
resource_files:
56
- '.'
67
---

0 commit comments

Comments
 (0)