-
-
Notifications
You must be signed in to change notification settings - Fork 361
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
an R Markdown example of how to show table of contents
- Loading branch information
Showing
2 changed files
with
66 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
--- | ||
title: Show Table of Contents for R Markdown Posts | ||
date: '2017-06-22' | ||
slug: rmd-toc | ||
output: | ||
blogdown::html_page: | ||
toc: true | ||
--- | ||
|
||
# One Section | ||
|
||
A quick fox jumped over the lazy dog. | ||
|
||
![quick fox](https://slides.yihui.name/gif/quick-fox.gif) | ||
|
||
# Another Section | ||
|
||
A quick fox jumped over the lazy dog. | ||
|
||
## A subsection | ||
|
||
A quick fox jumped over the lazy dog. | ||
|
||
## Another subsection | ||
|
||
A quick fox jumped over the lazy dog. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
--- | ||
title: Show Table of Contents for R Markdown Posts | ||
date: '2017-06-22' | ||
slug: rmd-toc | ||
output: | ||
blogdown::html_page: | ||
toc: true | ||
--- | ||
|
||
|
||
<div id="TOC"> | ||
<ul> | ||
<li><a href="#one-section">One Section</a></li> | ||
<li><a href="#another-section">Another Section</a><ul> | ||
<li><a href="#a-subsection">A subsection</a></li> | ||
<li><a href="#another-subsection">Another subsection</a></li> | ||
</ul></li> | ||
</ul> | ||
</div> | ||
|
||
<div id="one-section" class="section level1"> | ||
<h1>One Section</h1> | ||
<p>A quick fox jumped over the lazy dog.</p> | ||
<div class="figure"> | ||
<img src="https://slides.yihui.name/gif/quick-fox.gif" alt="quick fox" /> | ||
<p class="caption">quick fox</p> | ||
</div> | ||
</div> | ||
<div id="another-section" class="section level1"> | ||
<h1>Another Section</h1> | ||
<p>A quick fox jumped over the lazy dog.</p> | ||
<div id="a-subsection" class="section level2"> | ||
<h2>A subsection</h2> | ||
<p>A quick fox jumped over the lazy dog.</p> | ||
</div> | ||
<div id="another-subsection" class="section level2"> | ||
<h2>Another subsection</h2> | ||
<p>A quick fox jumped over the lazy dog.</p> | ||
</div> | ||
</div> |