This project consists in a Hugo static-generated website that is pre-populated with migrated content (posts, pages, images, files, etc..) from about a half dozen individual Wordpress blogs, all originally located under the domain lanchonete.org.
alias hs='rm -rf public && npx -y pagefind --site public --serve
npm_config_yes=true npx pagefind --site "public" --output-subdir ../static/pagefind
npm_config_yes=true npx pagefind --site "public" --output-subdir ../static/pagefind
hugo serverOn the homepage only, the site automatically redirects visitors to their preferred language version using a three-step waterfall:
- Stored preference (
localStoragekeylanchonete-lang) — checked first on every visit. Set by prior detection or by manually clicking a language button. - Browser locale (
navigator.language) — if it starts withpt, the visitor goes straight to the Portuguese version with no external API call. - IP geolocation (ipapi.co, free tier) — used only when the browser locale is non-PT. Redirects to PT for visitors in Lusophone countries (BR, PT, AO, MZ, CV, GW, ST, TL, MO), EN otherwise.
If the API is unreachable, a non-PT browser defaults to EN.
Manual language switching via the language-switcher widget always wins on subsequent visits (writes to localStorage).
Hugo URL structure: Portuguese at /, English at /en/.