Repository navigation
kite 0.1.3
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 >}}, callslayouts/_shortcodes/<name>.htmlin 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, andimg.Resize,img.Fit,img.Fill,img.Crop,img.Formatandimg.Qualitymake 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.htmldraws the pictures of a post's text, as in Hugo. - Kinds of content of your own.
content.typesinkite.yamldeclares 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 byweight, 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 owni18n/<lang>.yamlrewords any of them without replacing a template. The built-in theme speaks English and Chinese this way. - Listings page as a theme needs.
paginationintheme.yaml, orbuild.paginationinkite.yaml, sets how many items each kind of listing puts on a page, and0puts 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.outputorKITE_BUILD_OUTPUTis used as it stands rather than nested inside the project. - A build refuses an output that would replace the project, its content or its
.kitefolder, where it used to put the site in their place. - A theme without
home.html,taxonomy.htmlorterm.htmldraws those pages withlist.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.3Every 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
figureandyoutube; 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.htmlrewords it withi18n/<lang>.yamlinstead, 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
- cb0843d: feat(api): take the place out of uploaded photos (@amigoer)
- 18077f2: feat(build): let each listing decide how it pages (@amigoer)
- 840ffb9: feat(content): let a site declare its own types (@amigoer)
- db3941a: feat(markdown): draw shortcodes with templates (@amigoer)
- 2fcf4cd: feat(markdown): let a site draw a body's pictures (@amigoer)
- 269838b: feat(theme): add T to say a theme's words (@amigoer)
- 40bb45d: feat(theme): make pictures from a page's bundle (@amigoer)
- bc83db3: feat(theme): read and write WebP in pure Go (@amigoer)
- 7a5faf0: feat(web): show the other ways a term is written (@amigoer)
Fixes
- db476ff: fix(build): make terms at one address one term (@amigoer)
- cfef86a: fix(build): refuse to build over the project (@amigoer)
- 8297a0a: fix(build): use an absolute output as it stands (@amigoer)
- 4519449: fix(theme): fall back to list.html for listings (@amigoer)
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.