AstroReact博客企业官网

travelblog-website-template — Astro 博客模板

作者 MasuRii

基于 Astro 与 React 的菲律宾旅行博客模板,采用杂志式编辑排版,内置目的地地图、模糊搜索、深浅色主题与 PWA 支持,内容以结构化数据文件维护。

看看你的网站会是什么样

浏览真实页面截图,比较内容排版与手机效果。点击下方缩略图切换,放大查看整页细节。

3 个预览视图
桌面端首页1 / 3
桌面端截图首屏预览

由服务器浏览器实际访问页面后截取。

全部页面与视图 3

截图用于了解视觉与布局,交互效果请以实际项目为准。

采集于 2026-10-02查看来源

值得关注的模板亮点

从已有项目资料中,快速了解它的特点。

01

全屏 Leaflet 地图,支持自定义分类标记、标记聚合与随主题切换的瓦片样式

02

基于 Fuse.js 的客户端模糊搜索,可快速定位目的地与文章

03

浅色与深色主题切换,并跟随系统偏好设置

04

构建时使用 Sharp 自动处理图片,附带占位图下载与多样性校验脚本

05

提供 JSON-LD 结构化数据、Open Graph 与 Twitter 卡片等 SEO 相关配置

06

包含 PWA 清单与 Service Worker,支持离线访问和安装到桌面

模板详细介绍

这是一个面向菲律宾海滩、岛屿与小众景点的旅行博客模板,整体采用杂志式编辑排版,适合以图文内容为主的旅行记录与目的地展示。页面由 Astro 构建,交互部分使用 React 组件,样式基于 Tailwind CSS,并提供浅色与深色主题切换。

模板包含首页、目的地列表与详情页、博客列表与文章页,以及一个全屏 Leaflet 地图页面,地图支持分类标记与聚合显示。站内搜索基于 Fuse.js 在客户端进行模糊匹配,图片在构建时由 Sharp 处理,并附带打印样式以适配行程单输出。项目还提供 PWA 清单与 Service Worker,用于离线访问和安装到桌面。

内容维护方式为结构化数据:目的地信息存放在 src/data/destinations/ 下的 TypeScript 文件中,新增目的地即新增数据文件。仓库附带占位图片下载与校验脚本、单元测试与端到端测试、可访问性测试,以及 GitHub Pages 与 Vercel 的部署配置。

使用限制方面,模板的示例图片来自 Unsplash 等第三方来源,需按各自许可核对;域名、托管等外部服务可能产生费用。仓库采用 MIT 许可,允许修改与商用该版本代码,但分发时需保留版权与许可声明。

AstroReact博客企业官网

适合你的项目吗?

适用场景

  • 搭建以菲律宾海滩、岛屿和小众景点为主题的旅行博客
  • 为旅行内容创建带地图浏览与分类筛选的目的地展示站点
  • 需要深浅色主题、站内模糊搜索和离线访问能力的图文内容站点
  • 希望以结构化数据文件维护目的地与文章内容,并通过 GitHub Pages 或 Vercel 部署

适合人群

  • 个人旅行博主或旅行内容创作者
  • 需要地图与目的地分类展示的旅行类网站
  • 熟悉 Astro、React 与 TypeScript,并愿意通过数据文件维护内容的开发者
  • 希望使用 MIT 许可模板进行二次修改或商用的项目

上手与定制指南

结合仓库当前版本的说明,按下面的资料检查内容、配置与运行要求。

  1. 1

    需要 Bun(推荐)或 Node.js 18+ 以及 Git;安装依赖后运行开发服务器,默认地址为 http://localhost:4321

  2. 2

    目的地内容存放在 src/data/destinations/ 的 TypeScript 文件中,新增目的地即新增数据文件

  3. 3

    示例图片可通过脚本从 Unsplash 下载,也可替换为自有图片;第三方素材需按各自许可核对

  4. 4

    部署到 GitHub Pages 需在仓库设置中将 Pages 来源设为 GitHub Actions,推送到 main 分支后自动构建部署;也可导入 Vercel 部署

  5. 5

    仓库采用 MIT 许可,分发代码副本或实质性部分时需保留原作者版权声明与完整 MIT 许可声明

查看仓库使用说明

授权与来源资料

使用条件与限制

免费使用 · 保留许可声明

本次收录的是公开仓库中采用 MIT 许可的免费版本;免费范围为该版本代码,不代表外部服务或第三方素材免费。

使用时需要遵守

  • 允许免费使用、修改、商用和分发该版本代码。
  • 分发代码副本或实质性部分时,保留原作者版权声明和完整 MIT 许可声明。
  • 代码按现状提供;担保与责任限制以原许可证及适用法律为准。

额外费用与待核对事项

  • 占位图片来自 Unsplash 等第三方来源,需自行核对并遵守其各自许可,模板的 MIT 许可不涵盖这些素材。
  • 部署到 GitHub Pages 需在仓库设置中手动启用 Pages 并将来源设为 GitHub Actions。
  • 使用 Vercel 部署需注册并导入仓库,托管等外部服务可能产生费用。
  • 演示图片、字体、图标及其他第三方素材需按各自许可核对,不能仅凭代码的 MIT 许可判断。
  • 域名、托管、数据库、支付或 AI 等外部服务可能另外收费。
查看原文依据

Permission is hereby granted, free of charge

许可证原文

Download placeholder images from Unsplash

README 原文

Enable GitHub Pages in repository settings (Settings → Pages → Source: GitHub Actions)

README 原文

Import the repository in [Vercel](https://vercel.com)

README 原文
https://github.com/MasuRii/travelblog-website-template/blob/main/LICENSEhttps://github.com/MasuRii/travelblog-website-template/blob/main/README.md

DeepSeek 根据仓库许可证和 README 整理 ·2026-10-02。结果仅覆盖已读取资料,依赖、图片、字体及后续条款变更以各自原文为准。

项目核对记录与介绍依据

模板资料

来源平台
GitHub
资料与维护参考分
资料较完整 · 88 / 100
技术栈
Astro · React
网站类型
博客 · 企业官网
这个分数如何计算

本站按许可资料(最高30分)、演示链接(12分)、预览图(10分)、Star数(15分)、记录的维护时间(15分)、描述完整度(8分)、功能记录(5分)和分类资料(5分)计算。它不是代码、安全或性能测试,也不是 Google 评分;有链接不代表已实测可用。

这个项目需要核对什么

记录的仓库更新时间
2026-01-17
截图检查日期
2026-10-02

已收录演示链接。请用你的内容与屏幕尺寸检查;有演示不代表表单、认证或支付已经可用。

目录记录的主要技术栈是 Astro。请通过依赖清单和锁文件核对实际版本与托管要求。这些说明基于收录资料,不代表代码审计或部署实测。

查看具体选型方法 →

介绍的制作与核对状态

介绍由 AI 辅助整理目录与仓库资料。仓库作者不等于这篇介绍的审核者。

已完成服务器许可规则与 AI 来源核对;未经过人工编辑审核。

查看当时使用的来源资料

SHA-256: c085f77232bb42cfd2dc2d7e379f1272e80d69ec0429bd4271056c5a67b08ccb

2026-10-02T15:52:38.486Z

来源文件 / 仓库
# Philippine Travel Blog Template

<div align="center">

![Astro](https://img.shields.io/badge/Astro-5.16.9-BC52EE?style=for-the-badge&logo=astro&logoColor=white)
![React](https://img.shields.io/badge/React-19.2.3-61DAFB?style=for-the-badge&logo=react&logoColor=black)
![Tailwind CSS](https://img.shields.io/badge/Tailwind-4.1.18-06B6D4?style=for-the-badge&logo=tailwindcss&logoColor=white)
![TypeScript](https://img.shields.io/badge/TypeScript-5.9.3-3178C6?style=for-the-badge&logo=typescript&logoColor=white)

[![Deploy](https://img.shields.io/github/actions/workflow/status/MasuRii/travelblog-website-template/deploy.yml?branch=main&style=flat-square&logo=github&label=deploy)](https://github.com/MasuRii/travelblog-website-template/actions/workflows/deploy.yml)
[![Version](https://img.shields.io/badge/version-0.1.0-blue?style=flat-square)](package.json)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen?style=flat-square)](CONTRIBUTING.md)

**A high-performance, SEO-optimized travel blog template built with Astro, React, and Tailwind CSS. Specifically designed for showcasing Philippine beaches, islands, and hidden gems with an editorial magazine aesthetic.**

![Screenshot of the Website](public/image.png)

[Live Demo](https://masurii.github.io/travelblog-website-template/) | [Documentation](#documentation) | [Quick Start](#quick-start)

</div>

---

## Features

- **Blazing Fast** - Built with Astro's "Islands Architecture" for zero JavaScript by default
- **Interactive Destinations Map** - Full-page Leaflet map with custom category markers, clustering, and theme-aware tiles
- **Adaptive Theme System** - Seamless light and dark mode with system preference detection
- **Intelligent Search** - Fast, client-side fuzzy search powered by Fuse.js
- **PWA Ready** - Offline support via Service Workers and manifest for app-like installation
- **SEO Optimized** - Complete JSON-LD schema markup and Open Graph/Twitter cards
- **Accessibility First** - WCAG AA compliance verified with axe-core
- **Image Optimization** - Automated build-time image processing using Sharp
- **Print Friendly** - Optimized stylesheets for printing travel itineraries
- **Fully Responsive** - Mobile-first design that looks great on all devices

## Tech Stack

| Category             | Technology                                                                       |
| -------------------- | -------------------------------------------------------------------------------- |
| **Framework**        | [Astro](https://astro.build) v5.16.9                                             |
| **UI Library**       | [React](https://react.dev) v19.2.3                                               |
| **Styling**          | [Tailwind CSS](https://tailwindcss.com) v4.1.18                                  |
| **State Management** | [Nanostores](https://github.com/nanostores/nanostores)                           |
| **Maps**             | [Leaflet](https://leafletjs.com) & [React Leaflet](https://react-leaflet.js.org) |
| **Search**           | [Fuse.js](https://www.fusejs.io) v7.1.0                                          |
| **Image Processing** | [Sharp](https://sharp.pixelplumbing.com) v0.34.5                                 |
| **Testing**          | [Vitest](https://vitest.dev), [Playwright](https://playwright.dev)               |
| **Deployment**       | [GitHub Pages](https://pages.github.com) / [Vercel](https://vercel.com)          |

## Quick Start

### Prerequisites

- [Bun](https://bun.sh) (recommended) or [Node.js](https://nodejs.org) 18+
- [Git](https://git-scm.com)

### Installation

```bash
# Clone the repository
git clone https://github.com/MasuRii/travelblog-website-template.git
cd travelblog-website-template

# Install dependencies
bun install  # or npm install

# Start development server
bun dev  # or npm run dev
```

The site will be available at `http://localhost:4321`

## Commands

All commands are run from the root of the project:

| Command                     | Description                                |
| --------------------------- | ------------------------------------------ |
| `bun install`               | Install dependencies                       |
| `bun dev`                   | Start local dev server at `localhost:4321` |
| `bun build`                 | Build production site to `./dist/`         |
| `bun preview`               | Preview production build locally           |
| `bun run lint`              | Run ESLint for code quality                |
| `bun run format`            | Run Prettier for code formatting           |
| `bun run type-check`        | Run TypeScript type checking               |
| `bun run test`              | Run unit tests with Vitest                 |
| `bun run test:e2e`          | Run E2E tests with Playwright              |
| `bun run test:a11y`         | Run accessibility tests with axe-core      |
| `bun run images:fetch`      | Download placeholder images from Unsplash  |
| `bun run images:validate`   | Validate image diversity                   |
| `bun run data:validate:all` | Validate all data files                    |

## Project Structure

```
travelblog-website-template/
├── public/                    # Static assets (favicon, robots.txt, PWA icons)
├── src/
│   ├── assets/               # Images and fonts
│   │   └── images/           # Destination and placeholder images
│   ├── components/
│   │   ├── Map/              # Map components (FullPageMap, MapCluster, etc.)
│   │   ├── Skeleton/         # Loading skeleton components
│   │   ├── UI/               # UI components (Button, Input, Select)
│   │   ├── Hero.astro        # Landing hero section
│   │   ├── Navigation.tsx    # Header navigation
│   │   ├── Footer.tsx        # Site footer
│   │   ├── QuickSearch.tsx   # Fuzzy search component
│   │   ├── PhotoGallery.tsx  # Image gallery with lightbox
│   │   └── ...               # Other components
│   ├── config/               # Configuration files
│   ├── constants/            # Category definitions
│   ├── data/                 # Destination data files
│   ├── hooks/                # Custom React hooks
│   ├── i18n/                 # Internationalization files
│   ├── layouts/              # Page layouts
│   │   └── BaseLayout.astro  # Main layout with SEO
│   ├── pages/                # Astro pages
│   │   ├── index.astro       # Home page
│   │   ├── map.astro         # Full-page map
│   │   ├── destinations/     # Destination listing and detail pages
│   │   ├── blog/             # Blog listing and post pages
│   │   └── ...               # Other pages
│   ├── store/                # Nanostores state management
│   ├── styles/               # Global CSS
│   ├── types/                # TypeScript type definitions
│   └── utils/                # Utility functions
├── tests/                    # E2E and unit tests
├── scripts/                  # Build and utility scripts
├── .github/workflows/        # GitHub Actions CI/CD
└── package.json
```

## Customization

### Content

Destination data is managed as structured TypeScript files in `src/data/destinations/`. Adding a new destination is as simple as creating a new file and exporting the data object.

### Images

The project includes automated scripts for managing images:

1. Fetch placeholder images: `bun run images:fetch`
2. Validate image diversity: `bun run images:validate`
3. Verify processing: `bun run images:verify`

### Styling

The project uses Tailwind CSS with a custom design system. Key customization points:

- Colors and theme variables in `src/styles/global.css`
- Typography using Playfair Display and Inter fonts
- Component-specific styles in their respective `.astro` and `.tsx` files

## Deployment

This project supports both **GitHub Pages** and **Vercel** deployment:

### GitHub Pages (Automatic)

1. Push your code to GitHub
2. Enable GitHub Pages in repository settings (Settings → Pages → Source: GitHub Actions)
3. The included workflow will automatically build and deploy on every push to `main`
4. Your site will be available at `https://<username>.github.io/<repo-name>/`

### Vercel

1. Push your code to GitHub
2. Import the repository in [Vercel](https://vercel.com)
3. Deploy!

### Other Platforms

For other platforms, run `bun build` and deploy the `dist/` folder.

## Documentation

For detailed information on customizing your travel blog, refer to the [Customization](#customization) section above.

## Contributing

Contributions are welcome! Please read our contributing guidelines before submitting a pull request.

We follow:

- [Conventional Commits](https://www.conventionalcommits.org/) for commit messages
- ESLint and Prettier for code style

---

<div align="center">

**Built with love by [MasuRii](https://github.com/MasuRii)**

If you found this helpful, please consider giving it a star!

[![GitHub stars](https://img.shields.io/github/stars/MasuRii/travelblog-website-template?style=social)](https://github.com/MasuRii/travelblog-website-template)

</div>
反馈内容错误

看看同类模板

对比同技术栈与用途的模板,找到更适合的视觉与内容结构。