A modern novel reader web application clone built with Astro for Cloudflare Pages deployment.
- 📚 Novel browsing by genre, popularity, and latest updates
- 📖 Clean reading experience with customizable font size and line height
- 🌙 Dark/Light mode toggle
- 🔍 Search functionality
- 📱 Fully responsive design
- ⚡ Static site generation for fast performance
- Framework: Astro 5.x
- Styling: CSS with CSS Custom Properties (variables)
- Deployment: Cloudflare Pages (static)
novel-reader/
├── src/
│ ├── components/
│ │ ├── Header.astro
│ │ ├── Footer.astro
│ │ └── NovelCard.astro
│ ├── data/
│ │ └── novels.ts # Sample novel data
│ ├── layouts/
│ │ └── Layout.astro
│ ├── pages/
│ │ ├── index.astro # Homepage
│ │ ├── latest.astro # Latest updates
│ │ ├── popular.astro # Popular novels
│ │ ├── completed.astro # Completed novels
│ │ ├── search.astro # Search page
│ │ ├── genre/
│ │ │ └── [genre].astro # Genre listing
│ │ └── novel/
│ │ ├── [id].astro # Novel detail
│ │ └── [id]/
│ │ └── [chapter].astro # Chapter reader
│ └── styles/
│ └── global.css
├── public/
│ └── favicon.svg
├── astro.config.mjs
├── package.json
└── tsconfig.json
- Node.js 18+ or Bun
- npm, yarn, pnpm, or bun
# Clone the repository
git clone <your-repo-url>
cd novel-reader
# Install dependencies
bun install
# or
npm install
# Start development server
bun run dev
# or
npm run devbun run build
# or
npm run buildThe static files will be generated in the dist/ directory.
-
Build the project locally:
bun run build
-
Go to Cloudflare Dashboard
-
Navigate to Pages > Create a project
-
Select "Direct Upload"
-
Upload the
dist/folder
- Push this repository to GitHub/GitLab
- Go to Cloudflare Dashboard
- Navigate to Pages > Create a project
- Select "Connect to Git"
- Choose your repository
- Configure build settings:
- Build command:
npm run buildorbun run build - Build output directory:
dist - Root directory:
/(or your project folder)
- Build command:
Create a wrangler.toml file if needed:
name = "novel-reader"
compatibility_date = "2024-01-01"
pages_build_output_dir = "dist"Edit src/data/novels.ts to add more novels:
export const novels: Novel[] = [
{
id: 'your-novel-id',
title: 'Your Novel Title',
author: 'Author Name',
cover: 'https://example.com/cover.jpg',
description: 'Novel description...',
genres: ['Fantasy', 'Action'],
status: 'Ongoing',
rating: 4.5,
views: 100000,
chapters: [],
createdAt: '2024-01-01',
updatedAt: '2024-12-01'
},
// ... more novels
];Global CSS variables are defined in src/styles/global.css:
:root {
--accent-primary: #6366f1;
--bg-primary: #ffffff;
--text-primary: #1a1a1a;
/* ... more variables */
}This project is for educational purposes. The design is inspired by MangaBooth's NovelReader theme.
- Design inspired by MangaBooth NovelReader
- Built with Astro
- Deployed on Cloudflare Pages