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.
- Elixir ~> 1.15
- Node.js (for
npm installinassets/)
cd templates/soonex_i18n
mix deps.get
mix setup
mix designex corex
cd assets && npm install && cd ..
mix tableau.servermix setuprunsdeps.getandmix localize.download_localesso 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/. SetSOONEX_PUBLIC_URLfor your deploy origin; default demo ishttps://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.
- Brand / SEO (Gettext):
lib/layouts/root_layout.ex,lib/pages/home_page.ex. - Themes:
lib/soonex_i18n/theme.ex+assets/css/site.cssimports. - Locales:
config/config.exsconfig :localize,lib/soonex_i18n/gettext.ex,lib/soonex_i18n/locale.ex. Keepdefault_localea valid BCP 47 tag (template uses"en") so CI andmix tableau.builddo not depend onLANG. - Routes in HEEx:
use SoonexI18n.Routes— write~p"/docs"and let the locale (and prod path prefix) apply. Details: Phoenix VerifiedRoutes — localized routes. - Language switcher:
SoonexI18n.Locale.swap_path/2.
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.
- Commit or branch (no undo).
mix project.rename your_otp_appfrom the repo root (snake_case).mix formatandmix compile._posts/*.md: YAMLlayout:lines update to the new module prefix; bodies are untouched.
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.
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.
SOONEX_PUBLIC_URL: drives TableauurlandSoonexI18nWeb.Endpointpathso 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 and WIP: _drafts and _wip (config/dev.exs, config/prod.exs).