0xdres/astro-devosfera
Über uns
Astro v7 theme built on AstroPaper. global search, image galleries with lightbox, custom typography, cursor glow effects, and a modern UI
Design und MedienGemessener Sternzuwachs
- in 24h
- +1
- in 7 days
- +1
- in 15 days
- +3
- in 1 month
- Verlauf wird gesammelt
Nettoänderungen in überlappenden Zeiträumen, keine Tagessummen. Fehlende Messwerte bleiben leer. Sterne zeigen Interesse, nicht Qualität.
README.md
OriginalDevosfera Blog
Heavily customized version of the AstroPaper theme with a new aesthetic, image galleries, global search modal, and dozens of visual and interactive improvements.
🌐 Clean template live demo: devosfera-blog.vercel.app

[!TIP] 🌟 Real-World Showcase:
Visit devosfera.vercel.app to see this template running in production on the creator's personal blog with custom advanced interactive extensions (interactive terminal, daily physics widgets, web audio synthesizers, and quizzes).📖 To explore the complete architecture and design decisions behind this base template, read the deep-dive article:
Introducing Astro Devosfera: Re-engineering the Developer Blog Experience (also available in Spanish).
[!IMPORTANT] Social links and personal URLs are no longer hardcoded. They are loaded from environment variables so that forks of this repo do not expose the original author's personal data. Copy
.env.example→.envand fill in your own values before running the project. See the Configuration section for details.
Table of contents
- Features
- Project structure
- Installation and local development
- Commands
- Creating content
- GalleryEmbed component
- Configuration
- Upstream issues resolved
- License
✨ Features
Core (inherited from AstroPaper)
- Type-safe Markdown, good performance, accessible and responsive
- Full SEO (meta tags, Open Graph, sitemap, RSS), light/dark mode
- Dynamically generated OG images with Satori
Modern design
- Hero with animated prompt configurable from
heroTerminalPromptinsrc/config.ts(default:~/ready-to-go $) - Reusable
<AuroraHero>section headers with interactive mouse-tracking aurora orbs - Global backdrop: grid + cursor glow + noise texture (all pages) optional and configurable from
src/config.ts - Glassmorphism on navbar, cards and modals
Custom typography
| Role | Font |
|---|---|
| Body | Wotfard (local) |
| Code / Mono | Fira Code (local) |
| Italics / H3 | Sriracha (Local) |
Global search (⌘K)
- Modal via
⌘K/Ctrl+Kpowered by Pagefind (static index) and full keyboard navigation (if you want to test it locally, runpnpm run buildfirst and after thatpnpm run devorpnpm run previewsince the index is only generated in production)
Image galleries (/galleries)
- Albums in
src/data/galleries/{en,es}/<slug>/; images optimized at build-time (srcset, WebP, lazy) - Native lightbox with
<dialog>, redesigned fullscreen layout, keyboard navigation and edge-aware prev/next controls <GalleryEmbed>to embed galleries inside MDX posts without importing- Controlled by
showGalleriesinsrc/config.ts(also gates gallery inclusion in mixed feeds) — see GALLERIES.md
Unified mixed feed (posts + galleries)
- Optional mixed feed controlled by
showGalleriesInIndexinsrc/config.ts(effective only ifshowGalleriesistrue) - When both flags are enabled, gallery entries are included in
/,/posts,/archives,/tags, and/rss.xml - Shared URL/date helpers keep routing and publish-date sorting consistent across all listing pages
- Gallery entries include a visual badge in cards and archive timeline items
Performance and maintainability improvements
- Parallel collection loading in key routes using
Promise.all - Optimized sorting and tag extraction logic for larger content sets
- Stronger shared typing across blog/gallery entries (removed weak
anyusage) - Reduced duplicated route/slug logic by centralizing entry helpers
Branded audio player
- Intro audio player in the hero with terminal aesthetic (wave bars, progress bar)
- Fully togglable and configurable from
src/config.ts
Reading experience
- Distraction-free Reading Mode (
Rshortcut, Sans/Serif typography toggle, 80%–150% font scaling) - Sticky desktop Table of Contents sidebar with scrollspy active-section highlighting
- Scroll-driven Reading Progress Bar and automatic "Resume reading where you left off" bookmark toast
- Hybrid post navigation (chronological previous post + tag-scored Recommended Read)
Bilingual architecture (en / es)
- Complete English (
/) and Spanish (/es/*) route tree with header and mobile language switcher (EN/ES) - Locale-organized content in
src/data/blog/{en,es}/andsrc/data/galleries/{en,es}/ hreflangalternate links, localized Open Graph metadata, and dedicated RSS feeds (/rss.xmland/es/rss.xml)
Redesigned pages
| Page | Highlights |
|---|---|
/ Home |
Terminal hero, featured grid, section counters, optional mixed feed |
/posts |
Unified 3-column grid (posts + galleries) with inline Pagefind |
/archives |
Vertical timeline with glow, includes gallery entries |
/tags |
Grid with proportional progress bar |
/galleries |
Album grid and fullscreen native <dialog> lightbox viewer |
🚀 Project structure
/
├── public/
│ ├── audio/ # Audio files (intro, etc.)
│ └── pagefind/ # Search index (generated at build)
├── src/
│ ├── assets/ # Local fonts, SVG icons and logo
│ ├── components/ # Reusable Astro components
│ ├── data/
│ │ ├── blog/ # Posts .md / .mdx by locale (en/, es/)
│ │ └── galleries/ # Galleries by locale (en/<slug>/, es/<slug>/)
│ ├── i18n/ # UI translation dictionaries and locale helpers
│ ├── layouts/ # Root layout, PostDetails, AboutLayout
│ ├── pages/ # Astro routes (/ and /es/*)
│ ├── scripts/ # Modular client-side TypeScript modules
│ ├── styles/ # global.css, header.css, post-details.css, typography.css
│ └── utils/ # Filters, static paths, OG with Satori, Shiki transformers
├── tests/ # Unit test suite (Node.js native test runner)
└── astro.config.ts
👨🏻💻 Installation and local development
Requirements: Node.js 22.12+ (Node.js 24+ for unit tests) and pnpm.
# 1. Install dependencies
pnpm install
# 2. Development server
pnpm run dev
# → http://localhost:4321
The Pagefind search index is only available in the production build. To test it locally:
pnpm run build && pnpm run preview/dev
Docker
docker build -t devosfera-blog .
docker run -p 4321:80 devosfera-blog
🧞 Commands
| Command | Action |
|---|---|
pnpm install |
Install dependencies |
pnpm run dev |
Local dev server at localhost:4321 |
pnpm run build |
Production build (astro check + build + Pagefind) |
pnpm run preview |
Preview the production build |
pnpm test |
Run unit tests (Node.js native test runner) |
pnpm run format |
Format with Prettier |
pnpm run lint |
Lint with ESLint |
pnpm run buildinternally runspagefind --site dist && cp -r dist/pagefind public/. The search index ends up inpublic/pagefind/ready for preview.
📝 Creating content
Posts (src/data/blog/{en,es}/)
Create a .md or .mdx file with the following frontmatter:
---
title: "Post title"
pubDatetime: 2026-01-15T10:00:00Z # required — ISO 8601 with timezone
description: "Short description for SEO and cards"
tags: ["astro", "dev"]
featured: false # highlight on the home page
draft: false # hidden in production
---
MDX: JSX components can be used directly. <GalleryEmbed> is available without importing it (see next section).
Table of Contents: Automatically rendered in the desktop sidebar with dynamic scrollspy highlighting for h2 and h3 headings.
Annotated code blocks (via Shiki transformers):
// [!code highlight] → highlight the line
// [!code ++] → added line (diff)
// [!code --] → removed line (diff)
// fileName: file.ts → display the filename above the block
Galleries (src/data/galleries/{en,es}/)
Quick setup:
- Create a folder in
src/data/galleries/en/<slug>/(andsrc/data/galleries/es/<slug>/for Spanish). - Add
index.md(gallery metadata) and image files. - Use numeric prefixes (
01-,02-, …) if you want to control image order. - The folder slug becomes the route:
/galleries/<slug>(and/es/galleries/<slug>).
For full details (frontmatter fields, cover behavior, alt generation, and image optimization), see GALLERIES.md.
🖼️ GalleryEmbed component
Embed a gallery inside any .mdx post — no import needed:
<GalleryEmbed slug="my-trip-to-tokyo" />
Optional props: limit (0 = all), cols (2 | 3 | 4), showLink (true/false).
For advanced usage, full props reference, lightbox behavior, and invalid slug fallback, see GALLERIES.md.
⚙️ Configuration
All site configuration lives in src/config.ts (the SITE constant). It includes general settings (title, description, timezone), feature toggles (galleries, audio player, mixed feed), and content limits (posts per page, gallery embed limit).
Social links and "Share" links are defined in src/constants.ts.
[!WARNING] Breaking change — social links moved to environment variables.
Previously, social URLs (GitHub, X, LinkedIn, email) and the "Edit this post" URL were hardcoded in
src/constants.tsandsrc/config.ts. This caused every fork of the repo to expose the original author's personal data publicly, leading to unwanted spam.What changed:
Variable What it controls PUBLIC_SOCIAL_GITHUBGitHub profile link & JSON-LD author URL PUBLIC_SOCIAL_XX / Twitter profile link PUBLIC_SOCIAL_LINKEDINLinkedIn profile link PUBLIC_SOCIAL_EMAILContact email (shown as mailto:link)PUBLIC_EDIT_POST_URL"Edit this post" button base URL To restore your socials after forking or updating:
cp .env.example .env # fill in your own values in .envFor production deployments (Vercel, Netlify, etc.), add these variables in your platform's environment settings. Any variable left unset simply hides that social link — no errors, no broken UI.
🐛 Upstream issues resolved
Bugs and feature requests from the official AstroPaper repository implemented in this version:
| Issue | Description | Files | Credits |
|---|---|---|---|
| #614 | Back to Top shifts the pagination button when ShareLinks is empty |
BackToTopButton.astro |
— |
| #574 | Markdown tables overflow the layout on mobile — fixed with w-full table-auto and word-wrap on cells |
typography.css |
@GladerJ — solution |
| #569 | Back to Top inconsistent on desktop — unified circular design with progress ring and fixed positioning |
BackToTopButton.astro, PostDetails.astro |
— |
| #566 | Share links don't open in a new tab — added target="_blank" and rel="noopener noreferrer" |
ShareLinks.astro |
PR #611 by @zerone0x |
| #131 | No MDX support — added @astrojs/mdx integration with extendMarkdownConfig: true |
astro.config.ts, content.config.ts |
— |
| #495 | Inconsistent post filtering by timezone — resolved using native UTC timestamp comparison (Date.now() > pubTime - margin) in postFilter.ts, eliminating external date libraries and timezone offset drift |
postFilter.ts |
@kj-9 — reference fix |
| #553 | No galleries section — implemented full /galleries section with lightbox, GalleryEmbed, image optimization and showGalleries flag. See GALLERIES.md |
multiple — see GALLERIES.md | — |
📜 License
Based on AstroPaper by Sat Naing, licensed under MIT. Customizations © 0xdres.
Ähnliche Projekte entdecken
Wird geladen…