Compare commits
2 Commits
feature/sh
...
feature/hi
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9ca5ce823b | ||
|
|
4744293d34 |
@@ -1,7 +1,6 @@
|
|||||||
---
|
---
|
||||||
title: About Hugo XMin
|
title: About Hugo XMin
|
||||||
author: Yihui Xie
|
author: Yihui Xie
|
||||||
toc: true
|
|
||||||
---
|
---
|
||||||
|
|
||||||
**XMin** is the first Hugo theme I have designed. The original reason that I wrote it was I needed a minimal example of Hugo themes when I was writing the [**blogdown**](https://github.com/rstudio/blogdown) book. Basically I wanted a simple theme that supports a navigation menu, a home page, other single pages, lists of pages, blog posts, categories, tags, and RSS. That is all. Nothing fancy. In terms of CSS and JavaScript, I really want to keep them minimal. In fact, this theme does not contain any JavaScript code at all, although on this example website I did introduce some JavaScript code (still relatively simple anyway). The theme does not contain any images, either, and is pretty much a plain-text theme.
|
**XMin** is the first Hugo theme I have designed. The original reason that I wrote it was I needed a minimal example of Hugo themes when I was writing the [**blogdown**](https://github.com/rstudio/blogdown) book. Basically I wanted a simple theme that supports a navigation menu, a home page, other single pages, lists of pages, blog posts, categories, tags, and RSS. That is all. Nothing fancy. In terms of CSS and JavaScript, I really want to keep them minimal. In fact, this theme does not contain any JavaScript code at all, although on this example website I did introduce some JavaScript code (still relatively simple anyway). The theme does not contain any images, either, and is pretty much a plain-text theme.
|
||||||
|
|||||||
@@ -1,26 +0,0 @@
|
|||||||
---
|
|
||||||
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.
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
# 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.
|
|
||||||
@@ -1,40 +0,0 @@
|
|||||||
---
|
|
||||||
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>
|
|
||||||
@@ -2,3 +2,11 @@
|
|||||||
<script async src="//cdn.bootcss.com/mathjax/2.7.1/MathJax.js?config=TeX-MML-AM_CHTML"></script>
|
<script async src="//cdn.bootcss.com/mathjax/2.7.1/MathJax.js?config=TeX-MML-AM_CHTML"></script>
|
||||||
|
|
||||||
<script async src="//yihui.name/js/center-img.js"></script>
|
<script async src="//yihui.name/js/center-img.js"></script>
|
||||||
|
|
||||||
|
<script src="//cdn.bootcss.com/highlight.js/9.12.0/highlight.min.js"></script>
|
||||||
|
<script src="//cdn.bootcss.com/highlight.js/9.12.0/languages/r.min.js"></script>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
hljs.configure({languages: []});
|
||||||
|
hljs.initHighlightingOnLoad();
|
||||||
|
</script>
|
||||||
|
|||||||
1
exampleSite/layouts/partials/head_custom.html
Normal file
1
exampleSite/layouts/partials/head_custom.html
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<link href="//cdn.bootcss.com/highlight.js/9.12.0/styles/github.min.css" rel="stylesheet">
|
||||||
@@ -5,10 +5,6 @@
|
|||||||
{{ if (gt .Params.date 0) }}<h2 class="date">{{ .Date.Format "2006/01/02" }}</h2>{{ end }}
|
{{ if (gt .Params.date 0) }}<h2 class="date">{{ .Date.Format "2006/01/02" }}</h2>{{ end }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{ if .Params.toc }}
|
|
||||||
{{ .TableOfContents }}
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
<main>
|
<main>
|
||||||
{{ .Content }}
|
{{ .Content }}
|
||||||
</main>
|
</main>
|
||||||
|
|||||||
@@ -21,15 +21,12 @@ hr {
|
|||||||
border-style: dashed;
|
border-style: dashed;
|
||||||
color: #ddd;
|
color: #ddd;
|
||||||
}
|
}
|
||||||
#TableOfContents, #TOC {
|
|
||||||
border: 1px solid #eee;
|
|
||||||
border-radius: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* code */
|
/* code */
|
||||||
pre {
|
pre {
|
||||||
border: 1px solid #ddd;
|
border: 1px solid #ddd;
|
||||||
box-shadow: 5px 5px 5px #eee;
|
box-shadow: 5px 5px 5px #eee;
|
||||||
|
background: #f8f8f8;
|
||||||
padding: 1em;
|
padding: 1em;
|
||||||
overflow-x: auto;
|
overflow-x: auto;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user