Hugo theme for nyaa.ee webbed site :3
  • HTML 77.4%
  • CSS 22.6%
Find a file
2026-02-26 16:20:09 +02:00
archetypes Modify the default.md archetype to contain a table of contents boolean toggle 2026-02-25 23:20:00 +02:00
assets/css Fix terms styling in terms.html 2026-02-26 16:20:09 +02:00
content Add sample pages 2026-02-18 19:20:12 +02:00
layouts Fix terms styling in terms.html 2026-02-26 16:20:09 +02:00
static Work on the CSS and fonts 2026-02-17 22:05:09 +02:00
.gitignore Add .gitignore 2026-02-18 13:15:51 +02:00
hugo.toml Add outputs values to hugo.toml to prevent rss generation of other pages than home 2026-02-19 19:25:35 +02:00
LICENSE Add entrypoint files 2026-02-17 19:18:42 +02:00
README.md Update README.md so that it would briefly explain center shortcode 2026-02-19 19:31:16 +02:00
theme.toml Update metadata in theme.toml 2026-02-17 22:05:37 +02:00

Nyaa.ee website theme

This repository contains a hugo theme for nyaa.ee web site. The theme in question is mostly meant to be used for more hackerish looking blogs with funky fonts.

Installation

In order to install the theme, add the repository as a git submodule to your hugo website's themes directory.

$ git submodule add https://git.doma.nyaa.ee/karmen/nyaa-theme themes/nyaa

After installing it, modify your page's hugo.toml file to contain the following:

title = "My awesome website"
theme = "nyaa"
summaryLength = 30

[params]
    author = "John Smith"
    description = "My awesome website"

# Allow RSS generation only for the home site
[outputs]
  home = ["html", "rss"]
  section = ["html"]
  taxonomy = ["html"]
  term = ["html"]

# Disable default `categories` taxonomy since this template doesn't work with it
[taxonomies]
    tag = "tags"

[markup.goldmark.renderer]
    unsafe = true

Parameter values params.author and params.description are mainly used in meta tags to describe the website. Generally og:description value is taken from an article summary, but in-case the content is a section, then this specific description value is used.

Customizing the website

This theme provides a website with 5 main sections:

  • Home section or / - this section contains the website intro along with a short list (up to 5) most recent articles.
  • Articles section or /articles - this section contains all your blog articles, each article gets put to /articles/<article-name>.
  • Donation or /donate section gives a brief overview of ways that people could support you.
  • Projects section or /projects gives you a page for describing all your awesome projects. If a separate article on a specific project is required then they shall be written to /projects/<my-awesome-project>
  • Socials section or /socials simply contains some information about your socials.

Shortcodes

By default, 2 shortcodes exist for the convenience of writing content: image and center shortcodes.

image shortcode allows you to align a clickable image thumbnail to your content so that, when clicking on it, the fullres image shows up. Let's assume that you have an image called sample.webp and you would like to add it to your content page.

{{< image
        src=sample.webp
        width=400
        alt="Sample Picture"
        caption="This is an example"
        align=center
        authorName="@me"
        authorLink="/"
>}}

Shortcode properties caption, authorName and authorLink are optional and can be omitted if caption/author data is not needed. Property align supports 3 different values: left, center and right.

center shortcode allows you to horizontally center any arbitrary data. The content can be markdown or HTML.

{{% center %}}
<a href='javascript:alert("Good girl :3")'>Click me!!!</a>
{{% /center %}}