Alcove CMS
Ru

Part IV, Delivery

Languages

A page in another language gets its own prefix.

lang: en in site.yaml sets the default language. A page in another language is written under its own prefix: lang: ru with an empty slug becomes /ru/, and slug: about becomes /ru/about/. The canonical link, the sitemap entry and the pager links carry the prefix too.

The same slug can exist once per language. There is no translation layer: a page in Russian is a page file with Russian text, and its alcoves hold Russian copy.

Live result This page is a static file, built once.

This page has lang: en. The two front pages of the site:

Source the files behind the result above

content/pages/ru.yaml

slug: ""
title: Alcove CMS по-русски
lang: ru
alcove: house
meta:
  description: Alcove - небольшая CMS на Go, где сайт - это каталог файлов.
  nav: ru
  image: /assets/images/hero.e2e2cbb5.jpg
nooks:
  main:
    - alcove: ruhome

content/alcoves/demo_langs/tile.html

<li><a href="{{ href }}" hreflang="{{ lang }}" lang="{{ lang }}">{{ label }}</a> <code>{{ href }}</code></li>