mirror of
https://github.com/yihui/hugo-xmin.git
synced 2024-11-22 08:29:19 +02:00
yihui.name -> yihui.org
This commit is contained in:
parent
aeaa9637cb
commit
2ad5f22b14
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
## _Keep it simple, but not simpler_
|
## _Keep it simple, but not simpler_
|
||||||
|
|
||||||
**XMin** is a Hugo theme written by [Yihui Xie](https://yihui.name) in about four hours: half an hour was spent on the Hugo templates, and 3.5 hours were spent on styling. The main motivation for writing this theme was to provide a really minimal example to beginners of Hugo templates. This XMin theme contains about 130 lines of code in total, including the code in HTML templates and CSS (also counting empty lines).
|
**XMin** is a Hugo theme written by [Yihui Xie](https://yihui.org) in about four hours: half an hour was spent on the Hugo templates, and 3.5 hours were spent on styling. The main motivation for writing this theme was to provide a really minimal example to beginners of Hugo templates. This XMin theme contains about 130 lines of code in total, including the code in HTML templates and CSS (also counting empty lines).
|
||||||
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
@ -25,4 +25,4 @@ find . -not -path '*/exampleSite/*' \( -name '*.html' -o -name '*.css' \) | xarg
|
||||||
|
|
||||||
I can certainly further reduce the code, for example, by eliminating the CSS, but I believe a tiny bit of CSS can greatly improve readability. You cannot really find many CSS frameworks that only contain 50 lines of code.
|
I can certainly further reduce the code, for example, by eliminating the CSS, but I believe a tiny bit of CSS can greatly improve readability. You cannot really find many CSS frameworks that only contain 50 lines of code.
|
||||||
|
|
||||||
[![Screenshot](https://github.com/yihui/hugo-xmin/raw/master/images/screenshot.png)](https://xmin.yihui.name)
|
[![Screenshot](https://github.com/yihui/hugo-xmin/raw/master/images/screenshot.png)](https://xmin.yihui.org)
|
||||||
|
|
|
@ -33,7 +33,7 @@ footnotereturnlinkcontents = "↩"
|
||||||
|
|
||||||
[params]
|
[params]
|
||||||
description = "A website built through Hugo and blogdown."
|
description = "A website built through Hugo and blogdown."
|
||||||
footer = "© [Yihui Xie](https://yihui.name) 2017 -- 2019 | [Github](https://github.com/yihui) | [Twitter](https://twitter.com/xieyihui)"
|
footer = "© [Yihui Xie](https://yihui.org) 2017 -- 2019 | [Github](https://github.com/yihui) | [Twitter](https://twitter.com/xieyihui)"
|
||||||
|
|
||||||
[markup]
|
[markup]
|
||||||
[markup.goldmark]
|
[markup.goldmark]
|
||||||
|
|
|
@ -8,7 +8,7 @@ title: Home
|
||||||
|
|
||||||
## _Keep it simple, but not simpler_
|
## _Keep it simple, but not simpler_
|
||||||
|
|
||||||
**XMin** is a Hugo theme written by [Yihui Xie](https://yihui.name) in about four hours: half an hour was spent on the Hugo templates, and 3.5 hours were spent on styling. The main motivation for writing this theme was to provide a really minimal example to beginners of Hugo templates. This XMin theme contains about 130 lines of code in total, including the code in HTML templates and CSS (also counting empty lines).
|
**XMin** is a Hugo theme written by [Yihui Xie](https://yihui.org) in about four hours: half an hour was spent on the Hugo templates, and 3.5 hours were spent on styling. The main motivation for writing this theme was to provide a really minimal example to beginners of Hugo templates. This XMin theme contains about 130 lines of code in total, including the code in HTML templates and CSS (also counting empty lines).
|
||||||
|
|
||||||
```{bash, comment='', echo=3, eval=Sys.which('bash') != ''}
|
```{bash, comment='', echo=3, eval=Sys.which('bash') != ''}
|
||||||
cd ../..;
|
cd ../..;
|
||||||
|
|
|
@ -8,7 +8,7 @@ title: Home
|
||||||
|
|
||||||
## _Keep it simple, but not simpler_
|
## _Keep it simple, but not simpler_
|
||||||
|
|
||||||
**XMin** is a Hugo theme written by [Yihui Xie](https://yihui.name) in about four hours: half an hour was spent on the Hugo templates, and 3.5 hours were spent on styling. The main motivation for writing this theme was to provide a really minimal example to beginners of Hugo templates. This XMin theme contains about 130 lines of code in total, including the code in HTML templates and CSS (also counting empty lines).
|
**XMin** is a Hugo theme written by [Yihui Xie](https://yihui.org) in about four hours: half an hour was spent on the Hugo templates, and 3.5 hours were spent on styling. The main motivation for writing this theme was to provide a really minimal example to beginners of Hugo templates. This XMin theme contains about 130 lines of code in total, including the code in HTML templates and CSS (also counting empty lines).
|
||||||
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|
|
@ -9,7 +9,7 @@ The theme name "XMin" can be interpreted as "**X**ie's **Min**imal theme" (Xie i
|
||||||
|
|
||||||
# config.toml
|
# config.toml
|
||||||
|
|
||||||
For this example site, I defined permalinks for two sections, `post` and `note`, so that the links to pages under these directories will contain the date info, e.g., `https://xmin.yihui.name/post/2016/02/14/a-plain-markdown-post/`. This is optional, and it is up to your personal taste of URLs.
|
For this example site, I defined permalinks for two sections, `post` and `note`, so that the links to pages under these directories will contain the date info, e.g., `https://xmin.yihui.org/post/2016/02/14/a-plain-markdown-post/`. This is optional, and it is up to your personal taste of URLs.
|
||||||
|
|
||||||
```
|
```
|
||||||
[permalinks]
|
[permalinks]
|
||||||
|
@ -47,7 +47,7 @@ The page footer can be defined in `.Params.footer`, and the text is treated as M
|
||||||
|
|
||||||
```
|
```
|
||||||
[params]
|
[params]
|
||||||
footer = "© [Yihui Xie](https://yihui.name) 2017"
|
footer = "© [Yihui Xie](https://yihui.org) 2017"
|
||||||
```
|
```
|
||||||
|
|
||||||
# Custom layouts
|
# Custom layouts
|
||||||
|
@ -55,11 +55,11 @@ The page footer can be defined in `.Params.footer`, and the text is treated as M
|
||||||
There are two layout files under `layouts/partials/` that you may want to override: `head_custom.html` and `foot_custom.html`. This is how you inject arbitrary HTML code to the head and foot areas. For example, this site has a file `layouts/partials/foot_custom.html` to support LaTeX math via MathJax and center images automatically:
|
There are two layout files under `layouts/partials/` that you may want to override: `head_custom.html` and `foot_custom.html`. This is how you inject arbitrary HTML code to the head and foot areas. For example, this site has a file `layouts/partials/foot_custom.html` to support LaTeX math via MathJax and center images automatically:
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<script src="//yihui.name/js/math-code.js"></script>
|
<script src="//yihui.org/js/math-code.js"></script>
|
||||||
<script async src="//cdn.bootcss.com/mathjax/2.7.1/MathJax.js?config=TeX-MML-AM_CHTML">
|
<script async src="//cdn.bootcss.com/mathjax/2.7.1/MathJax.js?config=TeX-MML-AM_CHTML">
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script async src="//yihui.name/js/center-img.js"></script>
|
<script async src="//yihui.org/js/center-img.js"></script>
|
||||||
```
|
```
|
||||||
|
|
||||||
You can certainly enable highlight.js for syntax highlighting by yourself through `head_custom.html` and `foot_custom.html` if you want.
|
You can certainly enable highlight.js for syntax highlighting by yourself through `head_custom.html` and `foot_custom.html` if you want.
|
||||||
|
|
|
@ -87,6 +87,6 @@ A table (centered by default):
|
||||||
|
|
||||||
An image (automatically centered when it is appropriate):
|
An image (automatically centered when it is appropriate):
|
||||||
|
|
||||||
![Happy Elmo](https://slides.yihui.name/gif/happy-elmo.gif)
|
![Happy Elmo](https://slides.yihui.org/gif/happy-elmo.gif)
|
||||||
|
|
||||||
Looks good?
|
Looks good?
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<script src="//yihui.name/js/math-code.js"></script>
|
<script src="//yihui.org/js/math-code.js"></script>
|
||||||
<script async src="//mathjax.rstudio.com/latest/MathJax.js?config=TeX-MML-AM_CHTML"></script>
|
<script async src="//mathjax.rstudio.com/latest/MathJax.js?config=TeX-MML-AM_CHTML"></script>
|
||||||
|
|
||||||
<script async src="//yihui.name/js/center-img.js"></script>
|
<script async src="//yihui.org/js/center-img.js"></script>
|
||||||
|
|
|
@ -2,11 +2,11 @@ name = "XMin"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
licenselink = "https://github.com/yihui/hugo-xmin/blob/master/LICENSE.md"
|
licenselink = "https://github.com/yihui/hugo-xmin/blob/master/LICENSE.md"
|
||||||
description = "eXtremely Minimal Hugo theme: about 150 lines of code in total, including HTML and CSS"
|
description = "eXtremely Minimal Hugo theme: about 150 lines of code in total, including HTML and CSS"
|
||||||
homepage = "https://xmin.yihui.name"
|
homepage = "https://xmin.yihui.org"
|
||||||
tags = ["minimal", "blog", "personal", "clean", "simple", "starter", "minimalist"]
|
tags = ["minimal", "blog", "personal", "clean", "simple", "starter", "minimalist"]
|
||||||
features = ["blog"]
|
features = ["blog"]
|
||||||
min_version = "0.18"
|
min_version = "0.18"
|
||||||
|
|
||||||
[author]
|
[author]
|
||||||
name = "Yihui Xie"
|
name = "Yihui Xie"
|
||||||
homepage = "https://yihui.name"
|
homepage = "https://yihui.org"
|
||||||
|
|
Loading…
Reference in New Issue