内置土耳其语和英语双语路由,默认语言位于根路径,英语位于 /en/ 路径
Zahit — Astro 博客模板
作者 kuscadev
Zahit 是一个基于 Astro 的极简博客与作品集主题,采用扁平化暗色设计,内置土耳其语和英语双语路由、按年份分组的归档页、带 ScrollSpy 的目录以及代码复制按钮。
看看你的网站会是什么样
浏览真实页面截图,比较内容排版与手机效果。点击下方缩略图切换,放大查看整页细节。
全部页面与视图 3
截图用于了解视觉与布局,交互效果请以实际项目为准。
值得关注的模板亮点
从已有项目资料中,快速了解它的特点。
语言切换器通过 translationKey 匹配翻译文章,无翻译时回退到目标语言归档页
归档页按发布年份动态分组,链接悬停时有轻微位移动效
博客文章布局自动解析 h2 和 h3 生成目录,并通过滚动监听高亮当前章节
代码块悬停显示复制按钮,点击后图标变为确认标记并在 2 秒后恢复
个人资料侧边栏在桌面端固定显示,在 860px 以下屏幕宽度时隐藏头像
模板详细介绍
Zahit 是一个以“简洁即深度”为理念的 Astro 博客与作品集主题,界面采用深空蓝背景搭配冰蓝色强调色,整体呈现扁平、无多余组件的极简风格。主题面向开发者、系统管理员和写作者,强调内容优先的阅读体验。
功能方面,Zahit 内置土耳其语(默认,位于根路径)和英语(位于 /en/ 路径)双语路由,语言切换器通过 frontmatter 中的 translationKey 在翻译文章之间跳转,若目标语言没有对应翻译则回退到该语言的归档页。归档页按文章发布年份动态分组,链接在悬停时有轻微右移效果。博客文章布局会解析 MDX 中的 h2 和 h3 标题生成目录,并通过滚动监听高亮当前阅读位置。代码块在悬停时显示复制按钮,点击后图标变为确认标记并在 2 秒后恢复。个人资料侧边栏在桌面端固定显示,在 860px 以下屏幕宽度时通过 CSS 媒体查询隐藏头像。404 页面会根据 URL 路径判断语言并显示对应的错误信息和返回按钮。
技术栈上,主题使用 Astro 和 MDX 集成,图标通过 Astro-Icon 与 Iconify 图标集实现,样式基于 global.css 中的 CSS 变量,没有使用工具类框架。站点配置集中在 src/config.ts,包括站点元数据、作者信息和社交链接;翻译字典位于 src/i18n/ui.ts;颜色、字体和宽度等设计令牌在 src/styles/global.css 中定义。
使用限制方面,主题要求 Node.js 版本不低于 22.12.0,构建输出为静态文件,可部署到 Netlify、Vercel 或 GitHub Pages。代码采用 MIT 许可,允许免费使用、修改、商用和分发,但演示图片、字体、图标等第三方素材需单独核对许可,域名、托管等外部服务可能产生费用。
适合你的项目吗?
适用场景
- 搭建面向开发者或系统管理员的双语技术博客
- 创建以文字内容为主、界面简洁的个人作品集网站
- 需要按年份归档文章并提供目录导航的写作站点
- 希望使用纯 CSS 变量定制暗色主题、不依赖工具类框架的项目
适合人群
- 熟悉 Astro 和 MDX、希望快速启动双语博客的开发者
- 偏好极简暗色设计、注重阅读体验的写作者
- 需要土耳其语和英语双语内容展示的个人站点
- 接受静态站点生成并自行处理托管部署的用户
上手与定制指南
结合仓库当前版本的说明,按下面的资料检查内容、配置与运行要求。
- 1
需要 Node.js 版本不低于 22.12.0
- 2
克隆仓库后运行 npm install 安装依赖,npm run dev 启动开发服务器,默认地址为 http://localhost:4321
- 3
运行 npm run build 生成静态文件到 dist 目录,可用 npm run preview 本地预览构建结果
- 4
站点标题、描述、作者信息和社交链接在 src/config.ts 中配置
- 5
颜色、字体和布局宽度等设计令牌在 src/styles/global.css 中通过 CSS 变量调整
授权与来源资料
使用条件与限制
免费使用 · 保留许可声明本次收录的是公开仓库中采用 MIT 许可的免费版本;免费范围为该版本代码,不代表外部服务或第三方素材免费。
使用时需要遵守
- 允许免费使用、修改、商用和分发该版本代码。
- 分发代码副本或实质性部分时,保留原作者版权声明和完整 MIT 许可声明。
- 代码按现状提供;担保与责任限制以原许可证及适用法律为准。
额外费用与待核对事项
- 使用该主题需要本地安装 Node.js 22.12.0 或更高版本,低于此版本无法运行开发与构建命令。
- 构建产物为静态文件,需自行部署到 Netlify、Vercel 或 GitHub Pages 等托管平台,域名与托管服务可能产生额外费用。
- 图标依赖 Iconify 的 Material Design Icons 图标集,使用前应自行核对该图标集的许可条款。
- 示例头像等演示素材需替换为自己的图片,并自行确认所用素材的授权情况。
- 演示图片、字体、图标及其他第三方素材需按各自许可核对,不能仅凭代码的 MIT 许可判断。
- 域名、托管、数据库、支付或 AI 等外部服务可能另外收费。
查看原文依据
Permission is hereby granted, free of charge
许可证原文
Make sure you have **Node.js >= 22.12.0** installed on your system.
README 原文
The optimized static build outputs to the `./dist/` directory, ready to be deployed to Netlify, Vercel, or GitHub Pages.
README 原文
*Note: Icons are imported via the [Iconify Material Design Icons (MDI)](https://icon-sets.iconify.design/mdi/) set.*
README 原文
https://github.com/kuscadev/Zahit/blob/main/LICENSEhttps://github.com/kuscadev/Zahit/blob/main/README.mdavatar: '/profile.jpg', // Place your avatar in the /src/assets folder
README 原文
DeepSeek 根据仓库许可证和 README 整理 ·2026-10-02。结果仅覆盖已读取资料,依赖、图片、字体及后续条款变更以各自原文为准。
项目核对记录与介绍依据
模板资料
- 来源平台
- GitHub
- 资料与维护参考分
- 资料较完整 · 83 / 100
- 技术栈
- Astro
- 网站类型
- 博客
这个分数如何计算
本站按许可资料(最高30分)、演示链接(12分)、预览图(10分)、Star数(15分)、记录的维护时间(15分)、描述完整度(8分)、功能记录(5分)和分类资料(5分)计算。它不是代码、安全或性能测试,也不是 Google 评分;有链接不代表已实测可用。
这个项目需要核对什么
- 记录的仓库更新时间
- 2026-06-03
- 截图检查日期
- 2026-10-02
已收录演示链接。请用你的内容与屏幕尺寸检查;有演示不代表表单、认证或支付已经可用。
目录记录的主要技术栈是 Astro。请通过依赖清单和锁文件核对实际版本与托管要求。这些说明基于收录资料,不代表代码审计或部署实测。
查看具体选型方法 →介绍的制作与核对状态
介绍由 AI 辅助整理目录与仓库资料。仓库作者不等于这篇介绍的审核者。
已完成服务器许可规则与 AI 来源核对;未经过人工编辑审核。
查看当时使用的来源资料
SHA-256: 125135bbe6f0ab36b8d532153e7f31b265489badbb882ec2810bdc186230ce10
2026-10-02T20:55:56.554Z
来源文件 / 仓库# 🪐 Zahit — Minimalist & Raw Astro v6 Portfolio Blog Theme
<div align="center">
<img src="public/zahit.png" alt="Zahit Theme Logo" width="100" style="margin-bottom: 15px;" />
<p><em>"Simplicity is depth, not lack."</em></p>
[](https://astro.build)
[](https://mdxjs.com)
[](https://github.com/kuscadev/Zahit)
[](https://astro-zahit.netlify.app)
[](https://nodejs.org)
[](LICENSE)
</div>
---
**Zahit** is a raw, flat minimalist **Astro v6** portfolio & blog theme built on the philosophy that simplicity is depth. Stripping away unnecessary widgets, heavy frameworks, and digital clutter, Zahit closes the gap between the writer and the reader, presenting a clean, content-first canvas optimized for developers, system administrators, and thinkers.
The theme features a cohesive, premium dark design system using a deep space blue background (`#00022b`), highlighted by vibrant ice-blue accents (`#4fa5d8`) and optimized ice-blue tinted text (`#daeaff`) for exceptional high-contrast reading comfort.
🔗 **Live Demo:** [https://astro-zahit.netlify.app](https://astro-zahit.netlify.app)
---
## 🚀 Core Features
Despite its ultra-minimalist appearance, Zahit is packed with highly refined, modern engineering features:
### 🌐 1. Advanced i18n & Smart Translation Mapping
* **Bilingual Routing:** Built-in internationalization (i18n) support for Turkish (`tr` as default) and English (`en` as secondary). Using Astro's localized routing rules with `prefixDefaultLocale: false` means Turkish resides at the root `/` path, and English pages are served under `/en/`.
* **Smart Post Redirects:** The language switcher in [`Header.astro`](src/components/Header.astro) is dynamically mapped. If you are reading a localized blog post and click the language switcher, it looks up the corresponding translated post in the other language using a shared `translationKey` frontmatter value (e.g., `/tr/blog/kodun-estetigi/` redirects straight to `/en/blog/aesthetics-of-code/`). If no translation exists, it gracefully redirects to the target language's `/archive/` page.
### 📅 2. Dynamic Year-Grouped Archive
* **Year-Based Grouping:** Posts on the [`archive.astro`](src/pages/%5Blang%5D/archive.astro) page are dynamically grouped by their publication year (`2026`, `2025`, etc.) on compile time.
* **Fluid Hover Interactions:** Features smooth minimalist transitions where links slide slightly to the right (`translateX`) on hover for an interactive, modern look.
### 📑 3. ScrollSpy-Enabled Dynamic Table of Contents (ToC)
* **Heading Scanner:** The [`BlogPost.astro`](src/layouts/BlogPost.astro) layout dynamically parses `h2` and `h3` heading elements inside your MDX file.
* **Active State Tracker:** A native, lightweight scroll-event listener tracks the reader's viewport scrolling location, dynamically applying an `.active` class to the current section inside the sticky Table of Contents sidebar.
### 📋 4. One-Click Code Clipboard Copier
* **Hover Copy Button:** A copy button seamlessly overlays code blocks (`pre`) on hover.
* **Visual Confirmation:** Tapping the copy button instantly copies the code block to the user's clipboard and switches icons to an animated confirmation checkmark with a transient highlight, resetting back after 2 seconds.
### 📱 5. Responsive Profile Sidebar
* **Sticky Layout:** The profile panel floats as a sticky sidebar on large desktop monitors, keeping author details and social links readily available.
* **Mobile-Optimized Layout:** Under `860px` screen widths, the author's avatar is automatically hidden via CSS media queries (`@media (max-width: 859px) { .avatar { display: none; } }`) to conserve vertical space and eliminate mobile distractions.
### ⚡ 6. Locale-Aware 404 Page
* **Path Detection:** The universal [`404.astro`](src/pages/404.astro) page extracts the current language context from the URL path. It then renders localized error messages and provides contextual Turkish or English buttons directing users back to `/home` or `/archive`.
---
## 🛠️ Tech Stack
* **Astro v6.3+** — Modern, component-based static site generator with zero client-side JS by default.
* **MDX Integration** — Markdown extension that allows importing interactive components and structures inside posts.
* **Astro-Icon** — Highly optimized SVG icon wrapper supporting Iconify icon packs.
* **Pure CSS Design System** — Built purely on top of local CSS variables (`global.css`) without bloated utility frameworks.
---
## 📁 Repository Structure
```text
Zahit/
├── public/ # Static assets (favicons, profile graphics)
│ ├── favicon.svg # The vector logo used across the site
│ └── profile.jpeg # Desktop sidebar avatar picture
├── src/
│ ├── components/ # Reusable Astro UI components
│ │ ├── BaseHead.astro # Site meta tags, SEO setup, and font loaders
│ │ ├── Footer.astro # Minimal footer links
│ │ ├── Header.astro # Header layout, logo, and smart i18n switcher
│ │ └── Profile.astro # Author info and social link matrix
│ ├── layouts/ # Page shell layouts
│ │ ├── BaseLayout.astro # Core HTML viewport shell
│ │ └── BlogPost.astro # Blog layout with ToC, ScrollSpy, and Clipboard Copy
│ ├── i18n/ # Translation configuration
│ │ ├── ui.ts # Localized translation dictionary keys
│ │ └── utils.ts # Translation route parsers and slug resolvers
│ ├── pages/ # Page routes (File-based Routing)
│ │ ├── [lang]/ # Localized routes (Home, Archive)
│ │ │ ├── blog/
│ │ │ │ └── [...slug].astro # Dynamic blog posts resolver
│ │ │ ├── archive.astro
│ │ │ └── index.astro
│ │ ├── en/
│ │ │ └── about.astro # English "About Me" page
│ │ ├── tr/
│ │ │ └── about.astro # Turkish "Hakkımda" page
│ │ ├── 404.astro # Universal i18n-aware 404 page
│ │ └── index.astro # Root entry route (Redirects to /tr/)
│ ├── styles/ # Styling architecture
│ │ └── global.css # Color scheme tokens, resets, & typography
│ ├── content/ # Content directories
│ │ └── blog/
│ │ ├── en/ # English posts (.mdx / .md)
│ │ └── tr/ # Turkish posts (.mdx / .md)
│ ├── content.config.ts # Astro collections schema schema definitions
│ └── config.ts # Core site variables, bio, and social listings
├── astro.config.mjs # Astro configuration with MDX and i18n routing
├── package.json # Project dependencies and operational scripts
└── tsconfig.json # TypeScript definitions
```
---
## ⚡ Getting Started
Run Zahit locally in just a few steps. Make sure you have **Node.js >= 22.12.0** installed on your system.
**1. Clone the repository:**
```bash
git clone https://github.com/kuscadev/Zahit.git
cd Zahit
```
**2. Install dependencies:**
```bash
npm install
```
**3. Run the local development server:**
```bash
npm run dev
```
Open [http://localhost:4321](http://localhost:4321) in your browser to preview your site.
**4. Build for production:**
```bash
npm run build
```
The optimized static build outputs to the `./dist/` directory, ready to be deployed to Netlify, Vercel, or GitHub Pages.
**5. Preview your build locally:**
```bash
npm run preview
```
---
## ⚙️ Configuration & Customization Guide
Make Zahit your own by customizing these key configuration scopes:
### 👤 1. Set Your Bio & Socials: `src/config.ts`
Personalize the site metadata, biography, avatar, and social links in [`src/config.ts`](src/config.ts):
```typescript
export const SITE_CONFIG = {
title: 'Zahit',
description: 'A raw, flat minimalist theme built on the philosophy that simplicity is depth.',
url: 'https://zahit.dev',
};
export const AUTHOR = {
name: 'John Doe',
role: {
tr: 'Yazar | Geliştirici | Düşünür',
en: 'Writer | Developer | Thinker',
},
bio: {
tr: 'Teknik konuları sade bir dille anlatan bağımsız bir yazarım. Projelerimi ve düşüncelerimi burada paylaşıyorum.',
en: 'An independent writer who explains technical topics in plain language. I share my projects and thoughts here.',
},
avatar: '/profile.jpg', // Place your avatar in the /src/assets folder
};
export const SOCIALS = [
{ label: 'Mail', href: 'mailto:[email protected]', icon: 'mdi:email' },
{ label: 'GitHub', href: 'https://github.com/johndoe', icon: 'mdi:github' },
// Add additional channels by mimicking this schema
];
```
*Note: Icons are imported via the [Iconify Material Design Icons (MDI)](https://icon-sets.iconify.design/mdi/) set.*
---
### ✍️ 2. Writing Linked Bilingual Blog Posts
To leverage Zahit's bilingual matching feature, place the post files in the respective locale directories and bind them together with a matching `translationKey`:
1. **Add your files under the content directory:**
* Turkish draft: `src/content/blog/tr/sadelik.mdx`
* English draft: `src/content/blog/en/simplicity.mdx`
2. **Specify matching `translationKey` parameters in both frontmatters:**
Provide the exact same key in both files so the smart language switcher in the header knows they are translated versions of each other.
#### Turkish Post Frontmatter Example (`src/content/blog/tr/sadelik.mdx`):
```markdown
---
title: 'Sadelik, Eksiklik Değil Derinliktir'
description: 'Minimalizmin anlamı ve Zahit temasının temel felsefesi.'
pubDate: '2026-05-16'
tags: ['minimalizm', 'tasarim', 'felsefe']
translationKey: 'simplicity-post' # MUST match the English post key exactly
---
Türkçe içeriğinizi buraya yazın...
```
#### English Post Frontmatter Example (`src/content/blog/en/simplicity.mdx`):
```markdown
---
title: 'Simplicity is Depth, Not Lack'
description: 'Discover the meaning of minimalism, the core philosophy of the Zahit theme.'
pubDate: '2026-05-16'
tags: ['minimalism', 'design', 'philosophy']
translationKey: 'simplicity-post' # MUST match the Turkish post key exactly
---
Write your English content here...
```
---
### 🎨 3. Customize Colors & Themes: `src/styles/global.css`
Zahit is entirely customized using CSS variables. Change the theme colors, typography, or grid width in [`src/styles/global.css`](src/styles/global.css):
```css
:root {
/* Color Palette Variables */
--bg-color: #00022b; /* Deep Space Blue Background */
--dark: #010e54; /* Section dark accenting blocks */
--accent: #0855b1; /* Primary accent color (Links, borders) */
--light: #4fa5d8; /* Brighter accent blue for hovering states */
--text-color: #daeaff; /* Soft ice-blue text tint for superior reading readability */
/* Typography Variables */
--font-family-body: 'Source Sans 3', sans-serif;
--font-family-heading: 'Source Sans 3', sans-serif;
/* Global Widths */
--site-width: 80%; /* Global responsive container width */
--content-padding: 2rem;
/* Transition timings */
--transition-speed: 0.2s;
}
```
---
### 🗣️ 4. Edit Menu Labels: `src/i18n/ui.ts`
Customize translation dictionary labels or add extra languages in [`src/i18n/ui.ts`](src/i18n/ui.ts):
```typescript
export const languages = {
tr: 'Türkçe',
en: 'English',
};
export const defaultLang = 'tr';
export const ui = {
tr: {
'nav.home': 'Ana Sayfa',
'nav.about': 'Hakkında',
'nav.archive': 'Arşiv',
'toc.title': 'İçindekiler',
// ...other TR definitions
},
en: {
'nav.home': 'Home',
'nav.about': 'About',
'nav.archive': 'Archive',
'toc.title': 'Contents',
// ...other EN definitions
},
} as const;
```
---
## 📜 License
This project is open-source and licensed under the [MIT License](LICENSE).
---
<div align="center">
<p><em>Minimal. Practical. Worth Sharing.</em></p>
<p>Developed with passion by <strong><a href="https://github.com/kuscadev">kuscadev</a></strong></p>
</div>
看看同类模板
对比同技术栈与用途的模板,找到更适合的视觉与内容结构。

astrowind
⭕️ AstroWind: A free template using Astro v7 and Tailwind CSS v4. Astro starter theme.
Astro · 博客

astro-paper
A minimal, accessible and SEO-friendly Astro blog theme.
Astro · 博客

fuwari
✨A static blog template built with Astro.
Astro · 博客

Firefly
Firefly 是一款基于 Astro 的静态博客主题,由 CuteLeaf 在 saicaca 的 Fuwari 模板基础上二次开发,主打清新美观的视觉风格。
Astro · 博客

astro-theme-cactus
A simple Astro theme. Use it to create your blog or website.
Astro · 作品集

astrofy
Astrofy is a free and open-source template for your Personal Portfolio Website built with Astro and TailwindCS…
Astro · 作品集
