Dhox is a sublime and playful website template with a blog, built with Astro. Designed for beauty, readability, fluidity, and storytelling.
- Sublime Design: Glassmorphic dock, smooth scaling animations, and squaricle iconography.
- Theme System: Light, Dark, and Sepia modes with persistent state and seamless transitions.
- Fluid Navigation: ViewTransitions API integration for an app-like feel.
- Vertical Timeline: Custom component for visualizing your history or resume.
- Markdown & MDX: Write posts in Markdown or MDX with built-in syntax highlighting.
- SEO Optimized: Automatic sitemap, RSS feed, Open Graph tags, and semantic HTML.
- Responsive Components: Mobile-optimized Footer, Dock, and Search layouts.
- Improved Typography: Clean Geist and Monospace font stack.
- Search: Built-in search modal with keyboard shortcuts (with Fuse.js).
- Post Copyright: Beautiful share component with copy link tooltip, LinkedIn, and Bluesky sharing.
- Email Obfuscation: Anti-scraping protection using Base64 encoding - decoded only on click.
-
Clone the repository:
git clone https://github.com/yourusername/dhox cd dhox -
Install dependencies:
npm install
-
Start development server:
npm run dev
-
Build for production:
npm run build
After cloning, update these files with your information:
| File | What to update |
|---|---|
src/consts.ts |
Site title, name, email, social links |
src/pages/about.astro |
Your timeline, skills, languages |
src/components/Footer.astro |
Footer copyright text |
src/content/blog/*.md |
Your blog posts |
Tip: Search for
TODO:comments throughout the codebase to find all placeholder content.
/
├── public/ # Static assets (fonts, icons)
├── src/
│ ├── components/ # Reusable UI components (Dock, Footer, Timeline, PostCopyright)
│ ├── content/ # Markdown content (blog posts)
│ ├── layouts/ # Page templates (Base, BlogPost)
│ ├── pages/ # Route definitions
│ ├── styles/ # Global CSS and tokens
│ └── utils/ # Shared utilities (email obfuscation)
└── astro.config.mjs # Configuration
Edit src/styles/global.css to modify CSS variables for colors, spacing, and typography.
- Fonts: We use Geist and Monospace.
- Themes: Adjust color tokens in
:root,[data-theme="sepia"], and[data-theme="dark"].
The dock icons are in src/components/Dock.astro. They use CSS masks for crisp rendering. To change an icon:
- Add your SVG to
/public/. - Update the
dockItemsarray inDock.astrowith the new path.
Add new posts to src/content/blog/. The frontmatter requires:
---
title: "My New Post"
description: "A short summary"
pubDate: "Jul 15 2024"
tags: ["tech", "life"]
author: "Your Name"
---This template is optimized for Cloudflare Pages, Vercel, or Netlify.
- Push to GitHub.
- Connect to your hosting platform.
- It will auto-detect Astro and run
npm run build.
SEO Note: Submit your /sitemap-index.xml to Google Search Console after deployment.
This project is open-source and available under the European Union Public Licence (EUPL) v1.2.
- Built with Astro
- Icons by Remix Icon
- Font: Geist
- Search: Fuse.js
- Copyright component inspired by Astro Pure