contrast-hugo/README.md

57 lines
1.5 KiB
Markdown
Raw Normal View History

2020-02-03 21:04:06 -05:00
Adaption of the of [contrast](https://github.com/niklasbuschmann/contrast) Jekyll theme.
2019-07-18 15:32:22 -04:00
2019-07-18 15:49:34 -04:00
## Installation
2019-07-19 06:42:58 -04:00
To install Contrast as your default theme, first install this repository in the `themes/` directory:
2019-07-18 15:49:34 -04:00
$ cd themes/
$ git clone https://github.com/niklasbuschmann/contrast-hugo.git
2020-02-05 15:54:37 -05:00
Second, specify `contrast-hugo` as your default theme in the `config.yaml` file. Just add the line
2019-07-18 15:49:34 -04:00
2020-02-05 15:54:37 -05:00
theme: "contrast-hugo"
2019-07-18 15:49:34 -04:00
at the top of the file.
2020-02-03 21:04:06 -05:00
## Sidebar
2020-02-18 11:55:14 -05:00
Instead of the horizontal menu, a sidebar can be enabled with `sidebar: true`. See [here](https://niklasbuschmann.github.io/contrast/) for an example of the sidebar in action.
2020-02-03 21:04:06 -05:00
2020-02-05 15:54:37 -05:00
An example `config.yaml` section could look like this:
2020-02-03 21:04:06 -05:00
```yaml
params:
2020-02-05 15:54:37 -05:00
sidebar: true
2020-02-18 11:49:01 -05:00
show_excerpts: true
2020-02-05 15:54:37 -05:00
description: 'Made by <a href="">Blog Author</a>'
2020-02-03 21:04:06 -05:00
menu:
main:
2020-02-18 11:55:14 -05:00
- {name: "Home", url: "/", identifier: "home", weight: 1}
- {name: "About", url: "/about/", identifier: "address-card", weight: 2}
2020-02-18 11:49:01 -05:00
remote:
2020-02-18 11:55:14 -05:00
- {name: "Mail", url: "mailto:", identifier: "envelope", weight: 3}
- {name: "Github", url: "https://github.com/", identifier: "github", weight: 4}
- {name: "Subscribe", url: "/index.xml", identifier: "rss", weight: 5}
2020-02-03 21:04:06 -05:00
```
2019-07-19 12:54:30 -04:00
2019-07-18 15:32:22 -04:00
## Features
- supports dark mode on macOS Mojave
2020-02-03 21:04:06 -05:00
- optional sidebar
2019-07-18 15:32:22 -04:00
- MathJax support
2019-07-18 15:49:34 -04:00
- no external resources
2019-07-18 15:32:22 -04:00
- responsive
## Based on
2020-02-03 21:04:06 -05:00
- [Hyde](https://github.com/poole/hyde)
2019-07-18 15:32:22 -04:00
- [Minima](https://github.com/jekyll/minima)
- [KaTeX](https://katex.org/)
2020-02-03 21:04:06 -05:00
- [Font-Awesome](https://fontawesome.com/)
2019-07-18 15:32:22 -04:00
## License
[public domain](http://unlicense.org/)