Skip to content

Repository files navigation

GoGPU site

Site for the GoGPU ecosystem. Next.js static export, published to https://gogpu.github.io.

Why this deploy setup

gogpu.github.io is an organization site. Unlike project sites (e.g. lkmavi.github.io/dali-coffee), it must publish from the default branch.

Publishing path:

  1. npm run buildout/
  2. Copy into docs/ with .nojekyll and _config.yml that includes _next (otherwise GitHub Pages/Jekyll drops /_next CSS and the layout breaks)
  3. GitHub Pages source: Deploy from branchmain / docs

Workflow .github/workflows/pages.yml rebuilds and updates docs/ on push to main (ignores docs/** to avoid loops).

Local development

cp .env.example .env.local
npm install
npm run dev

Locales use URL prefixes: /en/, /ru/, /de/, /zh/. Root / redirects to /en/.

Internationalization

UI strings live in gettext .po files:

var/langs/en/site.po
var/langs/ru/site.po
var/langs/de/site.po
var/langs/zh/site.po

Lookup is by msgctxt (key), same idea as CS-Cart __("key"):

msgctxt "hero.headline"
msgid "GPU power. Go simplicity."
msgstr "Мощь GPU. Простота Go."

In code: const t = await getT(locale); then {t("hero.headline")}.

Non-translatable structure (hrefs, package names, media paths) stays in src/content/site.ts.

Manual publish

NEXT_PUBLIC_BASE_PATH= NEXT_PUBLIC_SITE_URL=https://gogpu.github.io npm run build
rm -rf docs && mkdir docs && cp -a out/. docs/
printf '%s\n' 'include:' '  - _next' > docs/_config.yml
touch docs/.nojekyll
git add docs && git commit -m "Deploy site to docs/" && git push

License

See LICENSE.

Releases

Packages

Contributors

Languages