GitLab Pages Deployment Guide
This documentation site is deployed to GitLab Pages using Docusaurus.
Quick Deployment Stepsโ
1. Enable GitHub Pagesโ
- Go to your repository on GitLab
- Click on Settings tab
- Scroll down to Pages section
- Under Source, select Deploy from a branch
- Choose
masterbranch and/folder - Click Save
2. Configure Docusaurusโ
Update docusaurus.config.js with your project details:
url: 'https://chipatrade.gitlab.io',
baseUrl: '/chipadevorg/BinaryOptionsTools-v2/',
organizationName: 'chipadevorg',
projectName: 'BinaryOptionsTools-v2',
3. Deployโ
The site is automatically deployed via GitLab CI on push to master branch.
Manual deployment:
npm run build
npm run deploy
4. Custom Domain (Optional)โ
- Add a
CNAMEfile tostatic/folder with your domain:your-domain.com - Configure DNS settings with your domain provider
GitLab CI Workflowโ
The deployment is handled by .gitlab-ci.yml:
stages:
- build
pages:
stage: build
image: node:20-bookworm
script:
- npm ci
- npm run build
artifacts:
paths:
- public
only:
- master
Features Enabledโ
- โ Responsive Design - Works on desktop, tablet, and mobile
- โ Dark/Light Mode - Choose your preferred viewing theme
- โ Search - Full-text search via Algolia DocSearch
- โ Versioned Docs - Maintain documentation for multiple versions
- โ Internationalization - Ready for multi-language support
- โ SEO Optimized - Sitemap, meta tags, Open Graph
File Structureโ
docs/
โโโ intro.md # Homepage
โโโ overview.md # Documentation overview
โโโ api/ # API Reference
โโโ guides/ # Trading guides
โโโ architecture/ # Architecture docs
โโโ examples/ # Code examples
โโโ tutorials/ # Step-by-step tutorials
โโโ project/ # Project info
โโโ docusaurus.config.js # Docusaurus configuration
โโโ sidebars.js # Sidebar navigation
โโโ package.json # Dependencies
โโโ src/
โ โโโ css/
โ โโโ custom.css # Custom styles
โโโ static/
โโโ img/ # Images
โโโ CNAME # Custom domain (optional)
Customizationโ
Colorsโ
Edit CSS custom properties in src/css/custom.css:
:root {
--ifm-color-primary: #4f46e5;
--ifm-color-primary-dark: #4338ca;
--ifm-color-primary-darker: #3730a3;
--ifm-color-primary-darkest: #312e81;
--ifm-color-primary-light: #6366f1;
--ifm-color-primary-lighter: #818cf8;
--ifm-color-primary-lightest: #a5b4fc;
}
Contentโ
- Edit markdown files in
docs/for content changes - Modify
sidebars.jsfor navigation structure - Update
docusaurus.config.jsfor site configuration
Troubleshootingโ
Site not loading?โ
- Check if GitLab Pages is enabled in repository settings
- Ensure the branch and folder are correctly selected (master / public)
- Wait 5-10 minutes for changes to propagate
- Check GitLab CI build logs
Styles not loading?โ
- Check file paths in HTML files
- Ensure all CSS files are properly imported
- Verify baseUrl in docusaurus.config.js
Build failing?โ
- Check Node.js version (requires 18+)
- Run
npm cito reinstall dependencies - Check for markdown syntax errors
Performance Tipsโ
- Images: Add optimized images to
static/img/ - Caching: GitHub Pages automatically handles caching
- CDN: GitHub Pages uses a global CDN
- Minification: Docusaurus minifies CSS/JS in production
Analytics Integrationโ
Add Google Analytics by updating docusaurus.config.js:
themeConfig: {
// ...
gtag: {
trackingID: 'GA_MEASUREMENT_ID',
anonymizeIP: true,
},
}
Supportโ
For issues with the documentation site:
- Check this deployment guide
- Verify all file paths are correct
- Test locally with
npm run start - Check GitHub Actions build logs in repository Actions tab