Skip to content

Make blog.ubik.hr blog-only: redirect non-blog pages to ubik.hr#167

Merged
lukaskywalk merged 1 commit into
UBIKhr:masterfrom
lukaskywalk:blog-cleanup-redirect
Apr 29, 2026
Merged

Make blog.ubik.hr blog-only: redirect non-blog pages to ubik.hr#167
lukaskywalk merged 1 commit into
UBIKhr:masterfrom
lukaskywalk:blog-cleanup-redirect

Conversation

@lukaskywalk
Copy link
Copy Markdown
Collaborator

Summary

The Hugo deploy at `blog.ubik.hr` was originally the entire ubik.hr website. After the migration to Gatsby (now serving ubik.hr), this repo was repurposed to host only `/blog/`, but the navbar and the old non-blog pages (members, contact, arbitration, consulting, become-a-member) were left in place — so visitors clicking the navbar landed on stale 2024 content.

This PR makes `blog.ubik.hr` truly blog-only:

  1. Updates the navbar (HR + EN) so all non-blog links point to https://ubik.hr (absolute URLs).
  2. Adds redirects on every non-blog section page so anyone arriving via direct URL or search engine gets sent to the corresponding ubik.hr page.

URL mapping

Old (blog.ubik.hr) New target (ubik.hr)
`/members/`, `/en/members/` `/members/`, `/en/members/`
`/contact/`, `/en/contact/` `/contact/`, `/en/contact/`
`/arbitration/`, `/en/arbitration/` `/arbitraza/`, `/en/arbitraza/`
`/become-a-member/`, `/en/become-a-member/` `/join/`, `/en/join/`
`/consulting/`, `/en/consulting/` `/` (Gatsby has no consulting page)

Changes

  • `site/config.toml` — navbar URLs (HR + EN) updated to absolute ubik.hr links; `/blog/` stays relative
  • `site/content/{croatian,english}/{members,contact,arbitration,consulting,become-a-member}/_index.md` — replaced with redirect front-matter (`type: redirect`, `redirect_to: ...`, `sitemap_exclude: true`)
  • `site/layouts/_default/redirect.html` and `site/layouts/redirect/list.html` — new template emitting:
    • ``
    • ``
    • ``
    • JS `window.location.replace` fallback

Out of scope (intentional)

  • The Hugo home page at `blog.ubik.hr/` is left as-is. Decide separately whether it should redirect to `ubik.hr/` or to `blog.ubik.hr/blog/`.
  • Individual member detail pages (e.g. `/members/luka-sucic/`) are not redirected — only section landing pages. Open a follow-up if you want those handled too.

Backups

Before this PR, the state was tagged for permanent recovery:

  • `backup/pre-blog-cleanup` — master source
  • `backup/built-site-pre-cleanup` — built gh-pages site

Test plan

🤖 Generated with Claude Code

The Hugo deploy at blog.ubik.hr was originally the entire ubik.hr
website. After the migration to Gatsby (now serving ubik.hr), this
repo was repurposed to host only /blog/, but the navbar and the
old non-blog pages (members, contact, arbitration, consulting,
become-a-member) were left in place — so visitors clicking the
navbar still landed on stale 2024 content.

This commit:
- Updates the navbar (HR + EN) so all non-blog links point to
  the corresponding pages on https://ubik.hr (absolute URLs).
  /blog/ stays on blog.ubik.hr.
- Replaces the front-matter of each non-blog section's _index.md
  with a redirect spec (type: redirect, redirect_to: <ubik.hr URL>)
- Adds a redirect HTML template (layouts/_default/redirect.html
  and layouts/redirect/list.html) that emits a meta-refresh +
  JS redirect + canonical link, with noindex for SEO hygiene.

URL mapping:
  /members/, /en/members/                       → ubik.hr/members/
  /contact/, /en/contact/                       → ubik.hr/contact/
  /arbitration/, /en/arbitration/               → ubik.hr/arbitraza/
  /become-a-member/, /en/become-a-member/       → ubik.hr/join/
  /consulting/, /en/consulting/                 → ubik.hr/  (no equivalent)

The /blog/ section is unaffected. The Hugo home page (blog.ubik.hr/)
is also unchanged for now — handle separately if desired.

Backups for restoration:
  - tag backup/pre-blog-cleanup       (master before this change)
  - tag backup/built-site-pre-cleanup (gh-pages before this change)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@lukaskywalk lukaskywalk merged commit 6c4aab2 into UBIKhr:master Apr 29, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant