Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/yihui/hugo-xmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYihui Xie <xie@yihui.name>2017-06-23 06:34:09 +0300
committerYihui Xie <xie@yihui.name>2022-06-15 06:53:33 +0300
commitc77e803111d720f81907f05950ae47b3b69dd3e8 (patch)
tree837ae4ab71d3aa6a48a951cf12333a9c38d2d43d
parent1a346c67b858f5daa328f583ce464aa24327b91e (diff)
an R Markdown example of how to show table of contentsfeature/show-toc
-rw-r--r--exampleSite/content/post/2017-06-22-rmd-toc.Rmd26
-rw-r--r--exampleSite/content/post/2017-06-22-rmd-toc.html40
2 files changed, 66 insertions, 0 deletions
diff --git a/exampleSite/content/post/2017-06-22-rmd-toc.Rmd b/exampleSite/content/post/2017-06-22-rmd-toc.Rmd
new file mode 100644
index 0000000..d5440c5
--- /dev/null
+++ b/exampleSite/content/post/2017-06-22-rmd-toc.Rmd
@@ -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.
diff --git a/exampleSite/content/post/2017-06-22-rmd-toc.html b/exampleSite/content/post/2017-06-22-rmd-toc.html
new file mode 100644
index 0000000..00e4500
--- /dev/null
+++ b/exampleSite/content/post/2017-06-22-rmd-toc.html
@@ -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>