Full Stack Developer | Problem Solver | Technical Writer
๐ Live Demo โข ๐ง Contact โข ๐ผ LinkedIn โข ๐ GitHub
- About the Project
- Key Technical Features
- Technical Stack
- Performance & Optimization
- Project Architecture
- Getting Started
- Development Workflow
- Content Showcase
- Technical Highlights
- Roadmap
- Contributing
- License
A modern, high-performance technical blog and portfolio built with cutting-edge web technologies. This project showcases advanced front-end engineering skills, including:
- 50+ Algorithm Solutions: Documented LeetCode and FreeCodeCamp challenges with detailed explanations
- Bilingual Content: Full English/Spanish support with i18n architecture
- Custom Theme Engine: Fork and enhancement of Retypeset theme with custom features
- Developer Experience: CLI tools for content creation, formatting, and optimization
โจ Modern Architecture: Built with Astro's Islands Architecture for optimal performance ๐จ Design Excellence: Print-inspired typography with carefully crafted reading experience โก Performance First: 100/100 Lighthouse scores with advanced optimization techniques ๐ง Developer Tools: Custom CLI scripts for streamlined content workflow ๐ Technical Writing: Demonstrates both coding and communication skills
- Static Site Generation (SSG): Zero JavaScript by default, hydration on demand
- Content Collections API: Type-safe content management with Zod validation
- Dynamic OG Images: Automated social media preview generation with Canvas API
- Custom Markdown Pipeline: Enhanced with Remark/Rehype plugins for:
- Mathematical notation (KaTeX)
- Diagrams (Mermaid)
- Code syntax highlighting with copy buttons
- Auto-generated table of contents
- Reading time estimation
- Image Optimization: Automatic LQIP (Low Quality Image Placeholders) generation
- Asset Pipeline: Sharp-based image processing with WebP conversion
- Code Splitting: Lazy loading for comments and analytics
- Atomic CSS: UnoCSS engine generating optimized utility classes for minimal bundle size
- Compression: Astro Compress for HTML/CSS/JS minification
- Meta Optimization: Comprehensive OpenGraph and Twitter Card support
- Sitemap Generation: Automatic XML sitemap for search engines
- RSS/Atom Feeds: Multi-format syndication for content distribution
- Semantic HTML: ARIA labels and proper heading hierarchy
- Lighthouse Perfect: 100/100 scores across all metrics
| Category | Technology | Purpose |
|---|---|---|
| Framework | Astro 5.13.7 | Static Site Generation with Islands Architecture |
| Language | TypeScript 5.9.2 | Type-safe development |
| Styling | UnoCSS 66.5.1 | Atomic CSS engine with instant compilation |
| Package Manager | pnpm 10.15.0 | Fast, disk space efficient |
| Plugin | Functionality |
|---|---|
| remark-math | LaTeX mathematical notation support |
| rehype-katex | Beautiful math rendering |
| rehype-mermaid | Diagram generation from code |
| remark-directive | Custom markdown directives |
| rehype-slug | Automatic heading ID generation |
| Tool | Purpose |
|---|---|
| ESLint + Prettier | Code quality and formatting |
| Astro Check | Type checking for Astro files |
| Simple Git Hooks | Pre-commit validation |
| Lint-Staged | Run linters on git staged files |
| Custom CLI Scripts | Content creation and optimization |
- Analytics: Google Analytics 4, Umami (privacy-focused alternative)
- Comments: Waline, Twikoo, Giscus support
- Images: Sharp for processing, LQIP generation
- Fonts: Custom EarlySummer Serif typography
Performance: 100/100
Accessibility: 100/100
Best Practices: 100/100
SEO: 100/100
- Zero JavaScript by Default: Only hydrate interactive components
- Image Lazy Loading: Native lazy loading + LQIP placeholders
- Critical CSS: Inline critical styles, defer non-critical
- Font Optimization: Subset fonts, preload critical fonts
- Asset Compression: Brotli/Gzip compression for all assets
- CDN Ready: Optimized for global content delivery
- Initial Load: < 50KB (HTML + Critical CSS)
- Time to Interactive: < 1.5s on 3G
- First Contentful Paint: < 0.8s
blog-astro/
โโโ src/
โ โโโ assets/ # Static assets (images, fonts)
โ โโโ components/ # Reusable Astro/React components
โ โ โโโ BaseHead.astro
โ โ โโโ PostCard.astro
โ โ โโโ ...
โ โโโ content/ # Content collections
โ โ โโโ posts/ # Blog posts (50+ technical articles)
โ โ โ โโโ *.en.md # English versions
โ โ โ โโโ *.es.md # Spanish versions
โ โ โโโ about/ # About pages
โ โโโ layouts/ # Page layouts
โ โ โโโ BaseLayout.astro
โ โ โโโ PostLayout.astro
โ โโโ pages/ # File-based routing
โ โ โโโ index.astro
โ โ โโโ posts/
โ โ โโโ [lang]/
โ โโโ styles/ # Global styles and themes
โ โโโ i18n/ # Internationalization configs
โ โโโ plugins/ # Remark/Rehype plugins
โ โโโ utils/ # Helper functions
โ โโโ config.ts # Site configuration
โโโ scripts/ # CLI automation tools
โ โโโ new-post.ts # Create new blog post
โ โโโ format-posts.ts # Batch format posts
โ โโโ apply-lqip.ts # Generate image placeholders
โ โโโ update-theme.ts # Theme update utility
โโโ public/ # Static files (favicons, robots.txt)
โโโ patches/ # Package patches (if needed)
- Islands Architecture: Partial hydration for optimal performance
- Content Collections: Type-safe content with Zod schemas
- File-based Routing: Intuitive page structure
- Component Composition: Reusable, maintainable components
- Utility-First CSS: Atomic design with UnoCSS
Ensure you have the following installed:
- Node.js: v18.0.0 or higher (Download)
- pnpm: v10.15.0 or higher (Recommended)
npm install -g pnpm
-
Clone the repository
git clone https://github.com/RadikeCosa/blog-astro.git cd blog-astro -
Install dependencies
pnpm install
-
Configure environment (optional)
cp .env.example .env # Edit .env with your analytics IDs, etc. -
Start development server
pnpm dev
-
Open browser
http://localhost:4321
| Command | Description |
|---|---|
pnpm dev |
Start development server with hot reload |
pnpm build |
Build for production (includes type checking) |
pnpm preview |
Preview production build locally |
pnpm lint |
Run ESLint on all files |
pnpm lint:fix |
Auto-fix linting issues |
pnpm new-post |
Create new blog post with template |
pnpm new-bi-post |
Create bilingual post (EN + ES) |
pnpm format-posts |
Format all existing posts |
pnpm apply-lqip |
Generate LQIP for all images |
pnpm update-theme |
Pull upstream theme updates |
# Create single post
pnpm new-post
# Follow interactive prompts for:
# - Title
# - Language (en/es)
# - Tags
# - Category- Create file in
src/content/posts/ - Use frontmatter template:
---
title: Your Post Title
published: 2025-12-03T20:00:00.000Z
description: Brief description for SEO
tags: [javascript, tutorial]
draft: false
lang: en
---- Frontmatter: Always include title, published, description, tags
- Images: Place in
src/assets/images/, reference with relative paths - Code Blocks: Include language tag for syntax highlighting
- Math Notation: Use
$inline$or$$block$$with KaTeX - Diagrams: Use mermaid code blocks for visualizations
# Type check
pnpm astro check
# Lint code
pnpm lint
# Build test
pnpm build
# Preview
pnpm previewThis blog features 50+ technical articles covering:
- LeetCode Top Interview 150: Step-by-step solutions with complexity analysis
- Array Manipulation: Two pointers, sliding window, prefix sum techniques
- Dynamic Programming: Memoization, tabulation, optimization strategies
- String Algorithms: Pattern matching, parsing, transformations
- JavaScript Deep Dives: Closures, async patterns, performance optimization
- React Patterns: Hooks, context, state management best practices
- TypeScript Tips: Advanced types, generics, utility types
- CSS Techniques: Modern layout, animations, responsive design
Each article demonstrates:
- โ Clear problem statement and constraints
- โ Intuition and approach explanation
- โ Step-by-step solution walkthrough
- โ Complexity analysis (Time & Space)
- โ Code with detailed comments
- โ Visual diagrams (Mermaid)
- โ Mathematical notation (KaTeX)
- โ Alternative solutions comparison
All major articles available in:
- ๐ช๐ธ Spanish (Primary): Native technical writing
- ๐ฌ๐ง English (Secondary): Professional translations
- โ Type Safety: 100% TypeScript with strict mode
- โ Linting: ESLint with Astro + TypeScript rules
- โ Git Hooks: Pre-commit validation with lint-staged
- โ Code Formatting: Consistent style with ESLint
- โ Type Checking: Astro Check + TypeScript compiler
- ๐ Google Analytics 4: User behavior and engagement tracking
- ๐ Umami Analytics: Privacy-focused alternative metrics
- ๐ Lighthouse CI: Automated performance audits (target: 100/100)
- ๐ Meta Tags: Comprehensive OpenGraph and Twitter Cards
- ๐ Structured Data: JSON-LD for rich search results
- ๐ XML Sitemap: Auto-generated with changefreq and priority
- ๐ RSS/Atom Feeds: Multi-format content syndication
- ๐ Semantic HTML: Proper heading hierarchy and landmarks
- โฟ ARIA Labels: Comprehensive screen reader support
- โฟ Keyboard Navigation: Full site accessible via keyboard
- โฟ Color Contrast: WCAG AA compliant (4.5:1 minimum)
- โฟ Focus Management: Visible focus indicators
- โฟ Alt Text: All images include descriptive alt text
- Initial blog setup with Astro
- Custom theme implementation
- Bilingual support (ES/EN)
- 50+ algorithm posts
- Image optimization pipeline
- SEO optimization
- Dark/light mode toggle
- RSS/Atom feeds
- Search functionality (Algolia/Pagefind)
- Related posts algorithm
- Newsletter subscription
- Advanced analytics dashboard
- Interactive code playgrounds
- Video content integration
- Podcast episodes
- Community contributions
- API documentation section
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
- Follow existing code style (ESLint config)
- Add tests for new features (if applicable)
- Update documentation as needed
- Ensure all checks pass before submitting
This project is based on the Retypeset Theme and is available under the MIT License. See LICENSE file for details.
Ramiro N. Cosa Full Stack Developer | Problem Solver | Technical Writer
- ๐ Website: ramirocosa.is-a.dev
- ๐ผ LinkedIn: linkedin.com/in/ramicosa
- ๐ GitHub: @radikeCosa
- ๐ง Email: ramirocosa@gmail.com
- ๐ฆ Twitter/X: @ramiro_cosa
- Retypeset Theme - Beautiful print-inspired design
- Astro - The web framework for content-driven websites
- UnoCSS - Instant on-demand atomic CSS engine
- TypeScript - JavaScript with syntax for types
- Sharp - High-performance image processing
- EarlySummer Serif - Custom font for elegant reading experience
Made with โค๏ธ by Ramiro N. Cosa