Skip to content

v2.0.0 - Astro 7, Bilingual Support & Reading Experience

Latest

Choose a tag to compare

@0xdres 0xdres released this 25 Nov 03:35

✨ Highlights

This major release upgrades Astro Devosfera to Astro 7, introduces full bilingual architecture (en / es), elevates the article reading experience, and overhauls the build pipeline with zero-dependency utilities and native unit testing.


🚀 New Features

Bilingual Architecture (en / es)

  • Complete parallel route tree for English (/) and Spanish (/es/*), including home, posts, archives, tags, galleries, about, and localized RSS feeds (/rss.xml and /es/rss.xml).
  • Header & mobile drawer language switcher chip (EN / ES) with localStorage preference persistence and localized 404 fallback detection.
  • Automatic hreflang (en, es, x-default) alternate tags and localized Open Graph / JSON-LD metadata.
  • Locale-organized starter content under src/data/blog/{en,es}/ and src/data/galleries/{en,es}/.

Enhanced Reading Experience

  • Distraction-Free Reading Mode (R shortcut): Minimalist article view with floating controls pill, Sans/Serif typography toggle, 80%–150% font scaling, and localStorage persistence.
  • Sticky Desktop & Collapsible Mobile Table of Contents: Sidebar <TableOfContents> with IntersectionObserver scrollspy and sidebar Share / Copy URL widget on desktop (lg+), plus an expandable <details> TOC with auto-close on mobile/tablet (< lg).
  • Scroll-Driven Reading Progress Bar & Resume Toast: Native CSS scroll-timeline progress bar (with JS fallback) and automatic "Continue reading from where you left off" bookmark toast.
  • Hybrid Post Navigation: Pairs the chronological previous post with a tag-scored Recommended Read card at the bottom of each article.

Unified /posts Discovery View

  • Replaced paginated /posts/[...page] and standalone /search routes with a unified 3-column /posts grid featuring an embedded Pagefind search toolbar.
  • Added quick top-tag filter chips and progressive "Load more" pagination (SITE.postPerPage) to keep initial DOM rendering lightweight as archives grow.

Navigation, UI & Deployment Polish

  • Redesigned sticky <Header> with a "More options" popover (Tags, Archives, Galleries, Theme) and floating glass <MobileMenu> drawer.
  • Reusable <AuroraHero> section headers across /posts, /archives, /tags, /galleries, and /about.
  • Consolidated <GalleryLightbox> component using native <dialog> with edge-aware navigation, backdrop close, scroll-lock reset, and View Transitions AbortController cleanup.
  • Added vercel.json with production caching/security headers and default X-Robots-Tag: noindex, nofollow to protect new forks from unintended search indexing until launch.

⚡ Astro 7, Performance & Architecture

  • Astro 7 Migration: Upgraded to astro ^7.4.12 (Vite 8 / Rolldown & Oxc), @astrojs/mdx ^8.1.6, @astrojs/sitemap ^3.7.5, @astrojs/rss ^4.0.19, tailwindcss ^4.3.5, eslint ^10.15.0, eslint-plugin-astro ^3.2.1, and prettier-plugin-astro ^1.1.2.
  • Zero-Dependency Native Utilities: Removed dayjs, slugify, lodash.kebabcase, remark-toc, and remark-collapse, replacing them with native Date.now() / Intl APIs and Unicode NFKD slugifyStr.
  • Build & Asset Optimizations:
    • Enabled HTML-aware compressHTML: true, viewport prefetching, and connection-aware smart prefetching (src/scripts/smart-prefetch.ts).
    • Deduplicated route generation in src/utils/staticPaths.ts (eliminating redundant per-page collection sorting during SSG) and centralized gallery asset resolution in src/utils/gallery.ts.
    • In-memory TTF font buffer caching (src/utils/loadOgFont.ts), dynamic hostname resolution, and localized author labels in Satori OG image generation.
    • Optimized card cover images via native Astro <Image /> (AVIF), vectorized logo SVG, and removed unused cascadia-code.woff2 (-218 KB), dead components (Tag.astro, Main.astro, EditPost.astro), and slow dynamic site/tag OG endpoints.
  • Technical SEO: Added Schema.org JSON-LD (BlogPosting, WebSite, ProfilePage, ImageGallery, BreadcrumbList), relational pagination links, and conditional sitemap regex exclusions for /archives and /galleries.
  • Native Unit Test Suite: Added zero-dependency Node.js 24 test suite (pnpm test) covering slugifyStr, getReadingTime, i18n, buildBreadcrumbItems, getPath, and postFilter.
  • Updated Documentation: Refreshed README.md and GALLERIES.md for Astro 7, bilingual paths, reading features, and new commands.

⚠️ Breaking Changes & Upgrade Notes

  1. Node.js Requirement: Upgraded minimum runtime to Node.js 22.12+ (Node.js 24+ for running pnpm test).
  2. Bilingual Content Paths: Blog posts and galleries are now organized under locale folders:
    • src/data/blog/en/ & src/data/blog/es/
    • src/data/galleries/en/<slug>/ & src/data/galleries/es/<slug>/
  3. Removed Routes & Schema Fields:
    • Standalone /search and paginated /posts/[...page] routes were removed in favor of the unified /posts view and global ⌘K search modal.
    • Unused frontmatter fields (timezone, hideEditPost, canonicalURL) and remark-toc/remark-collapse were removed (the Table of Contents is now rendered natively by <TableOfContents>).
    • Dynamic /og.png and /tags/[tag]/og.png endpoints were removed in favor of the static fallback public/devosfera-og.webp (post OG images remain dynamically generated).

Full Changelog: v1.3.0...v2.0.0