Skip to content

Latest commit

 

History

History
112 lines (80 loc) · 5.12 KB

README.md

File metadata and controls

112 lines (80 loc) · 5.12 KB

Tapestry

Tapestry is a researcher profile website theme for the Zola static site generator.

Inspired by and derived from the terminus theme, specifically its aa8d8b67f9ab69ae48e1405f96e152d41f03e0ed commit, Tapestry carries over a number of features from the terminus theme. However, Tapestry is not backward-compatible with terminus: it is built for Zola 0.23.6 or newer, which bundles the Tera v2 templating engine, whereas the terminus snapshot it derives from targets Tera v1. The key differences include the following.

  • Five presentation style groups — scholarly, creative, natural, precision, and collective — each with a number of variants (e.g., creative's editorial-zine) replace the extra.color_scheme setting of the terminus theme.
  • Each presentation style and its variants are available in both light and dark modes.
  • Additional shortcodes, such as for showing the colour palette.
  • Macros are no longer supported. Tera v2 removes macros and {% import %}; reusable template logic is written as components that receive page, section, config, lang and taxonomy explicitly. Terminus templates, template overrides and macro imports will not work with Tapestry and must be rewritten as components.
  • Shortcodes use new invocation syntax. Tera v2 removes the shortcode subsystem; Tapestry's shortcodes are components, invoked as {% <name attr="x"> %}...{% </name> %} blocks or {{ <name attr="x" /> }} inline, not terminus's {% name(args) %} / {{ name(args) }}. Content written for terminus must be updated accordingly.
  • Terminus-only settings, such as extra.color_scheme and extra.color_scheme_switcher, are ignored.

Try the demo at the following links.

Tapestry screenshot

Features

  • Five presentation style groups — scholarly, creative, natural, precision, and collective — each offering multiple fully-specified variants (distinct typefaces, colour palettes, and layout treatments), all with matching light and dark modes.
  • WCAG 2.1 Level AA accessibility across every shipped template and style/variant combination — colour contrast, keyboard navigation, semantic landmarks, visible focus states.
  • Practically no JavaScript: only a light/dark theme switcher, optional client-side KaTeX math rendering, and an optional presentation style/variant switcher — nothing else, no analytics, no third-party embeds.
  • Self-hosted fonts — no runtime calls to Google Fonts or any other font CDN.
  • A 12-column responsive grid, GitHub-style Markdown alerts, and a set of extra shortcodes (e.g. a colour palette preview), with a number of features carried over from terminus.

Requirements

  • Zola 0.23.6 or newer (the theme's own theme.toml sets min_version = "0.23.6"). Earlier versions use Tera v1 and cannot build this theme.

Usage

  1. Initialise a Git repository in your Zola project directory, if you have not done it.

    git init
  2. Add this theme as a Git submodule.

    git submodule add https://github.com/anirbanbasu/tapestry.git themes/tapestry
  3. Enable this theme in your config.toml:

    theme = "tapestry"
  4. Set a website title of your liking in your config.toml:

    title = "My research profile"
  5. Create a text file named content/_index.md. This file controls how your home page looks. Choose exactly one of the following options:

    1. Serve yours posts from /:

      +++
      title = "Home"
      paginate_by = 5  # Show 5 posts per page.
      +++
    2. Serve posts from a different path, e.g. posts/:

      +++
      title = "Home"
      
      [extra]
      section_path = "posts/_index.md"  # Where to find your posts.
      max_posts = 5  # Show 5 posts and a link to posts section on home page.
      +++

Configuration

Beyond the homepage setup above, Tapestry reads a range of extra.* keys at the site, section, and page level — presentation style/variant selection, KaTeX, social/navigation links, image handling, content security policy, and more. Rather than duplicate that reference here, consult the live, always-up-to-date documentation on either demo site:

Contributing

Contributions to this theme are very welcome! However, if you want to contribute to the theme, please do so at the theme-tapestry-dev repository. Meanwhile, this repository exists only to serve the purpose of a Git submodule installable theme for your Zola project.

License

This project is licensed under the terms of the MIT license.