Deneb Jekyll documentation

RTL and languages

Switch Deneb to Arabic or another right-to-left language, edit the interface texts, and add a language.

Deneb supports right-to-left (RTL) languages. English and Arabic texts are included.

Switch to Arabic

In _config.yml:

lang: ar
dir: rtl

Restart jekyll serve. Then translate your own content: the page sections, _data/*.yml, the services, projects and posts.

What changes:

  • dir: rtl makes the site load assets/css/deneb.rtl.css and sets dir="rtl" on the page.
  • lang: ar makes the interface texts come from the ar block in _data/i18n.yml. Dates use the Arabic month names.
  • Arabic, Persian and Urdu pages use the system font, because Poppins has no Arabic letters.
  • Arrows and icons flip to face the right way.

Interface texts

Every word that is not your own content comes from _data/i18n.yml: buttons, labels, form fields, breadcrumbs and month names. Edit a value to change the wording. The file has one block per language, en and ar.

en:
  read_article: Read article
  form_send: Send message
ar:
  read_article: ...

A text with {n} has a name or number put in its place. Keep {n} in your translation.

If a key is missing from a language, the English text is shown.

Add another language

  1. In _data/i18n.yml, copy the whole en block and paste it under a new code, such as fr.
  2. Translate the values. Keep the keys and any {n} as they are.
  3. Set lang: fr in _config.yml.
  4. For a right-to-left language, also set dir: rtl. The system font is used for ar, fa and ur. For another RTL language, set a suitable font in custom.css. See Colours and fonts.

Translate your own content too.

Tag names

Tags keep their English name in the address. To show a translated name, add tag_names to the language block:

ar:
  tag_names: { design: التصميم, growth: النمو }

One site, one language

A Deneb site is in one language at a time. Set lang and dir once in _config.yml. A single page can use its own lang and text_dir in front matter, but the theme does not build a language switcher or linked translations for you.

Writing RTL-safe CSS

In custom.css use logical properties, such as margin-inline-start instead of margin-left. The RTL stylesheet is made from the same source, so the theme’s own CSS is mirrored for you. Your custom.css is not.

Rebuilding the RTL stylesheet

If you change the design in source/, npm run css rebuilds both deneb.css and deneb.rtl.css. See Colours and fonts.