Modern, high-performance CDN hosting JavaScript libraries, utilities, and CSS for blog projects.
/v1/ and /v2/ endpointsProvides buttery-smooth scrolling behavior with pulse algorithm.
<script src="https://cdn.duyet.net/v2/js/smooth-scroll.min.js"></script>
Features:
prefers-reduced-motionConfiguration:
// Optional: Configure before script loads
window.smoothScrollOptions = {
frameRate: 300,
animationTime: 1000,
stepSize: 85,
pulseAlgorithm: true,
keyboardSupport: true,
respectReducedMotion: true
};
// Or configure after loading
SmoothScroll.configure({
animationTime: 800
});
Modern image lazy loading with IntersectionObserver.
<script src="https://cdn.duyet.net/v2/js/lazyload.min.js"></script>
<!-- In your HTML -->
<img class="lazy"
data-src="image.jpg"
data-srcset="image-400w.jpg 400w, image-800w.jpg 800w"
alt="Description">
Features:
API:
// Refresh for dynamically added images
LazyLoad.refresh();
// Load all images immediately
LazyLoad.loadAll();
// Configure
LazyLoad.configure({
selector: 'img.lazy',
rootMargin: '50px',
threshold: 0.01
});
Displays Blogger/Blogspot recent posts without document.write().
<div id="recent-posts-widget"></div>
<script src="https://cdn.duyet.net/v2/js/recent-posts.min.js"></script>
<script src="YOUR_BLOG_URL/feeds/posts/default?alt=json-in-script&callback=showRecentPosts"></script>
Configuration:
window.recentPostsConfig = {
numposts: 5,
showpostdate: true,
showpostsummary: true,
numchars: 100,
containerId: 'recent-posts-widget'
};
<script src="https://cdn.duyet.net/react-dnd/dist/ReactDnD.min.js"></script>
<script src="https://cdn.duyet.net/react-tags/dist/ReactTags.min.js"></script>
<script src="https://cdn.duyet.net/Draft/Draft.js"></script>
<script src="https://cdn.duyet.net/code-prettify/loader/run_prettify.js"></script>
<link rel="stylesheet" href="https://cdn.duyet.net/prettify_skin.css">
Simply include the scripts in your HTML:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>My Blog</title>
</head>
<body>
<!-- Your content -->
<img class="lazy" data-src="image.jpg" alt="Lazy loaded">
<!-- Include CDN scripts -->
<script src="https://cdn.duyet.net/v2/js/smooth-scroll.min.js"></script>
<script src="https://cdn.duyet.net/v2/js/lazyload.min.js"></script>
</body>
</html>
git clone https://github.com/duyet/cdn.duyet.net.git
cd cdn.duyet.net
npm install
npm run build
dist/ directory with your web server.# Install dependencies
npm install
# Start development server
npm run dev
# Run tests
npm test
# Run tests with UI
npm run test:ui
# Run linting
npm run lint
# Format code
npm run format
# Build for production
npm run build
# Preview production build
npm run preview
cdn.duyet.net/
├── src/ # Modern source files
│ ├── smooth-scroll.js # Smooth scrolling library
│ ├── lazyload.js # Image lazy loading
│ └── recent-posts.js # Blog widget
├── v1/ # Version 1 API (stable)
│ ├── js/
│ └── css/
├── v2/ # Version 2 API (current)
│ ├── js/
│ └── css/
├── code-prettify/ # Google Code Prettify
├── Draft/ # Draft.js editor
├── react-dnd/ # React DnD library
├── react-tags/ # React Tags input
├── .github/ # GitHub Actions workflows
├── vite.config.js # Vite configuration
├── package.json # Dependencies & scripts
├── _headers # Cache & security headers
└── README.md # This file
Contributions are welcome! Please read CONTRIBUTING.md for details.
git checkout -b feature/amazing-feature)git commit -m 'Add amazing feature')git push origin feature/amazing-feature)This project is licensed under the MIT License - see the LICENSE file for details.
See CHANGELOG.md for version history and updates.
Made with ❤️ by Duyet