joway/hugo-theme-yinyang
À propos
Thème noir et blanc pour Hugo.
Autres projetsProgression mesurée des étoiles
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- Historique en cours
Variations nettes sur des périodes qui se chevauchent, pas des totaux quotidiens. Les mesures absentes restent vides. Les étoiles indiquent l’intérêt, pas la qualité.
README.md
OriginalYinYang
YinYang is a black-white theme for Hugo.
Requirements: Hugo extended >= 0.158 (older versions fail on
.Language.Label/.Site.Language.Locale). Images underassets/images/are converted to WebP withsrcset; images understatic/are served unchanged.lazyImageandstaticPrefixare no longer needed (nativeloading="lazy"is used) and are ignored. Setparams.extraHeadProductionOnly = trueto skipextraHeadduringhugo server.
Feature
- minimalist
- multi-language support
- disqus support
- SEO Optimization
Screenshot

Installation
From the root of your site:
git submodule add https://github.com/joway/hugo-theme-yinyang.git themes/yinyang
Change config.toml:
theme = "yinyang"
Configuration
Head Title
[params]
headTitle = "Joway Wang"
If there is no headTitle in params, use .Site.Params.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 = '<script src="xxxx.js"></script>'
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 = "<br/><br/><p>Subscribe:<a target='_blank' href='https://mailchi.mp/a1a0d59e7a19/joway'>Joway's Blog</a></p>"
Example
# ---------- Site ----------
baseURL = "https://blog.joway.io/"
languageCode = "en-us"
theme = "yinyang"
title = "Random Thoughts"
DefaultContentLanguage = "cn"
canonifyURLs = false
enableRobotsTXT = true
# ---------- Content Language ----------
[languages]
# [languages.en]
# contentDir = "content/en"
# languageName = "English"
# weight = 1
[languages.cn]
contentDir = "content/cn"
languageName = "简体中文"
weight = 2
# ---------- URL ----------
[permalinks]
post = "/blog/:title/"
# ---------- Markdown / Highlight ----------
[markup]
[markup.goldmark]
[markup.goldmark.renderer]
unsafe = true
[markup.highlight]
guessSyntax = true
noClasses = false
style = "tango"
tabWidth = 2
# ---------- Theme Params ----------
[params]
description = "Log something useless, but interesting."
disqus = "joway" # disqus account name
extraHead = ''
favicon = "/logo.png"
headTitle = "Random Thoughts"
mainSections = ["posts"]
postFooterContent = '<br/><br/><p>Subscribe:<a target="_blank" href="https://mailchi.mp/a1a0d59e7a19/joway"><b>Mailchimp</b></a></p><br/><a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://blog.joway.io/images/cc.png" /></a>'
postHeaderContent = ""
staticPrefix = "https://cdn.jsdelivr.net/gh/joway/blog"
# extraBody = '<script>(adsbygoogle = window.adsbygoogle || []).push({});</script>'
# postAds = '<ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-6400651395935595" data-ad-slot="5705651853" data-ad-format="auto" data-full-width-responsive="true"></ins>'
lazyImage = true
# ---------- Analytics ----------
[services]
[services.googleAnalytics]
id = "" # e.g. G-XXXXXXXXXX
# ---------- Author ----------
[params.author]
homepage = "https://joway.io/"
name = "Joway"
# ---------- Social Links ----------
# [[params.socials]]
# name = "Telegram"
# link = "https://t.me/biosthinking"
# [[params.socials]]
# name = "RSS"
# link = "/index.xml"
# [[params.socials]]
# name = "Slides"
# link = "/presentations"
[[params.socials]]
link = "https://mailchi.mp/a1a0d59e7a19/joway"
name = "Subscribe"
[[params.socials]]
link = "/travel"
name = "Travel"
[[params.socials]]
link = "https://joway.io"
name = "About"
# ---------- Optional: Related Posts ----------
# [related]
# includeNewer = true
# threshold = 80
# toLower = false
# [[related.indices]]
# name = "date"
# weight = 100
# [[related.indices]]
# name = "keywords"
# weight = 100
Explorer des projets similaires
Chargement…