Skip to content

duyet-website/sitemap.duyet.net

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

21 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

sitemap.duyet.net

A modern, secure, accessible sitemap aggregator for all duyet.net domains

CI/CD License: MIT

πŸš€ Features

Performance & Modern Stack

  • ⚑ Vite - Lightning-fast build tool with HMR
  • 🎨 Bootstrap 5 - Latest responsive framework
  • πŸ“¦ Zero jQuery - Pure vanilla JavaScript, modern ES6+
  • πŸ”₯ Optimized Bundle - Minified, tree-shaken, and compressed

Security

  • πŸ”’ HTTPS Everywhere - All links use secure protocols
  • πŸ›‘οΈ Content Security Policy - Strict CSP headers
  • πŸ” Subresource Integrity - SRI hashes for external resources
  • 🚫 No Hardcoded Secrets - Environment-based configuration
  • βœ… Security Headers - HSTS, X-Frame-Options, etc.

User Experience

  • πŸŒ“ Dark Mode - Automatic theme detection + manual toggle
  • πŸ” Smart Search - Debounced, with loading states and error handling
  • β™Ώ Accessible - ARIA labels, semantic HTML, keyboard navigation
  • πŸ“± Responsive - Mobile-first design
  • 🎯 PWA Ready - Service worker, offline support, installable

SEO & Analytics

  • πŸ“Š Google Analytics 4 - Privacy-focused tracking
  • πŸ—ΊοΈ sitemap.xml - Search engine optimization
  • πŸ€– robots.txt - Crawler configuration
  • πŸ“ˆ Open Graph - Social media previews
  • 🐦 Twitter Cards - Rich link previews

Developer Experience

  • πŸ“ TypeScript-ready - Type checking with JSDoc
  • 🧹 ESLint + Prettier - Code quality and formatting
  • πŸ”„ GitHub Actions - Automated CI/CD pipeline
  • πŸ“š Comprehensive Documentation

πŸ› οΈ Tech Stack

  • Build Tool: Vite 5
  • Framework: Vanilla JavaScript (ES6+)
  • CSS Framework: Bootstrap 5.3
  • Package Manager: npm
  • Code Quality: ESLint, Prettier
  • CI/CD: GitHub Actions

πŸ“‹ Prerequisites

  • Node.js >= 18.0.0
  • npm >= 9.0.0

πŸš€ Quick Start

Installation

# Clone the repository
git clone https://github.com/duyet-website/sitemap.duyet.net.git
cd sitemap.duyet.net

# Install dependencies
npm install

# Copy environment variables
cp .env.example .env

Development

# Start development server with HMR
npm run dev

# The site will be available at http://localhost:3000

Build for Production

# Create optimized production build
npm run build

# Preview production build locally
npm run preview

Code Quality

# Run linter
npm run lint

# Format code
npm run format

# Type check
npm run type-check

πŸ“ Project Structure

sitemap.duyet.net/
β”œβ”€β”€ .github/
β”‚   └── workflows/
β”‚       └── ci.yml              # GitHub Actions CI/CD
β”œβ”€β”€ public/
β”‚   β”œβ”€β”€ _headers                # Security headers
β”‚   β”œβ”€β”€ manifest.json           # PWA manifest
β”‚   β”œβ”€β”€ robots.txt              # Crawler config
β”‚   β”œβ”€β”€ sitemap.xml             # SEO sitemap
β”‚   └── sw.js                   # Service worker
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ css/
β”‚   β”‚   └── main.css            # Custom styles
β”‚   β”œβ”€β”€ js/
β”‚   β”‚   └── main.js             # Application logic
β”‚   └── index.html              # Main HTML template
β”œβ”€β”€ .env                        # Environment variables (not in git)
β”œβ”€β”€ .env.example                # Environment template
β”œβ”€β”€ .eslintrc.json              # ESLint configuration
β”œβ”€β”€ .prettierrc                 # Prettier configuration
β”œβ”€β”€ package.json                # Dependencies and scripts
β”œβ”€β”€ sitemap.json                # Sitemap data source
β”œβ”€β”€ tsconfig.json               # TypeScript configuration
└── vite.config.js              # Vite configuration

πŸ”§ Configuration

Environment Variables

Create a .env file based on .env.example:

# OpenSearchServer Configuration
VITE_OSS_SERVER=//oss.duyetdev.com
VITE_OSS_API_KEY=your_api_key_here

# Google Analytics (Optional)
VITE_GA_MEASUREMENT_ID=G-XXXXXXXXXX

# Application
VITE_APP_NAME=sitemap.duyet.net
VITE_APP_VERSION=2.0.0

Updating Sitemap

Edit sitemap.json to add or modify links:

[
  {
    "node": "example.duyet.net",
    "url": "https://example.duyet.net",
    "sub": [
      { "node": "About", "url": "https://example.duyet.net/about" },
      { "node": "Contact", "url": "https://example.duyet.net/contact" }
    ]
  }
]

🚒 Deployment

GitHub Pages

The project includes a GitHub Actions workflow that automatically builds and deploys to GitHub Pages on push to main.

Manual Deployment

# Build for production
npm run build

# The dist/ folder contains the production-ready files
# Deploy the contents to your hosting service

Netlify/Vercel

Simply connect your repository and these platforms will automatically detect the Vite configuration.

πŸ”’ Security

This project follows security best practices:

  • βœ… No hardcoded credentials
  • βœ… Content Security Policy
  • βœ… Subresource Integrity
  • βœ… HTTPS enforcement
  • βœ… Regular dependency updates
  • βœ… Automated security audits in CI

Found a security issue? Please email security@duyet.net instead of opening a public issue.

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ‘€ Author

Van-Duyet Le

🎯 What's New in v2.0.0

Migrated from Grunt to Vite

  • 10x faster builds
  • Hot Module Replacement
  • Modern JavaScript features
  • Better developer experience

Complete Rewrite

  • Removed jQuery dependency (50KB saved)
  • Modern vanilla JavaScript with ES6+
  • Bootstrap 3 β†’ Bootstrap 5
  • Old Google Analytics β†’ GA4

Security Enhancements

  • Moved API keys to environment variables
  • Added Content Security Policy
  • Implemented Subresource Integrity
  • All HTTP links converted to HTTPS

New Features

  • Dark mode support
  • PWA capabilities (offline support)
  • Improved search with loading states
  • Better error handling
  • Full accessibility (WCAG 2.1)
  • SEO optimizations

Developer Experience

  • ESLint + Prettier setup
  • TypeScript-ready
  • GitHub Actions CI/CD
  • Automated security audits

Version 2.0.0 - Built with ❀️ by Van-Duyet Le

About

Global sitemap for duyet.net

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors