A modern, secure, accessible sitemap aggregator for all duyet.net domains
- β‘ 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
- π 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.
- π 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
- π 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
- π TypeScript-ready - Type checking with JSDoc
- π§Ή ESLint + Prettier - Code quality and formatting
- π GitHub Actions - Automated CI/CD pipeline
- π Comprehensive Documentation
- Build Tool: Vite 5
- Framework: Vanilla JavaScript (ES6+)
- CSS Framework: Bootstrap 5.3
- Package Manager: npm
- Code Quality: ESLint, Prettier
- CI/CD: GitHub Actions
- Node.js >= 18.0.0
- npm >= 9.0.0
# 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# Start development server with HMR
npm run dev
# The site will be available at http://localhost:3000# Create optimized production build
npm run build
# Preview production build locally
npm run preview# Run linter
npm run lint
# Format code
npm run format
# Type check
npm run type-checksitemap.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
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.0Edit 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" }
]
}
]The project includes a GitHub Actions workflow that automatically builds and deploys to GitHub Pages on push to main.
# Build for production
npm run build
# The dist/ folder contains the production-ready files
# Deploy the contents to your hosting serviceSimply connect your repository and these platforms will automatically detect the Vite configuration.
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.
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Van-Duyet Le
- Website: duyet.net
- GitHub: @duyetdev
- Email: me@duyet.net
- 10x faster builds
- Hot Module Replacement
- Modern JavaScript features
- Better developer experience
- Removed jQuery dependency (50KB saved)
- Modern vanilla JavaScript with ES6+
- Bootstrap 3 β Bootstrap 5
- Old Google Analytics β GA4
- Moved API keys to environment variables
- Added Content Security Policy
- Implemented Subresource Integrity
- All HTTP links converted to HTTPS
- Dark mode support
- PWA capabilities (offline support)
- Improved search with loading states
- Better error handling
- Full accessibility (WCAG 2.1)
- SEO optimizations
- ESLint + Prettier setup
- TypeScript-ready
- GitHub Actions CI/CD
- Automated security audits
Version 2.0.0 - Built with β€οΈ by Van-Duyet Le