GitHub Import
Import existing markdown documentation from your GitHub repositories.
Cirth can import markdown documentation directly from your GitHub repositories, making it easy to migrate existing docs or keep documentation close to your code.
How It Works
Connect - Provide your repository details
Preview - Select which files to import
Import - Cirth converts markdown to pages
The import process:
Parses frontmatter for metadata
Extracts titles from H1 headings
Converts markdown to rich HTML
Generates SEO-friendly slugs
Starting an Import
Go to your Project Dashboard
Click Import from GitHub
Enter repository details:
Repository:
owner/repoor full URLBranch: Usually
mainormasterDocs Path: Folder containing docs (e.g.,
/docs)
Repository Format
Supported File Types
.md- Standard markdown.mdx- Markdown with JSX (converted to standard markdown)
Recommended Structure
plaintext
your-repo/
├── docs/
│ ├── getting-started.md
│ ├── installation.md
│ ├── configuration.md
│ └── api/
│ ├── overview.md
│ ├── authentication.md
│ └── endpoints.md
└── README.mdFrontmatter Support
Add YAML frontmatter to control import behavior:
markdown
---
title: Getting Started
description: Learn how to get started with our SDK
order: 1
---
# Getting Started
Your content here...Supported Frontmatter Fields
Field | Description | Default |
|---|---|---|
| Page title | Extracted from H1 |
| Meta description | None |
| Sort order in navigation | 0 |
Import Preview
Before importing, Cirth shows a preview:
File path - Original location in repo
Title - Extracted or from frontmatter
Slug - Generated URL path
You can:
Select/deselect individual files
Select all or none
Review titles before import
Slug Generation
Slugs are automatically generated from file paths:
File Path | Generated Slug |
|---|---|
|
|
|
|
|
|
|
|
Handling Conflicts
If a slug already exists:
Existing page content is replaced
Page settings are preserved
History is maintained
To avoid conflicts:
Use unique file names
Check existing pages before import
Private Repositories
To import from private repositories:
Generate a GitHub Personal Access Token
Required scopes:
repo(for private repos)Enter token when prompted during import
Security Note: Tokens are used only during import and are not stored.
Import History
Track your imports:
Go to Project Settings > GitHub
View import history with:
Date and time
Repository and branch
Files imported
Status (success/failed)
Re-importing
To sync with repository changes:
Click Import from GitHub again
Your previous settings are remembered
Select files to re-import
Existing pages are updated
Best Practices
Organize Your Repository
plaintext
docs/
├── 01-getting-started/
│ ├── 01-introduction.md
│ ├── 02-installation.md
│ └── 03-quick-start.md
├── 02-guides/
│ ├── 01-basics.md
│ └── 02-advanced.md
└── 03-api-reference/
└── 01-overview.mdUsing numbered prefixes helps maintain order.
Use Frontmatter
Always include frontmatter for:
Consistent titles
SEO descriptions
Explicit ordering
Keep README Separate
Your repo's README.md is often different from documentation. Consider:
Excluding it from imports
Or creating a dedicated
docs/folder
Regular Syncs
Set a schedule to re-import:
After major releases
When docs are updated in the repo
As part of your release process
Troubleshooting
Files Not Showing
Check the Docs Path is correct
Ensure files have
.mdextensionVerify branch name matches
Wrong Titles
Add
titleto frontmatterEnsure H1 heading is at the top
Check for special characters
Import Fails
Check repository is accessible
Verify branch exists
For private repos, check token permissions