This directory contains the complete API documentation for LexgoSign, built with MkDocs Material.
- Python 3.8 or higher
- pip (Python package manager)
- Install dependencies:
pip install -r requirements.txt- Start the development server:
mkdocs serve-
Open your browser to
http://localhost:8000 -
Edit markdown files in
docs/- changes auto-reload
Build the static site:
mkdocs buildOutput will be in the site/ directory.
api/
├── mkdocs.yml # MkDocs configuration
├── requirements.txt # Python dependencies
├── docs/ # Documentation content
│ ├── index.md # Homepage
│ ├── getting-started/ # Getting started guides
│ │ ├── introduction.md
│ │ ├── authentication.md
│ │ └── quick-start.md
│ ├── api/ # API reference
│ │ ├── overview.md
│ │ ├── envelopes.md
│ │ ├── recipients.md
│ │ ├── validations.md
│ │ ├── settings.md
│ │ ├── webhooks.md
│ │ └── errors.md
│ ├── guides/ # Feature guides
│ │ ├── email-validation.md
│ │ ├── email-templates.md
│ │ ├── webhook-integration.md
│ │ └── evidence-sheet.md
│ ├── examples/ # Code examples
│ │ ├── create-envelope.md
│ │ ├── email-validation-flow.md
│ │ └── webhook-subscriptions.md
│ └── changelog.md # Version history
└── site/ # Built site (gitignored)
We use several markdown extensions for enhanced documentation:
```python
def hello_world():
print("Hello, World!")
```!!! note "Optional Title"
This is a note callout
!!! warning
This is a warning
!!! danger "Critical"
This is a danger callout
!!! tip
This is a tip=== "Python"
```python
print("Hello")
```
=== "JavaScript"
```javascript
console.log("Hello");
```| Column 1 | Column 2 |
|----------|----------|
| Value 1 | Value 2 |- Use present tense ("Create an envelope" not "Creates an envelope")
- Use active voice ("The API returns..." not "A response is returned...")
- Include code examples for all endpoints
- Show both request and response examples
- Document all error cases
- Link to related documentation
- Use consistent terminology
- Use kebab-case:
email-validation.md - Be descriptive:
webhook-integration.mdnotwebhooks.md - Group by topic in subdirectories
Deploy to GitHub Pages:
mkdocs gh-deployTo deploy to a custom domain:
- Add
site_urlinmkdocs.yml:
site_url: https://docs.lexgo.cl- Configure DNS:
CNAME docs.lexgo.cl -> yourusername.github.io
- Deploy:
mkdocs gh-deployDeploy to Netlify:
- Create
netlify.toml:
[build]
command = "mkdocs build"
publish = "site"
[build.environment]
PYTHON_VERSION = "3.8"-
Connect repository to Netlify
-
Deploy automatically on push
- Create markdown file in appropriate
docs/subdirectory - Add entry to
navinmkdocs.yml:
nav:
- API Reference:
- Your New Page: api/your-new-page.md- Test locally with
mkdocs serve - Commit and push
- Edit markdown files in
docs/ - Test changes locally
- Commit with descriptive message
- Push to repository
Create .github/workflows/docs.yml:
name: Deploy Documentation
on:
push:
branches: [main, master]
paths:
- 'api/**'
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.x
- run: pip install -r api/requirements.txt
- run: cd api && mkdocs gh-deploy --forceKeep MkDocs and plugins up to date:
pip install --upgrade -r requirements.txt
pip freeze > requirements.txtCheck for broken links:
pip install mkdocs-linkcheck
mkdocs buildSearch is automatically built and updated on every build.
If port 8000 is busy:
mkdocs serve -a localhost:8001Clear site directory and rebuild:
rm -rf site/
mkdocs build --cleanReinstall dependencies:
pip install --force-reinstall -r requirements.txtFor documentation issues:
- GitHub Issues: Report bugs or suggest improvements
- Slack: #documentation channel
Copyright © 2025 Lexgo. All rights reserved.