This repository has been archived on 2024-09-02. You can view files and clone it, but cannot push or open issues or pull requests.
hugo-theme-nocolor/README.adoc

84 lines
3.4 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

= nocolor
:project: hugo-theme-nocolor
:uri-base: https://schlomp.space/tastytea/{project}
:uri-archive: {uri-base}/archive/main.tar.gz
:uri-hugo: https://gohugo.io/
:uri-slick: https://github.com/spookey/slick
:uri-slick-example: {uri-slick}/blob/master/_sites/example/config.toml
: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
:uri-hugo-doc-toc: https://gohugo.io/content-management/toc
:uri-pygments: https://pygments.org/
*nocolor* is a link:{uri-hugo}[Hugo] theme with no predefined colors and minimal
styling. It is based on link:{uri-slick}[Slick].
== Features
* 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.
* Ability to inject own CSS file.
== Installation
[source,shell]
--------------------------------------------------------------------------------
git submodule add --branch main https://schlomp.space/tastytea/hugo-theme-nocolor.git themes/nocolor
echo 'theme = "nocolor"' >> config.toml
--------------------------------------------------------------------------------
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
Please take a look at the link:{uri-slick-example}[configuration example for
Slick]. It is valid for nocolor too.
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
`extra_foot.html`. The common way to do it is to create
`layouts/partials/extra_head.html` or `layouts/partials/extra_foot.html`,
respectively.
=== 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.
== 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.
include::{uri-base}/raw/branch/main/CONTRIBUTING.adoc[]