|
| 1 | +# GitHub Pages Deployment Guide |
| 2 | + |
| 3 | +## Quick Deployment Steps |
| 4 | + |
| 5 | +### 1. Enable GitHub Pages |
| 6 | +1. Go to your repository on GitHub |
| 7 | +2. Click on **Settings** tab |
| 8 | +3. Scroll down to **Pages** section |
| 9 | +4. Under **Source**, select **Deploy from a branch** |
| 10 | +5. Choose **main** branch and **/docs** folder |
| 11 | +6. Click **Save** |
| 12 | + |
| 13 | +### 2. Update Configuration |
| 14 | +Before deploying, update these values in the documentation: |
| 15 | + |
| 16 | +#### In `_config.yml`: |
| 17 | +```yaml |
| 18 | +url: "https://yourusername.github.io" |
| 19 | +baseurl: "/your-repository-name" |
| 20 | +``` |
| 21 | +
|
| 22 | +#### Replace placeholders: |
| 23 | +- `yourusername` → Your GitHub username |
| 24 | +- `your-repository-name` → Your actual repository name |
| 25 | +- `your-google-site-verification-code` → Your Google Search Console verification code |
| 26 | +- `your-bing-site-verification-code` → Your Bing Webmaster verification code |
| 27 | + |
| 28 | +### 3. Test Locally (Optional) |
| 29 | +```bash |
| 30 | +cd docs |
| 31 | +python -m http.server 8000 |
| 32 | +# Open http://localhost:8000 in your browser |
| 33 | +``` |
| 34 | + |
| 35 | +### 4. Custom Domain (Optional) |
| 36 | +1. Add a `CNAME` file to the docs folder with your domain: |
| 37 | + ``` |
| 38 | + your-domain.com |
| 39 | + ``` |
| 40 | +2. Configure DNS settings with your domain provider |
| 41 | + |
| 42 | +## Features Enabled |
| 43 | + |
| 44 | +✅ **Purple Theme** - Modern glassmorphism design with purple color scheme |
| 45 | +✅ **Multi-language Support** - Python, JavaScript, and Rust documentation |
| 46 | +✅ **Interactive Examples** - Live code examples with syntax highlighting |
| 47 | +✅ **Responsive Design** - Mobile-friendly navigation and layouts |
| 48 | +✅ **SEO Optimized** - Complete sitemap.xml and meta tags |
| 49 | +✅ **Performance Optimized** - GPU-accelerated animations and lazy loading |
| 50 | +✅ **Bot Services Integration** - chipa.tech bot creation services |
| 51 | +✅ **API Documentation** - Complete reference for all languages |
| 52 | +✅ **Copy-to-clipboard** - Easy code copying functionality |
| 53 | +✅ **Search Functionality** - Built-in documentation search |
| 54 | + |
| 55 | +## File Structure |
| 56 | +``` |
| 57 | +docs/ |
| 58 | +├── index.html # Homepage |
| 59 | +├── python.html # Python documentation |
| 60 | +├── javascript.html # JavaScript documentation |
| 61 | +├── rust.html # Rust documentation |
| 62 | +├── api.html # API reference |
| 63 | +├── examples.html # Interactive examples |
| 64 | +├── sitemap.xml # SEO sitemap |
| 65 | +├── favicon.svg # Site icon |
| 66 | +├── _config.yml # GitHub Pages config |
| 67 | +├── .nojekyll # Skip Jekyll processing |
| 68 | +├── README.md # Documentation guide |
| 69 | +└── assets/ |
| 70 | + ├── css/ |
| 71 | + │ ├── main.css # Main styles |
| 72 | + │ ├── animations.css # Animation library |
| 73 | + │ └── code-highlight.css # Syntax highlighting |
| 74 | + └── js/ |
| 75 | + ├── main.js # Core functionality |
| 76 | + ├── animations.js # Animation controller |
| 77 | + └── code-highlight.js # Code highlighting |
| 78 | +``` |
| 79 | +
|
| 80 | +## Customization |
| 81 | +
|
| 82 | +### Colors |
| 83 | +Edit the CSS custom properties in `assets/css/main.css`: |
| 84 | +```css |
| 85 | +:root { |
| 86 | + --primary-color: #8B5CF6; /* Main purple */ |
| 87 | + --secondary-color: #A855F7; /* Secondary purple */ |
| 88 | + --accent-color: #C084FC; /* Light purple */ |
| 89 | +} |
| 90 | +``` |
| 91 | + |
| 92 | +### Content |
| 93 | +- Edit HTML files directly for content changes |
| 94 | +- Modify JavaScript files for functionality changes |
| 95 | +- Update CSS files for styling changes |
| 96 | + |
| 97 | +## Troubleshooting |
| 98 | + |
| 99 | +### Site not loading? |
| 100 | +1. Check if GitHub Pages is enabled in repository settings |
| 101 | +2. Ensure the branch and folder are correctly selected |
| 102 | +3. Wait 5-10 minutes for changes to propagate |
| 103 | + |
| 104 | +### Styles not loading? |
| 105 | +1. Check file paths in HTML files |
| 106 | +2. Ensure all CSS files are in `assets/css/` |
| 107 | +3. Verify `.nojekyll` file exists |
| 108 | + |
| 109 | +### JavaScript not working? |
| 110 | +1. Check browser console for errors |
| 111 | +2. Ensure all JS files are in `assets/js/` |
| 112 | +3. Verify file paths in HTML files |
| 113 | + |
| 114 | +## Performance Tips |
| 115 | + |
| 116 | +1. **Images**: Add images to `assets/images/` and optimize them |
| 117 | +2. **Caching**: GitHub Pages automatically handles caching |
| 118 | +3. **CDN**: Consider using a CDN for better global performance |
| 119 | +4. **Minification**: Minify CSS/JS files for production |
| 120 | + |
| 121 | +## Analytics Integration |
| 122 | + |
| 123 | +Add Google Analytics by inserting this code before `</head>` in all HTML files: |
| 124 | +```html |
| 125 | +<!-- Google tag (gtag.js) --> |
| 126 | +<script async src="https://www.googletagmanager.com/gtag/js?id=GA_MEASUREMENT_ID"></script> |
| 127 | +<script> |
| 128 | + window.dataLayer = window.dataLayer || []; |
| 129 | + function gtag(){dataLayer.push(arguments);} |
| 130 | + gtag('js', new Date()); |
| 131 | + gtag('config', 'GA_MEASUREMENT_ID'); |
| 132 | +</script> |
| 133 | +``` |
| 134 | + |
| 135 | +Replace `GA_MEASUREMENT_ID` with your actual Google Analytics measurement ID. |
| 136 | + |
| 137 | +## Support |
| 138 | + |
| 139 | +For issues with the documentation site: |
| 140 | +1. Check this deployment guide |
| 141 | +2. Verify all file paths are correct |
| 142 | +3. Test locally before deploying |
| 143 | +4. Check GitHub Pages build logs in repository Actions tab |
| 144 | + |
| 145 | +Your documentation site is now ready for deployment! 🚀 |
0 commit comments