# MkDocs Confluence Publisher Plugin
This MkDocs plugin automatically publishes your documentation to Confluence. It creates a hierarchical structure in Confluence that mirrors your MkDocs site structure, updates page content, and handles attachments.
## Features
- Automatically creates and updates pages in Confluence
- Maintains the hierarchy of your MkDocs site in Confluence
- Handles attachments referenced in your markdown files
- Configurable page prefix for easy identification in Confluence
## Installation
Install the plugin using pip:
```bash
pip install mkdocs-confluence-publisher
```
## Configuration
Add the following to your `mkdocs.yml`:
```yaml
plugins:
- confluence-publisher:
confluence_prefix: "MkDocs - " # Optional: Prefix for page titles in Confluence
space_key: "YOUR_SPACE_KEY" # Required: Confluence space key
parent_page_id: 123456 # Required: ID of the parent page in Confluence
```
## Environment Variables
The plugin requires the following environment variables to be set:
- `CONFLUENCE_URL`: The base URL of your Confluence instance
- `CONFLUENCE_USERNAME`: Your Confluence username
- `CONFLUENCE_API_TOKEN`: Your Confluence API token
You can set these in your environment or use a `.env` file.
## Usage
Once configured, the plugin will automatically publish your documentation to Confluence when you build your MkDocs site:
```bash
mkdocs build
```
## How It Works
1. **Initialization**: The plugin connects to Confluence using the provided credentials.
2. **Page Creation**: It creates a structure in Confluence mirroring your MkDocs navigation.
3. **Content Update**: As it processes each page, it updates the content in Confluence.
4. **Attachment Handling**: Any attachments referenced in your markdown are uploaded to the corresponding Confluence page.
## Logging
The plugin uses Python's logging module. You can configure logging in your `mkdocs.yml`:
```yaml
logging:
level: INFO
```
Set to `DEBUG` for more detailed logging information.
## Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
## License
This project is licensed under the Apache-2.0 license.
Raw data
{
"_id": null,
"home_page": "https://github.com/johnny/mkdocs-confluence-publisher",
"name": "mkdocs-confluence-publisher",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "mkdocs confluence documentation",
"author": "Jonas von Andrian",
"author_email": "j.andrianmueller@outlook.com",
"download_url": "https://files.pythonhosted.org/packages/9c/96/76174ec12608818d050e1f4cafc7a44ee318d726d14b13e168b2c02e25a8/mkdocs_confluence_publisher-0.1.2.tar.gz",
"platform": null,
"description": "# MkDocs Confluence Publisher Plugin\n\nThis MkDocs plugin automatically publishes your documentation to Confluence. It creates a hierarchical structure in Confluence that mirrors your MkDocs site structure, updates page content, and handles attachments.\n\n## Features\n\n- Automatically creates and updates pages in Confluence\n- Maintains the hierarchy of your MkDocs site in Confluence\n- Handles attachments referenced in your markdown files\n- Configurable page prefix for easy identification in Confluence\n\n## Installation\n\nInstall the plugin using pip:\n\n```bash\npip install mkdocs-confluence-publisher\n```\n\n## Configuration\n\nAdd the following to your `mkdocs.yml`:\n\n```yaml\nplugins:\n - confluence-publisher:\n confluence_prefix: \"MkDocs - \" # Optional: Prefix for page titles in Confluence\n space_key: \"YOUR_SPACE_KEY\" # Required: Confluence space key\n parent_page_id: 123456 # Required: ID of the parent page in Confluence\n```\n\n## Environment Variables\n\nThe plugin requires the following environment variables to be set:\n\n- `CONFLUENCE_URL`: The base URL of your Confluence instance\n- `CONFLUENCE_USERNAME`: Your Confluence username\n- `CONFLUENCE_API_TOKEN`: Your Confluence API token\n\nYou can set these in your environment or use a `.env` file.\n\n## Usage\n\nOnce configured, the plugin will automatically publish your documentation to Confluence when you build your MkDocs site:\n\n```bash\nmkdocs build\n```\n\n## How It Works\n\n1. **Initialization**: The plugin connects to Confluence using the provided credentials.\n2. **Page Creation**: It creates a structure in Confluence mirroring your MkDocs navigation.\n3. **Content Update**: As it processes each page, it updates the content in Confluence.\n4. **Attachment Handling**: Any attachments referenced in your markdown are uploaded to the corresponding Confluence page.\n\n## Logging\n\nThe plugin uses Python's logging module. You can configure logging in your `mkdocs.yml`:\n\n```yaml\nlogging:\n level: INFO\n```\n\nSet to `DEBUG` for more detailed logging information.\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## License\n\nThis project is licensed under the Apache-2.0 license.\n",
"bugtrack_url": null,
"license": "Apache License 2.0",
"summary": "A MkDocs plugin to publish documentation to Confluence",
"version": "0.1.2",
"project_urls": {
"Bug Tracker": "https://github.com/johnny/mkdocs-confluence-publisher/issues",
"Homepage": "https://github.com/johnny/mkdocs-confluence-publisher"
},
"split_keywords": [
"mkdocs",
"confluence",
"documentation"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "b412430eb1eff8ad1cf911fd7091bcb30706d1384be9427dce0247966127b04f",
"md5": "5c469e9c1e9c9d232939693b4c3e90c4",
"sha256": "3363ecdcc10985fa7a64a49fdcf80d61821f737473f5817ba307ff0f6f3b22a5"
},
"downloads": -1,
"filename": "mkdocs_confluence_publisher-0.1.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "5c469e9c1e9c9d232939693b4c3e90c4",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 11987,
"upload_time": "2024-12-05T11:06:57",
"upload_time_iso_8601": "2024-12-05T11:06:57.072174Z",
"url": "https://files.pythonhosted.org/packages/b4/12/430eb1eff8ad1cf911fd7091bcb30706d1384be9427dce0247966127b04f/mkdocs_confluence_publisher-0.1.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "9c9676174ec12608818d050e1f4cafc7a44ee318d726d14b13e168b2c02e25a8",
"md5": "a3549862a34d303649b17e196fb76829",
"sha256": "1e91c120124c8ccc7254265d67757d817f36974329215a30e88c500d6ae8a278"
},
"downloads": -1,
"filename": "mkdocs_confluence_publisher-0.1.2.tar.gz",
"has_sig": false,
"md5_digest": "a3549862a34d303649b17e196fb76829",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 10445,
"upload_time": "2024-12-05T11:07:00",
"upload_time_iso_8601": "2024-12-05T11:07:00.003244Z",
"url": "https://files.pythonhosted.org/packages/9c/96/76174ec12608818d050e1f4cafc7a44ee318d726d14b13e168b2c02e25a8/mkdocs_confluence_publisher-0.1.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-05 11:07:00",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "johnny",
"github_project": "mkdocs-confluence-publisher",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "mkdocs",
"specs": [
[
">=",
"1.0"
]
]
},
{
"name": "atlassian-python-api",
"specs": [
[
">=",
"3.14.0"
]
]
},
{
"name": "mistune",
"specs": []
},
{
"name": "md2cf",
"specs": []
},
{
"name": "python-dotenv",
"specs": []
}
],
"lcname": "mkdocs-confluence-publisher"
}