https://github.com/joway/hugo-theme-yinyang
A black-white theme for Hugo.
https://github.com/joway/hugo-theme-yinyang
Last synced: about 1 year ago
JSON representation
A black-white theme for Hugo.
- Host: GitHub
- URL: https://github.com/joway/hugo-theme-yinyang
- Owner: joway
- License: mit
- Created: 2018-11-08T15:41:32.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2025-03-31T10:02:59.000Z (about 1 year ago)
- Last Synced: 2025-04-10T00:15:51.391Z (about 1 year ago)
- Language: HTML
- Homepage: https://blog.joway.io
- Size: 868 KB
- Stars: 503
- Watchers: 8
- Forks: 158
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# YinYang
[YinYang](https://en.wikipedia.org/wiki/Yin_and_yang) is a black-white theme for [Hugo](https://gohugo.io/).
[**Demo**](https://blog.joway.io)
## Feature
- minimalist
- multi-language support
- [disqus](https://disqus.com) support
- [SEO Optimization](https://github.com/joway/hugo-theme-yinyang/blob/master/layouts/partials/seo.html)
## Screenshot

## Installation
From the root of your site:
```shell
git clone git@github.com:joway/hugo-theme-yinyang.git themes/yinyang
```
Change `config.toml`:
```toml
theme = "yinyang"
```
## Configuration
### Head Title
```
[params]
headTitle = "Joway Wang"
```
If there is no `headTitle` in params, use `.Site.Author.name`.
### Main section
Set your main section:
```
[params]
mainSections = ["posts"]
```
### Multi-Language
```
[languages]
[languages.en]
contentDir = "content/en"
languageName = "English"
weight = 1
[languages.cn]
contentDir = "content/cn"
languageName = "Chinese"
weight = 2
```
Then your posts files should be put into `content/en` or `content/cn`.
### Footer
```
[[params.socials]]
name = "About Me"
link = "https://joway.io"
[[params.socials]]
name = "Github"
link = "https://github.com/joway"
```
### Extra Head
```
[params]
extraHead = ''
```
### Extra CSS files
```
[params]
extraCSSFiles = ["css/foo.css", "css/bar.css"]
```
### Twitter Cards
Add the following setting:
```
[params]
twitterCards = true
```
In a post's front matter, include a keyword `images` with a value of a list of
URLs of images that will be used for Twitter Cards.
### Insert content on every post
```
[params]
postHeaderContent = ""
postFooterContent = "
Subscribe:Joway's Blog
"
```
### Example
```
baseURL = "https://blog.joway.io/"
languageCode = "en-us"
title = "Joway's Blog"
theme = "yinyang"
DefaultContentLanguage = "cn"
[markup]
[markup.goldmark]
[markup.goldmark.renderer]
unsafe = true
[markup.highlight]
guessSyntax = true
noClasses = true
style = "bw"
tabWidth = 2
[author]
name = "Joway"
homepage = "https://joway.io/"
[languages]
[languages.en]
contentDir = "content/en"
languageName = "English"
weight = 1
[languages.cn]
contentDir = "content/cn"
languageName = "Chinese"
weight = 2
[params]
mainSections = ["posts"]
headTitle = "Joway Wang"
disqus = "joway" # disqus account name
extraHead = ''
[[params.socials]]
name = "About Me"
link = "https://joway.io"
[[params.socials]]
name = "Github"
link = "https://github.com/joway"
postHeaderContent = ""
postFooterContent = "
Subscribe to:Joway's Blog
"
# extraCSSFiles = ["css/foo.css", "css/bar.css"]
extraCSSFiles = []
```