Skip to content

corex-ui/soonex_i18n

Repository files navigation

Soonex i18n

Tableau static site with Corex, Gettext locales, Localize metadata, and verified-route-friendly ~p paths. Single-locale sibling: github.com/corex-ui/soonex.

Corex docs: installation, API, Events, Tableau + Corex, localize.

Prerequisites

  • Elixir ~> 1.15
  • Node.js (for npm install in assets/)

Quick start

cd templates/soonex_i18n
mix deps.get
mix setup
mix designex corex
cd assets && npm install && cd ..
mix tableau.server
  • mix setup runs deps.get and mix localize.download_locales so locale data is present before the first build.
  • Dev: http://localhost:4999. Default locale is also served at /; locale-prefixed URLs (e.g. /en/, /ar/) are built per Gettext.
  • Prod: MIX_ENV=prod mix build_site/. Set SOONEX_PUBLIC_URL for your deploy origin; default demo is https://corex-ui.github.io/soonex_i18n.

MIX_ENV=dev starts Corex MCP at http://localhost:4004/corex/mcp and a headless Phoenix endpoint for VerifiedRoutes only. See .cursor/mcp.json.

Rebuild assets: mix assets.build.

Customize (where to edit)

Static rendering uses each page’s permalink and layout Gettext; there is no Phoenix conn. For a full Phoenix app, add something like Localize.Plug.PutLocale as in Corex e2e.

Rename this template

  1. Commit or branch (no undo).
  2. mix project.rename your_otp_app from the repo root (snake_case).
  3. mix format and mix compile.
  4. _posts/*.md: YAML layout: lines update to the new module prefix; bodies are untouched.

Tests and CI

mix test runs palette, designex, esbuild, tailwind, and mix tableau.build before Wallaby tests via the pre.test alias. .github/workflows/ci.yml installs Chrome/Chromedriver and runs mix test --timeout 600000. .github/workflows/pages.yml downloads locales, runs npm ci in assets/, then prod build.

Corex assets and JS

Same as Soonex: corex/* imports in assets/js/site.js, NODE_PATH includes deps, mix designex corex after Corex upgrades. Optional path dep: {:corex, path: "../../corex"}.

Client scripts: assets/js/theme.js, assets/js/mode.js, assets/js/locale.js, plus landing scripts in assets/js/landing*.js.

Production and hosting

  • SOONEX_PUBLIC_URL: drives Tableau url and SoonexI18nWeb.Endpoint path so GitHub Pages project sites get /repo/... prefixes; layout emits <base href="…"> for relative URLs.
  • Clear _site/ when routes or permalinks change.
  • 404: lib/pages/not_found_page.ex_site/404.html.

Example permalinks: _posts/2026-05-08-docs.md (/en/docs/), _posts/2026-05-08-docs-ar.md (/ar/docs/). Use ~p"/docs" in HEEx so links follow the active locale.

Drafts

Drafts and WIP: _drafts and _wip (config/dev.exs, config/prod.exs).

About

Static coming soon (i18n) template build with Elixir, Phoenix, Corex and Tableau

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors