Introducing Poison

- 3 mins read

Series: How to use poison

Poison is a clean, professional Hugo theme designed to captivate your readers.

It’s also tiny and privacy conscious. No JavaScript frameworks, icon packs, or Google fonts. No ads or trackers polluting your console window. We kept things simple. A little vanilla JavaScript, a dash of CSS, and the power of Hugo.

All the static assets for the site (JS files, CSS, and fonts) are located within the theme’s /assets/ directory. That way you know exactly what’s going onto your site.

Check out our demo site’s analytics here to gauge community interest in the theme.

Features

In addition to the standard Built-in templates and shortcodes that come with Hugo, Poison offers some unique features of its own.

Light & dark mode

Give readers the choice to read in light or dark mode. The user’s preference is remembered and saved in local storage. Light mode is the default for first time visitors, but you can change this in your config file.

Table of contents

Provide a floating table of contents for readers with large enough screens (i.e. screen-width > 1600 pixels).

If you prefer not to display a table of contents, you can disable them site-wide in your config.toml file.

[params]
    hideToc: true

Alternatively, you can choose to disable the table of contents on a per-post basis by putting the flag in the frontmatter of an individual post.

---
title: "Example to demonstrate how to hide the table of contents on a single post"
date: 2023-07-10
draft: false
hideToc: true
tags: ["Hugo"]
---

Comments

Facilitate discourse by allowing users to comment on your posts. Poison currently supports two different commenting engines for this purpose – Disqus and Remark42.

Note: Enabling comments will add external dependencies.

Disqus is free and easy to use. Checkout the Hugo docs to get started. Once you’ve created a Disqus account, you can activate it in the Poison theme by adding a single line to your config.toml file.

disqusShortname = 'yourDisqusShortname'

This is a great option for people that don’t want to bother with self-hosting their own commenting engine; however, it has some drawbacks. Because Disqus provides this service for free, they recoup any financial loss by injecting third-party ad trackers onto your website. These trackers help to collect and sell information about your users, while also negatively affecting your site’s speed.

Even still, Disqus may be the best solution depending on your situation (we use it on this demo site). The above paragraph is only meant to highlight its trade-offs and not meant to discourage its use entirely.

Remark42 is a lightweight, open source commenting engine that doesn’t spy on your users. The downside is that you must host it yourself. Checkout the Remark42 documentation to get started. I also found this blog post helpful when setting it up on my site.

Once everything is set up, you can activate it in the Poison theme by including the following in the [params] section of your config.toml file.

Suggestions / Contributions

Please feel free to add suggestions for new features by opening a new issue in GitHub. If you like the theme, let us know in the comments below!

A big shout out and thank you to these top contributors: