Skip to content

kite 0.1.3

Choose a tag to compare

@github-actions github-actions released this 30 Sep 17:19
· 81 commits to main since this release

A release for building out a site: shortcodes drawn by templates, pictures a theme can resize and write as WebP, kinds of content of a site's own, and themes that say their words in the site's language. Photos added in the studio no longer publish where they were taken.

Highlights

  • Shortcodes. {{< figure src="river.jpg" >}}, or a pair such as {{< note >}} and {{< /note >}}, calls layouts/_shortcodes/<name>.html in the site or its theme. The syntax is Hugo's, so content moved from a Hugo site keeps working once the templates are there. A template reads its parameters with .Get, and what a pair encloses, rendered as markdown, with .Inner. {{</* note */>}} shows a tag as written.
  • Pictures for themes. A bundle's files are in .Resources, and img.Resize, img.Fit, img.Fill, img.Crop, img.Format and img.Quality make a smaller, cropped or WebP copy of a picture, made once and kept in .kite/cache/images/. A photo is turned upright as its EXIF says, and a copy carries none of its EXIF. JPEG, PNG, GIF and WebP are read and written in pure Go, so a laptop and a CI runner publish the same bytes. layouts/_markup/render-image.html draws the pictures of a post's text, as in Hugo.
  • Kinds of content of your own. content.types in kite.yaml declares kinds beside posts and pages, such as projects or books: their folder, address, templates, taxonomies and fields, which the studio draws as a form, an order by date or by weight, and whether they are in the feed.
  • Themes speak the site's language. A template says a word with {{ T "read_more" }} from the theme's language packs, with plural forms and values in it, and a site's own i18n/<lang>.yaml rewords any of them without replacing a template. The built-in theme speaks English and Chinese this way.
  • Listings page as a theme needs. pagination in theme.yaml, or build.pagination in kite.yaml, sets how many items each kind of listing puts on a page, and 0 puts them all on one, for a home page or an archive.
  • Photos lose their location. A photo added in the studio loses the GPS of its EXIF and XMP before it is stored, in JPEG, PNG, WebP and AVIF, and the studio says so. Its orientation, camera and date stay, and its pixels are not touched.
  • One tag however it is written. Go, go and GO are one tag at /tags/go/, whose page lists every post carrying it, and its card in the studio names the other spellings. Renaming it writes every spelling the new way.

Fixes

  • Tags written in different cases no longer overwrite each other's page, where one spelling's posts went missing from build to build.
  • An absolute build.output or KITE_BUILD_OUTPUT is used as it stands rather than nested inside the project.
  • A build refuses an output that would replace the project, its content or its .kite folder, where it used to put the site in their place.
  • A theme without home.html, taxonomy.html or term.html draws those pages with list.html, as the theme contract says.

Install

Download the archive for your system below, unpack it, put kite somewhere on your PATH, and run kite run in an empty folder. On macOS, xattr -d com.apple.quarantine kite lets a downloaded program run the first time.

To run a site on a server with Docker:

docker run -d --name kite --restart unless-stopped -p 127.0.0.1:1717:1717 -v kite-data:/data ghcr.io/kite-plus/kite:0.1.3

Every archive can be checked against checksums.txt, and a given commit builds to the same binary on any machine.

Upgrading from 0.1.2

Replace the binary, or pull the new image. A site's index is rebuilt the first time it opens. A few things behave differently:

  • A shortcode with no template stops the build and names the file and line, where its tag used to be published as text. A site moved from Hugo writes templates for the built-in ones it calls, such as figure and youtube; the reference shows how.
  • A post that calls shortcodes opens in the editor's source view, since the visual editor cannot keep the tags.
  • The built-in theme, now 0.6.0, says its words from language packs. A site that replaced its _partials/t.html rewords it with i18n/<lang>.yaml instead, and "1 words" is now "1 word".
  • A heading ending in a picture or a shortcode loses a trailing - from its anchor.
  • A theme that uses T, pagination, .Resources, img.* or the render hook needs this version: requires: ">=0.1.3".

Notes

Kite is in early development, and things may still change from one version to the next. The reference covers the studio, themes, plugins, configuration and deployment, and now shortcodes and content types.

Every change in this release

Changelog

Features

Fixes

Documentation

Install

Download the archive for your platform, or pin the version in a project
so that local builds and CI agree:

./kitew build

Verify a download against checksums.txt before running it.