Git Product home page Git Product logo

risotto's Introduction

🍚 risotto

risotto is a minimalist, responsive hugo theme inspired by terminal ricing aesthetics.

Hugo Themes Version hugo build status W3C Validation Code size

Screenshot of the risotto theme

Features

  • Plain, semantic HTML with no Javascript
  • Plain CSS – no frameworks, no preprocessors, just simple and easy-to-customise stylesheets
  • Uses CSS Grid for native responsive behaviour without arbitrary breakpoints
  • Comes with 16 built-in colour schemes based on popular terminal themes plus the ability to use custom themes using the base16 system

Install

The easiest way to install the theme is to download the latest release and extract it to your project's themes/ directory. You can also clone this repository into your site's themes directory and checkout the latest release:

git clone https://github.com/joeroe/risotto themes/risotto && cd themes/risotto
git checkout $(git tag -l | grep '^v[0-9.]*$' | sort -V | tail -n 1)

Note that this will not work if your site is itself a git repository. In that case, you can add the theme as a git submodule, but this is not recommended due to the difficulty of tracking a specific release.

Update

If you installed the theme using git clone, pull the repository to get the latest version:

cd themes/risotto
git pull

Otherwise, simply download the latest release and extract it to your project's themes/ directory, replacing the old version.

Configure

To use the theme, add theme = 'risotto' to your site's hugo.toml, or theme: risotto to your hugo.yaml.

See exampleSite/config.toml for the theme-specific parameters you need to add to your site's hugo.toml or hugo.yaml to configure the theme.

Colour schemes

risotto uses the base16 framework to define colour schemes that can be used with the theme.palette parameter. A selection of 16 palettes (10 dark, 6 light) are bundled with the theme: apprentice, base16-dark, base16-light, dracula, gruvbox-dark, gruvbox-light, material, papercolor-dark, papercolor-light, solarized-dark, solarized-light, tender, tokyo-night-dark, tokyo-night-light, windows-95 and windows-95-light. The default is base16-dark.

The easiest way to use other base16 styles is to place .css file from https://github.com/monicfenga/base16-styles/tree/master/css-variables and place it in your static/css/palettes directory.

Or to define a wholly custom theme, you will need to define the following CSS variables for the following base16 colours (see base16-dark.css for an example):

Base Default colour Used for Examples
00 Dark Background Page background
01 Alt. background Content background
02 In-text backgrounds <pre>, <code>, <kbd>, <samp>
03 Muted text :before & :marker symbols
04 Alt. foreground Aside text
05 Foreground Content text
06
07 Light
08 Red
09 Orange
0A Yellow Highlights Selected text, <mark>
0B Green Primary accent Logo
0C Cyan Active links a:active, a:hover
0D Blue Links a:link, a:visited
0E Magenta
0F Brown

For light mode palettes, the sequence of 00–07 should be reversed (light to dark, not dark to light). Note that not all colours are currently used in the theme.

You you use these colours directly in content using the convenience classes .baseXX and .bg-baseXX. For example:

<span class="base0A">Yellow text</span>
<mark class="bg-base0D">Text highlighted in green</mark>

Favicon

risotto will automatically use favicons placed in the static/ directory. The following files will be detected and included in your site's <head> section:

  • favicon.ico
  • favicon-16x16.png
  • favicon-32x32.png
  • apple-touch-icon.png
  • site.webmanifest

You can generate these from an image or emoji using favicon.io or a similar service. They must be placed directly under your site's static/ directory, i.e. not in in a subdirectory or themes/risotto/static/.

Acknowledgements

The 'cooked rice' emoji used as a favicon for the example site was created by the Twemoji project and is licensed under CC-BY 4.0.

risotto's People

Contributors

artulab avatar bedefaced avatar dasvh avatar frankenstein91 avatar garlic0x1 avatar jamesturk avatar joeroe avatar justinhhorner avatar m-dev672 avatar mntn-xyz avatar pflakus avatar rio-codes avatar vinfall avatar vwheezy avatar wilsonjholmes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

risotto's Issues

Adding a favicon?

Hello, new to Hugo and Risotto but wanted to ask about my one gripe so far.

I've tried putting the file as favicon.ico in both the home directory's static/ folder and theme/risotto/static/ but to no avail. I also created a new section under [params] with the following contents:

[params.meta]
favicon = true
svg = false

This also didn't work out.

Any help would be appreciated.

How to change palette in [params.theme] in config.toml

Hello,

I was wondering if it was possible to change the palette? In your example site you have

[params.theme]
palette = "gruvbox-dark"

which I found in static/css/colour. I see a lot of different colors listed in that file, but I'm not sure where to put the values. Where do I change which colors are used? Are there other palettes available?

Thank you!

Search bar

Would be nice if there is a way to implement a search bar into this.

fonts do not follow as specified in typography.css

static/css/typography.css is supposed to control the fonts of the website.
It appears that "Fira Mono" specifies the font family, and monospace specifies the font style.
Somehow, modifying "Fira Mono" does not make any changes, while changing monospace does (it also changes fonts).

_index.md / index.md pages won't show TOC or Description

With a page like /projects/some-project.md, setting toc: true adds a great Table of Contents in the sidebar. I love this.

But when I have a page like /projects/some-project/_index.md, the TOC does not render, even when set to true.

Edit to add: Page descriptions do not render in index pages either.

Why would this be?

Long lines in code blocks with line numbers overflow container

Hugo version

I can reproduce this on latest Hugo v0.105.0. I install the extended version and it comes from Void Linux package, you can get the src template here.

Update: still reproducible on v0.117.0.

Description

When lineNOS is set in site config, writing a long line in code block will result in unwrapped text.

Markup config that caused this:

[markup]
defaultMarkdownHandler = 'goldmark'
[markup.highlight]
  codeFences = true
  guessSyntax = true
  style = 'monokai'
  lineNos = true
  lineNumbersInTable = true

Steps to reproduce

hugo new site test
cd test/
git clone https://github.com/joeroe/risotto themes/risotto

mkdir -p content/post/
cp themes/risotto/exampleSite/content/post/markdown-syntax.md content/post/
cp themes/risotto/exampleSite/config.toml ./
cp -r themes/risotto/layouts/* layouts/

sed -i 's/Test/Redit teque digerit hominumque toris verebor lumina non cervice subde tollit usus habet Arctonque, furores quas nec ferunt. Quoque montibus nunc caluere tempus inhospita parcite confusaque translucet patri vestro qui optatis lumine cognoscere flos nubis! Fronde ipsamque patulos Dryopen deorum./g' content/post/markdown-syntax.md
# copy my config above to config.toml

hugo server

Then go to http://localhost:1313/post/markdown-syntax/ and you'll find this:
firefox_0qPaIbFgMZ cleaned

What I Expect

It gets wrapped, just like what Code block indented with four spaces shows.

Edit: add Hugo version and more info.

how to add new pages/content

I'm new to hugo in general so I don't really have much idea about how to edit the theme to add new content. I tried creating a new markdown file in content folder after installing the theme and setting it up in hugo.toml, but the new markdown file content doesn't show up on the website server running locally. Can someone point me to proper documentation?

I'm running the server using hugo server -D

Highlight active heading in table of contents

Do you have any plans to add colour highlighting of the active heading in table of contents?
It would be great to have this feature and dynamically update when scrolling.
I attached an image how it may look (but it is just an example).

PS: great theme, love the minimalistic design
Снимок экрана от 2024-03-27 20-09-45

Implement live colour palette previews

They're just CSS files, so should be possible to switch them without rebuilding the site. Maybe just on the example site, to avoid any JS dependencies.

Add page descriptions to meta description tag

Although a bit off-topic, I think you should also add page description to single page template instead of a site level description?

{{ with .Site.Params.about }}<meta name="description" content="{{ .description }}">{{ end }}

Maybe something like this, I'm not sure whether the page description would just override the site one.

<!-- Site level -->
{{ with .Site.Params.about }}<meta name="description" content="{{ .description }}">{{ end }}
<!-- Page level -->
<meta name="description" content="{{ .Params.description }}">

Originally posted by @Vinfall in #55 (comment)

Trying to apply multi languages getting strange behaviour

So, I was trying to setup a simple blog using Hugo + Risotto with multi language english + portuguese, but then I notice that was already a template on risotto for that and it was a weird text on the available languages iteration.

The strange code is this one is on line 13~26 in partials/lang.html:

    {{ range .Page.AllTranslations }}
      {{ $translation := .}}
      {{ range $siteLanguages }}
          {{ if eq $translation.Lang .Lang }}
            {{ $selected := false }}
            {{ if eq $pageLang .Lang }}
                <br/><span class="active">$ echo $LANG<br/><b>{{ .LanguageName }}</b></span><br/>

            {{ else }}
                <br/><a href="{{ $translation.Permalink }}">export LANG={{ .LanguageName }}; ./{{ $pageName }}</a><br/>
            {{ end }}
          {{ end }}
      {{ end }}
    {{ end }}

I'm super newbie on this kind of stuff and IDK if '$ echo $LANG' is here to do something special but in my case just show as is:

image

How do i remove the date of the posts?

It's not really a issue but i would like to know how i can do that, because i don't want the "year/month/day" thing on the footer of my posts

i've looked on the files but i can't find where this configuration is located.

Edit: I solved it.

Better multilingual support

Multilingual support was added with a language switcher in #25, but the implementation has issues (#44, #70, #71), is undocumented, and I think the presentation leans a bit too hard into the terminal analogy.

UL and OL sit on a half-line

Margin should be changed to match paragraphs, so lists will sit "on the line" as if they are displayed in a terminal.

Below was a lazy hack, I am going to look at redoing it and I want to test some edge cases:

/* Set ul/ol margins to be same as p */
.page__body ul, .page__body ol, .page__aside ul, .page__aside ol {
    margin: 0 0 1.5rem 0;
}
/* Remove bottom margin on sub-lists */
.page__body li ul, .page__body li ol, .page__aside li ul, .page__aside li ol {
    margin-bottom: 0;
}

H1 closing tag

Hi,
in the file layouts/_default/list.html the line 2 is:

<h1 id="{{ .Title | urlize }}">{{ .Title | markdownify }}</h2>

but it should be:

<h1 id="{{ .Title | urlize }}">{{ .Title | markdownify }}</h1>

Setting socialLinks title to "RSS" makes it disappear

This shows just fine on the my sidebar on the right

[[params.socialLinks]]
icon = "fa-solid fa-rss"
title = "rss"
url = "/rss"

however capitalizing the title makes it disappear

[[params.socialLinks]]
icon = "fa-solid fa-rss"
title = "RSS"
url = "/rss"

I've even tried other all caps 3 letter combos like "ABC". What's going on here?
Thanks for the theme btw. Very thorough

Pages in nested content directories missing from taxonomy list

I have a couple of regular (non _index.md) pages tagged as foo.

On navigating to localhost:1313/tags/ I can see foo listed.

When I click on it, I don't see any of the pages which have been tagged as foo, all I can see is the title # Foo at the top.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.