zola/docs/content/themes/lightspeed/index.md
Vincent Prouillet fce3e4b8a0
Update themes gallery (#1255)
Co-authored-by: GitHub Action <action@github.com>
2020-12-08 19:25:33 +01:00

3 KiB

+++ title = "lightspeed" description = "Zola theme with a perfect Lighthouse score" template = "theme.html" date = 2020-12-08T16:58:54+01:00

[extra] created = 2020-12-08T16:58:54+01:00 updated = 2020-12-08T16:58:54+01:00 repository = "https://github.com/carpetscheme/lightspeed" homepage = "https://github.com/carpetscheme/lightspeed" minimum_version = "0.10.0" license = "MIT" demo = "https://quirky-perlman-34d0da.netlify.com/"

[extra.author] name = "El Carpet" homepage = "https://github.com/carpetscheme" +++

Light Speed

An insanely fast and performance-based Zola theme, ported from Light Speed Jekyll.

Some fun facts about the theme:

  • Perfect score on Google's Lighthouse audit
  • Only ~600 bytes of CSS
  • No JavaScript

Demo: quirky-perlman-34d0da.netlify.com


Contents

Installation

First download this theme to your themes directory:

$ cd themes
$ git clone https://github.com/carpetscheme/lightspeed.git

and then enable it in your config.toml:

theme = "lightspeed"

Posts should be placed directly in the content folder.

To sort the post index by date, enable sort in your index section content/_index.md:

sort_by = "date"

Options

Title

Set a title and description in the config to appear in the site header:

title = "Different strokes"
description = "for different folks"

Sass

Styles are compiled from sass and imported inline to the header

You can overide the styles by enabling sass compilation in the config:

compile_sass = true

...and placing a replacement style.scss file in your sass folder.

Set a field in extra with a key of footer_links:

[extra]

footer_links = [
    {url = "$BASE_URL/about", name = "About"},
    {url = "$BASE_URL/rss.xml", name = "RSS"},
    {url = "https://google.com", name = "Google"},
]

If you put $BASE_URL in a url, it will automatically be replaced by the actual site URL.

Create pages such as $BASE_URL/about by placing them in a subfolder of the content directory, and specifying the path in the frontmatter:

path = "about"

Author

To add author name to the head meta-data, set an author field in extra:

[extra]

author = "Grant Green"

Netlify

Deployed on netlify? Add a link in the footer by setting netlify in extra as true.

[extra]

netlify = true

Original

This template is based on the Jekyll template Light Speed Jekyll by Bradley Taunt:

License

Open sourced under the MIT license.

This project is open source except for example articles found in content.