Go to file
Robert Lützner 80cd7cf8f1
feat: add 'aside' as a shortcode (#6)
The README has been updated to show a code example of both, including an
exemplary screenshot.

Since Hugo 0.55, we have to use `markdownify` in shortcodes that contain
HTML elements. At least we have to, if we want to render markdown code
inside the HTML element.

To use the `<aside>` element, we have to wrap our content in an
`<article>` tag.

This fixes #4.

Co-authored-by: Robert Lützner <robert.luetzner@iternity.com>
2023-02-23 14:04:33 -06:00
archetypes old work pushed 2023-01-30 13:14:33 -06:00
docs feat: add 'aside' as a shortcode (#6) 2023-02-23 14:04:33 -06:00
layouts feat: add 'aside' as a shortcode (#6) 2023-02-23 14:04:33 -06:00
static/css feat: update to v1.0.1 2023-02-16 13:51:44 -06:00
LICENSE old work pushed 2023-01-30 13:14:33 -06:00
README.md feat: add 'aside' as a shortcode (#6) 2023-02-23 14:04:33 -06:00
theme.toml old work pushed 2023-01-30 13:14:33 -06:00

README.md

hugo-theme-readable

Readable is a theme for the static-site generator Hugo using the readable.css framework built by Freedom to Write.

Shoutout to Benjamin Hollon for his amazing work building this CSS framework and making it so simple to use.

Want to check out a demo? (coming soon)

demo image

Installation

To add this theme to an existing Hugo site, start by adding this repo as a submodule in the site's themes folder.

git submodule add https://github.com/cjtheham/hugo-theme-readable themes/readable

Then, update your config file to be using the new theme. For example, if you are using config.toml, the line should become:

theme = 'readable'

If you don't have an existing site, feel free to use the provided starter template to quickly get your website online.

For more information on starting a Hugo website and using custom themes, refer to the Hugo documentation.

Usage

Freedom to Write has provided some awesome guides on writing HTML that works automatically with the formatting of Readable. For a complete HTML page guide on writing custom pages, see Overall Structure. For some neat tips that may make life easier working with this style sheet, read Quick Tips.

Shortcodes

aside

readable.css prefers the <aside> HTML element over blockquotes. This theme supports both.

> This is a blockquote.
>
> This is a default **markdown** element and supports formatting inside it.

{{< aside >}}
This is an aside element.

You can use **markdown** formatting inside it.
{{</ aside >}}

The above code generates the following output:

Comparing a blockquote to an aside. The blockquote has a thin bar on it's left, while the aside element is inside a nice box with rounded corners.

Notes

  • Benjamin loves when new sites and projects pop up using the readable.css framework!