Getting Started with Your Altafid API Documentation Site
Welcome! This guide will help you set up and customize your professional API documentation site.
π¦ What You Have
Your documentation site includes:
- Professional Pages
index.html- Beautiful landing pagequickstart.html- 5-minute quick start guidedocs.html- Complete API reference
- Styling
assets/css/style.css- Modern, responsive CSS- Mobile-friendly design
- Professional color scheme
- Example Scripts
examples/login.sh- Authentication exampleexamples/create-task.sh- Task creationexamples/search-contact.sh- Contact searchexamples/list-staff.sh- Staff listing- More utility scripts
- Deployment Tools
deploy.sh- Automated deployment scriptDEPLOYMENT.md- Detailed deployment checklistREADME_GITHUB_PAGES.md- GitHub Pages setup guide
π Quick Start (2 Methods)
Method 1: Automated Deployment (Recommended)
1
2
3
4
5
6
7
8
# Navigate to your documentation folder
cd path/to/altafid-api-docs
# Run the deployment script
chmod +x deploy.sh
./deploy.sh
# Follow the prompts
The script will:
- Initialize git repository
- Commit all files
- Push to GitHub
- Optionally configure custom domain
Method 2: Manual Setup
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# 1. Initialize git repository
git init
# 2. Add all files
git add .
# 3. Commit
git commit -m "Initial commit: Altafid API documentation"
# 4. Add remote repository
git remote add origin https://github.com/your-username/altafid-api-docs.git
# 5. Push to GitHub
git branch -M main
git push -u origin main
Then enable GitHub Pages in repository settings.
βοΈ Customization Guide
Step 1: Update Site Information
Edit these files to customize your site:
In all HTML files (index.html, quickstart.html, docs.html):
- Update GitHub repository link:
1
<a href="https://github.com/YOUR-USERNAME/altafid-api-docs">
- Update footer information:
1 2 3
<footer class="footer"> <!-- Update links and contact info --> </footer>
- Update navigation (if needed)
In _config.yml:
1
2
3
title: Your API Name
description: Your description
url: "https://your-domain.com"
Step 2: Customize Colors
Edit assets/css/style.css:
1
2
3
4
5
:root {
--primary-color: #2563eb; /* Change to your brand color */
--primary-dark: #1e40af; /* Darker shade of brand color */
/* ... customize more colors ... */
}
Step 3: Update API Endpoints
In docs.html, update the API base URL and endpoints:
1
<code>https://api.your-domain.com</code>
Step 4: Add Your Logo (Optional)
Replace the text logo in the navbar:
1
2
3
4
5
6
7
8
9
<!-- Before -->
<div class="nav-brand">
<h1>Altafid API</h1>
</div>
<!-- After -->
<div class="nav-brand">
<img src="assets/images/logo.png" alt="Your Logo" height="40">
</div>
π Domain Configuration
Using GitHub Pages Default Domain
Your site will be at: https://your-username.github.io/altafid-api-docs/
No additional configuration needed!
Using Custom Domain
- Create CNAME file:
1
echo "docs.yourdomain.com" > CNAME
-
Configure DNS at your domain provider:
For subdomain (docs.yourdomain.com):
1 2 3
Type: CNAME Host: docs Value: your-username.github.io
For apex domain (yourdomain.com):
1 2 3 4 5
Type: A Host: @ Value: 185.199.108.153 (Repeat for .109, .110, .111)
- Update GitHub Pages settings:
- Go to Settings β Pages
- Enter your custom domain
- Enable βEnforce HTTPSβ
π Content Updates
Adding New Sections
- Open the relevant HTML file
- Add your content using the existing structure
- Update the sidebar navigation
- Commit and push changes
Example:
1
2
3
4
5
<h2 id="new-section">New Section</h2>
<p>Your content here...</p>
<!-- Add to sidebar -->
<li><a href="#new-section">New Section</a></li>
Updating Code Examples
Code blocks use this format:
1
2
3
4
<pre><code class="language-bash">
# Your code here
curl https://api.example.com
</code></pre>
Adding New Pages
- Create a new HTML file (e.g.,
changelog.html) - Copy header/footer from existing pages
- Add your content
- Update navigation in all pages
- Commit and push
π¨ Design Tips
Color Schemes
Professional color combinations:
- Blue/Tech:
#2563eb(primary),#1e40af(dark) - Green/Growth:
#10b981(primary),#059669(dark) - Purple/Creative:
#8b5cf6(primary),#7c3aed(dark) - Orange/Energy:
#f97316(primary),#ea580c(dark)
Typography
Current font stack:
1
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
For code blocks:
1
font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
Responsive Breakpoints
The site is responsive at:
- Mobile: < 480px
- Tablet: < 768px
- Desktop: > 768px
π§ͺ Testing Your Site
Test Locally
Using Python:
1
2
python -m http.server 8000
# Visit http://localhost:8000
Using Node.js:
1
2
npx http-server
# Visit http://localhost:8080
Test Checklist
- All pages load correctly
- Navigation links work
- Code examples are readable
- Mobile view works
- All external links work
- Forms function properly (if any)
- No console errors
π§ Maintenance
Regular Updates
Weekly:
- Check for broken links
- Review user feedback
- Update any changed endpoints
Monthly:
- Full content review
- Update examples
- Check analytics (if enabled)
Quarterly:
- Design review
- Performance optimization
- User survey
Common Tasks
Update API endpoint:
- Edit
docs.html - Find the endpoint section
- Update URL, parameters, or examples
- Test locally
- Commit and push
Add new endpoint:
- Copy existing endpoint structure
- Update content
- Add to sidebar navigation
- Test locally
- Commit and push
π Analytics (Optional)
Adding Google Analytics
Add before closing </head> in all HTML files:
1
2
3
4
5
6
7
<script async src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXXXX"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-XXXXXXXXXX');
</script>
π Troubleshooting
Site Not Loading?
- Check GitHub Pages is enabled
- Verify branch is set to
main - Wait 2-5 minutes for build
- Check Actions tab for errors
CSS Not Loading?
- Verify file path:
assets/css/style.css - Check file exists in repository
- Clear browser cache (Ctrl+Shift+R)
- Check for CSS syntax errors
Custom Domain Issues?
- Verify CNAME file is correct
- Check DNS records
- Wait up to 48 hours for propagation
- Enable HTTPS in settings
π Additional Resources
π‘ Pro Tips
- Keep it Simple: Donβt over-complicate the design
- Test Often: Check on multiple browsers and devices
- Stay Consistent: Use the same formatting throughout
- Document Changes: Keep a changelog
- Backup Regularly: Commit frequently to git
- Get Feedback: Ask users what they need
π― Next Steps
- Customize colors and branding
- Update all content placeholders
- Test locally
- Deploy to GitHub Pages
- Configure custom domain (if applicable)
- Share with stakeholders
- Set up analytics
- Plan regular updates
π§ Need Help?
If you get stuck:
- Check the DEPLOYMENT.md file
- Review GitHub Pages documentation
- Check GitHub Issues
- Contact support@altafid.com
π Youβre All Set!
Your professional API documentation site is ready to go. Deploy it, share it, and keep it updated!
Remember: Great documentation is always evolving. Keep listening to your users and improving.
Happy documenting! π
Created with β€οΈ for Altafid API