hugo-theme-nocolor/README.adoc

91 lines
3.6 KiB
Plaintext
Raw Normal View History

2019-11-20 19:56:22 +01:00
= nocolor
2019-11-20 23:45:46 +01:00
:project: hugo-theme-nocolor
:uri-base: https://schlomp.space/tastytea/{project}
2020-12-28 18:52:51 +01:00
:uri-archive: {uri-base}/archive/main.tar.gz
2019-11-20 23:40:52 +01:00
:uri-hugo: https://gohugo.io/
2019-11-20 23:22:09 +01:00
:uri-slick: https://github.com/spookey/slick
:uri-slick-example: {uri-slick}/blob/master/_sites/example/config.toml
2019-11-20 23:40:52 +01:00
:uri-opengraph: http://ogp.me/
:uri-schema: https://schema.org/
:uri-twittercards: https://developer.twitter.com/en/docs/tweets/optimize-with-cards/overview/abouts-cards.html
2020-12-27 20:08:16 +01:00
:uri-hugo-doc-toc: https://gohugo.io/content-management/toc
:uri-pygments: https://pygments.org/
2019-11-20 19:56:22 +01:00
2019-11-20 23:40:52 +01:00
*nocolor* is a link:{uri-hugo}[Hugo] theme with no predefined colors and minimal
styling. It is based on link:{uri-slick}[Slick].
== Features
2019-11-20 19:56:22 +01:00
2019-11-20 23:40:52 +01:00
* Supports taxonomies of tags, categories and series with their own pages.
* RSS Feed with complete entries.
* link:{uri-opengraph}[Open Graph], link:{uri-schema}[Schema.org] and
link:{uri-twittercards}[Twitter Cards] support.
* Fully customizable menu entries.
* No JavaScript, no bundled fonts, no external requests.
2020-12-28 18:52:51 +01:00
* Ability to inject own CSS file.
2019-11-20 19:56:22 +01:00
== Installation
[source,shell]
2020-12-25 18:34:06 +01:00
--------------------------------------------------------------------------------
2020-12-28 18:52:51 +01:00
git submodule add --branch main https://schlomp.space/tastytea/hugo-theme-nocolor.git themes/nocolor
2020-12-25 18:34:06 +01:00
echo 'theme = "nocolor"' >> config.toml
--------------------------------------------------------------------------------
2019-11-20 23:22:09 +01:00
2020-12-28 18:52:51 +01:00
Update with `git submodule update --remote`. If you don't keep your blog in a
git repository, install it with `git clone
https://schlomp.space/tastytea/hugo-theme-nocolor.git themes/nocolor` or unpack
the link:{uri-archive}[archive] into `themes/nocolor`.
== Configuration & Modification
2019-11-20 23:22:09 +01:00
2019-11-20 23:40:52 +01:00
Please take a look at the link:{uri-slick-example}[configuration example for
2020-12-29 15:28:33 +01:00
Slick]. It is valid for nocolor too, with these exceptions:
* `favicon` and `css` have to be in in the assets folder.
2019-11-20 23:40:52 +01:00
2019-11-20 23:22:09 +01:00
You can add things to the end of the `<head>` section by overwriting the partial
template `extra_head.html` or above the footer by overwriting
2019-11-24 18:40:56 +01:00
`extra_foot.html`. The common way to do it is to create
`layouts/partials/extra_head.html` or `layouts/partials/extra_foot.html`,
respectively.
2019-11-20 23:40:52 +01:00
=== Syntax highlighting with Asciidoctor
If you want source code highlighting with AsciiDoc, you'll need pygmentize from
the package link:{uri-pygments}[pygments]. Set this in your config file:
.`config.toml`
[source,toml]
--------------------------------------------------------------------------------
pygmentsCodefences = true
pygmentsCodeFencesGuessSyntax = false
pygmentsUseClasses = true
--------------------------------------------------------------------------------
Run `pygmentize -L styles` for a list of available styles and generate a CSS
file:
[source,shell]
--------------------------------------------------------------------------------
pygmentize -f html -S <style> -a .highlight \
| grep -v '^[^\.]' | sed -E 's/ \.(\w+) \{/ \.tok-\1 {/' > static/syntax.css
--------------------------------------------------------------------------------
And add `:source-highlighter: pygments` at the top of your posts, below the
front matter. Make sure to include the generated CSS file.
2019-11-20 23:45:46 +01:00
2020-12-27 22:19:01 +01:00
== Good to know
Table of contents are only written when the word count exceeds 400 and the `toc`
field in your contents front matter is set to true. See
link:{uri-hugo-doc-toc}[the Hugo documentation] for details. You can overwrite
the template by adding the file `layouts/partials/toc.html` to your blog.
2020-12-29 16:04:06 +01:00
== Screenshots
link:{uri-base}/raw/branch/main/images/screenshot.png[
image:{uri-base}/raw/branch/main/images/tn.png[Screenshot]]
2019-11-20 23:45:46 +01:00
include::{uri-base}/raw/branch/main/CONTRIBUTING.adoc[]