๐งน Major cleanup and modernization: โข Removed vendors/iCheck/ directory completely โข Eliminated iCheck CSS and JavaScript references from map.html โข Replaced iCheck jQuery initialization with CSS-only styling โข Added modern flat green checkbox/radio styling to custom.scss โข Updated README_CN.md to remove iCheck from scripts list Benefits: โ Reduced vendor dependencies โ Smaller bundle size (removed 4.8KB iCheck + 1.3KB CSS) โ Modern CSS-only solution with same visual appearance โ Better performance (no JavaScript initialization needed) โ Maintains backward compatibility with existing 'flat' classes The new CSS styling provides identical visual appearance to the original iCheck flat green theme but without any JavaScript dependencies.
7.8 KiB
layout, title, nav_order
| layout | title | nav_order |
|---|---|---|
| default | Installation Guide | 2 |
Installation Guide
{: .no_toc }
Complete installation and setup instructions for Gentelella Admin Template {: .fs-6 .fw-300 }
Table of contents
{: .no_toc .text-delta }
- TOC {:toc}
System Requirements
Prerequisites
Before installing Gentelella, ensure you have the following installed:
- Node.js (v16 or higher) - Download here
- npm (comes with Node.js) or yarn package manager
- Git (for cloning the repository)
- A modern code editor (VS Code recommended)
Browser Support
Gentelella supports all modern browsers:
| Browser | Minimum Version |
|---|---|
| Chrome | 88+ |
| Firefox | 85+ |
| Safari | 14+ |
| Edge | 88+ |
| Opera | 74+ |
Note: Internet Explorer is not supported.
Installation Methods
Method 1: Git Clone (Recommended)
This is the recommended method for development and customization:
# Clone the repository
git clone https://github.com/puikinsh/gentelella.git
# Navigate to the project directory
cd gentelella
# Install dependencies
npm install
# Start the development server
npm run dev
Your development server will be running at http://localhost:3000
Method 2: Download ZIP
- Visit GitHub repository
- Click "Code" โ "Download ZIP"
- Extract the ZIP file
- Open terminal in the extracted folder
- Run
npm install - Run
npm run dev
Method 3: npm Package
Install as a dependency in your existing project:
npm install gentelella --save
Method 4: Yarn Package
If you prefer Yarn:
yarn add gentelella
Method 5: Bower (Legacy)
For legacy projects using Bower:
bower install gentelella --save
Project Structure
After installation, your project structure will look like this:
gentelella/
โโโ ๐ docs/ # Documentation files
โโโ ๐ production/ # HTML templates & assets
โ โโโ ๐ index.html # Main dashboard
โ โโโ ๐ form.html # Form examples
โ โโโ ๐ tables.html # Table examples
โ โโโ ๐ charts.html # Chart examples
โ โโโ ๐ [38 more pages] # Complete admin coverage
โ โโโ ๐ images/ # Image assets
โโโ ๐ src/ # Source files
โ โโโ ๐ main-core.js # Core bundle (79KB)
โ โโโ ๐ main.js # Full bundle (779KB)
โ โโโ ๐ main.scss # Styles entry point
โ โโโ ๐ js/ # Custom JavaScript
โ โโโ ๐ scss/ # Custom SASS files
โ โโโ ๐ modules/ # Smart loading modules
โ โโโ ๐ charts.js # Chart libraries (219KB)
โ โโโ ๐ forms.js # Form enhancements (200KB)
โ โโโ ๐ tables.js # DataTables functionality
โ โโโ ๐ dashboard.js # Dashboard widgets
โ โโโ ๐ utils.js # Utility functions
โโโ ๐ dist/ # Production build output
โโโ ๐ scripts/ # Build & optimization tools
โโโ ๐ vendors/ # Third-party libraries
โโโ ๐ vite.config.js # Vite configuration
โโโ ๐ package.json # Dependencies & scripts
โโโ ๐ README.md # Basic documentation
Development Commands
Basic Commands
# Start development server with hot reload
npm run dev
# Build for production
npm run build
# Preview production build locally
npm run preview
Advanced Commands
# Build with bundle analysis
npm run build:analyze
# Performance optimization analysis
npm run optimize
# SASS compilation only
npm run sass:watch
# JavaScript linting
npm run lint
# Code formatting
npm run format
Configuration
Environment Setup
-
Development Environment
npm run dev- Hot reload enabled
- Source maps available
- All modules loaded for development
-
Production Environment
npm run build npm run preview- Optimized bundles
- Minified assets
- Smart code splitting
Vite Configuration
The template includes an optimized vite.config.js with:
- Entry Points: All 42 HTML files configured
- Code Splitting: Automatic vendor/app separation
- Asset Optimization: Images, fonts, and static files
- Development Features: Hot reload, source maps
- Production Optimizations: Minification, compression
SASS Configuration
SASS is configured in src/main.scss:
// Modern @use syntax (recommended)
@use "bootstrap/scss/bootstrap";
@use "./scss/custom.scss";
// Legacy @import syntax (deprecated but still works)
// @import "bootstrap/scss/bootstrap";
// @import "./scss/custom.scss";
Verification
Check Installation
After installation, verify everything is working:
-
Start the development server:
npm run dev -
Open your browser and navigate to
http://localhost:3000 -
You should see the Gentelella dashboard
Test All Pages
Navigate through different pages to ensure all modules load correctly:
- Dashboard pages (index.html, index2.html, index3.html)
- Form pages (form.html, form_advanced.html, form_validation.html)
- Table pages (tables.html, tables_dynamic.html)
- Chart pages (chartjs.html, chartjs2.html, chart3.html)
Performance Check
Run the optimization analysis:
npm run optimize
This will show you:
- Bundle sizes
- Loading times
- Optimization recommendations
Troubleshooting
Common Issues
1. Node.js Version Issues
Error: npm ERR! engine Unsupported engine
Solution: Update Node.js to version 16 or higher:
# Check current version
node --version
# Update Node.js from https://nodejs.org/
2. Port Already in Use
Error: Port 3000 is already in use
Solution: Either stop the conflicting process or use a different port:
# Use different port
npm run dev -- --port 3001
3. SASS Compilation Errors
Error: SASS deprecation warnings
Solution: These are mainly from Bootstrap internal files and can be safely ignored. Our project code uses modern SASS syntax.
4. Module Not Found
Error: Cannot resolve module
Solution: Clear cache and reinstall:
# Delete node_modules and package-lock.json
rm -rf node_modules package-lock.json
# Reinstall dependencies
npm install
5. Build Failures
Error: Build process fails
Solution: Check for file permission issues and ensure all dependencies are installed:
# Clear cache
npm cache clean --force
# Reinstall
npm install
# Try building again
npm run build
Getting Help
If you encounter issues not covered here:
- Check GitHub Issues: github.com/puikinsh/gentelella/issues
- Create New Issue: Provide detailed error messages and system information
- Community Support: Join discussions on GitHub
- Documentation: Check other sections of this documentation
Next Steps
After successful installation:
- [Configuration Guide]({{ site.baseurl }}/docs/configuration/) - Customize the template
- [Components Overview]({{ site.baseurl }}/docs/components/) - Explore available components
- [Performance Guide]({{ site.baseurl }}/docs/performance/) - Optimize your build
- [Customization]({{ site.baseurl }}/docs/customization/) - Add your own styles and features
{: .highlight }
๐ก Pro Tip: Use npm run dev during development for the best experience with hot reload and source maps. Only use npm run build when you're ready to deploy to production.