mkdocs-merge


Namemkdocs-merge JSON
Version 0.9.0 PyPI version JSON
download
home_pageNone
SummaryTool to merge multiple MkDocs sites into a single directory
upload_time2024-07-31 05:18:53
maintainerNone
docs_urlNone
authorNone
requires_pythonNone
licenseMIT
keywords mkdocs documentation merge multiple
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            # MkDocs Merge

This simple tool allows you to merge the source of multiple [MkDocs](http://www.mkdocs.org/) sites
into a single one converting each of the specified sites to a sub-site of the master site.

Supports unification of sites with the same `site_name` into a single sub-site.

## Changelog
Access the changelog here: https://ovasquez.github.io/mkdocs-merge/changelog/

> Note: Since version 0.6 MkDocs Merge added support for MkDocs 1.0 and dropped
> support for earlier versions.
> See here for more details about the changes in [MkDocs 1.0](https://www.mkdocs.org/about/release-notes/#version-10-2018-08-03).

---
[![PyPI version](https://img.shields.io/pypi/v/mkdocs-merge.svg)](https://pypi.python.org/pypi/mkdocs-merge)
[![MkDocs Merge Validation Build](https://github.com/ovasquez/mkdocs-merge/actions/workflows/build.yml/badge.svg)](https://github.com/ovasquez/mkdocs-merge/actions/workflows/build.yml)

MkDocs-Merge officially supports Python versions 3.8, 3.9 and 3.10. It has been tested to work correctly in previous 3.X versions, but those are no longer officially supported.

## Install

```bash
$ pip install mkdocs-merge
```

## Usage

```bash
$ mkdocs-merge run MASTER_SITE SITES [-u]...
```

### Parameters

- `MASTER_SITE`: the path to the MkDocs site where the base `mkdocs.yml` file resides. This is where all other sites
    will be merged into.
- `SITES`: the paths to each of the MkDocs sites that will be merged. Each of these paths is expected to have a
    `mkdocs.yml` file and a `docs` folder.
- `-u` (optional): Unify sites with the same "site_name" into a single sub-site.  

### Example

```bash
$ mkdocs-merge run root/mypath/mysite /another/path/new-site /newpath/website
```

A single MkDocs site will be created in `root/mypath/mysite`, and the sites in
`/another/path/new-site` and `/newpath/website` will be added as sub-pages.

**Original `root/mypath/mysite/mkdocs.yml`**

```yaml
...
nav:
  - Home: index.md
  - About: about.md
```

**Merged `root/mypath/mysite/mkdocs.yml`**

```yaml
...
nav:
  - Home: index.md
  - About: about.md
  - new-site: new-site/home/another.md # Page merged from /another/path/new-site
  - website: website/index.md # Page merged from /newpath/website
```

## Development

### Dev Install

Clone the repository and specify the `dev` dependencies on the install command.
Project has been updated to use `pyproject.toml` so the version has to be manually synchronized in both `__init__.py` and `pyproject.toml`.

```bash
# Using quotes for zsh compatibility
$ pip install -e '.[dev]'
```

### Test

The tests can be run using `tox` from the root directory. `tox` is part of the development dependencies:

```bash
$ tox
```

### Publishing

The publishing process was updated to use GitHub Actions.

## Project Status

Very basic implementation. The code works but doesn't allow to specify options for the merging.

### Pending work

- [ ] Refactoring of large functions.
- [x] GitHub Actions build.
- [x] Publish pip package.
- [ ] Better error handling.
- [x] Merge configuration via CLI options.
- [x] Unit testing (work in progress).
- [ ] CLI integration testing.
- [ ] Consider more complex cases.
- [x] Make MkDocs Merge module friendly: thanks to [mihaipopescu](https://github.com/mihaipopescu)

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "mkdocs-merge",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "mkdocs, documentation, merge, multiple",
    "author": null,
    "author_email": "Oscar Vasquez <oscar@vasquezcr.com>",
    "download_url": "https://files.pythonhosted.org/packages/7a/77/7cdf2f59a14ad421f10de3f5d18ac4c5a0bf9265818588badffd66cb42f5/mkdocs_merge-0.9.0.tar.gz",
    "platform": null,
    "description": "# MkDocs Merge\n\nThis simple tool allows you to merge the source of multiple [MkDocs](http://www.mkdocs.org/) sites\ninto a single one converting each of the specified sites to a sub-site of the master site.\n\nSupports unification of sites with the same `site_name` into a single sub-site.\n\n## Changelog\nAccess the changelog here: https://ovasquez.github.io/mkdocs-merge/changelog/\n\n> Note: Since version 0.6 MkDocs Merge added support for MkDocs 1.0 and dropped\n> support for earlier versions.\n> See here for more details about the changes in [MkDocs 1.0](https://www.mkdocs.org/about/release-notes/#version-10-2018-08-03).\n\n---\n[![PyPI version](https://img.shields.io/pypi/v/mkdocs-merge.svg)](https://pypi.python.org/pypi/mkdocs-merge)\n[![MkDocs Merge Validation Build](https://github.com/ovasquez/mkdocs-merge/actions/workflows/build.yml/badge.svg)](https://github.com/ovasquez/mkdocs-merge/actions/workflows/build.yml)\n\nMkDocs-Merge officially supports Python versions 3.8, 3.9 and 3.10. It has been tested to work correctly in previous 3.X versions, but those are no longer officially supported.\n\n## Install\n\n```bash\n$ pip install mkdocs-merge\n```\n\n## Usage\n\n```bash\n$ mkdocs-merge run MASTER_SITE SITES [-u]...\n```\n\n### Parameters\n\n- `MASTER_SITE`: the path to the MkDocs site where the base `mkdocs.yml` file resides. This is where all other sites\n    will be merged into.\n- `SITES`: the paths to each of the MkDocs sites that will be merged. Each of these paths is expected to have a\n    `mkdocs.yml` file and a `docs` folder.\n- `-u` (optional): Unify sites with the same \"site_name\" into a single sub-site.  \n\n### Example\n\n```bash\n$ mkdocs-merge run root/mypath/mysite /another/path/new-site /newpath/website\n```\n\nA single MkDocs site will be created in `root/mypath/mysite`, and the sites in\n`/another/path/new-site` and `/newpath/website` will be added as sub-pages.\n\n**Original `root/mypath/mysite/mkdocs.yml`**\n\n```yaml\n...\nnav:\n  - Home: index.md\n  - About: about.md\n```\n\n**Merged `root/mypath/mysite/mkdocs.yml`**\n\n```yaml\n...\nnav:\n  - Home: index.md\n  - About: about.md\n  - new-site: new-site/home/another.md # Page merged from /another/path/new-site\n  - website: website/index.md # Page merged from /newpath/website\n```\n\n## Development\n\n### Dev Install\n\nClone the repository and specify the `dev` dependencies on the install command.\nProject has been updated to use `pyproject.toml` so the version has to be manually synchronized in both `__init__.py` and `pyproject.toml`.\n\n```bash\n# Using quotes for zsh compatibility\n$ pip install -e '.[dev]'\n```\n\n### Test\n\nThe tests can be run using `tox` from the root directory. `tox` is part of the development dependencies:\n\n```bash\n$ tox\n```\n\n### Publishing\n\nThe publishing process was updated to use GitHub Actions.\n\n## Project Status\n\nVery basic implementation. The code works but doesn't allow to specify options for the merging.\n\n### Pending work\n\n- [ ] Refactoring of large functions.\n- [x] GitHub Actions build.\n- [x] Publish pip package.\n- [ ] Better error handling.\n- [x] Merge configuration via CLI options.\n- [x] Unit testing (work in progress).\n- [ ] CLI integration testing.\n- [ ] Consider more complex cases.\n- [x] Make MkDocs Merge module friendly: thanks to [mihaipopescu](https://github.com/mihaipopescu)\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Tool to merge multiple MkDocs sites into a single directory",
    "version": "0.9.0",
    "project_urls": {
        "download": "https://github.com/ovasquez/mkdocs-merge/archive/main.zip",
        "homepage": "https://github.com/ovasquez/mkdocs-merge",
        "repository": "https://github.com/ovasquez/mkdocs-merge"
    },
    "split_keywords": [
        "mkdocs",
        " documentation",
        " merge",
        " multiple"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "750e52093993db286dc7f723e5a057f339b0b17b483b94d8296ce60d9106c198",
                "md5": "50c980d17aac4f6ae1dcb28e6a00047f",
                "sha256": "4e1177bb65f73241d313726230747a15a596d88d833062bf4846db3a84b9a42d"
            },
            "downloads": -1,
            "filename": "mkdocs_merge-0.9.0-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "50c980d17aac4f6ae1dcb28e6a00047f",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": null,
            "size": 9996,
            "upload_time": "2024-07-31T05:18:52",
            "upload_time_iso_8601": "2024-07-31T05:18:52.698630Z",
            "url": "https://files.pythonhosted.org/packages/75/0e/52093993db286dc7f723e5a057f339b0b17b483b94d8296ce60d9106c198/mkdocs_merge-0.9.0-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7a777cdf2f59a14ad421f10de3f5d18ac4c5a0bf9265818588badffd66cb42f5",
                "md5": "1415018d1d69337bdf6d2f2d30d646df",
                "sha256": "19cbf965b61fd81c19fc8c37b0c0baa32b8580c24bdb4da0fa62605351684bc3"
            },
            "downloads": -1,
            "filename": "mkdocs_merge-0.9.0.tar.gz",
            "has_sig": false,
            "md5_digest": "1415018d1d69337bdf6d2f2d30d646df",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 8316,
            "upload_time": "2024-07-31T05:18:53",
            "upload_time_iso_8601": "2024-07-31T05:18:53.986492Z",
            "url": "https://files.pythonhosted.org/packages/7a/77/7cdf2f59a14ad421f10de3f5d18ac4c5a0bf9265818588badffd66cb42f5/mkdocs_merge-0.9.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-07-31 05:18:53",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ovasquez",
    "github_project": "mkdocs-merge",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "tox": true,
    "lcname": "mkdocs-merge"
}
        
Elapsed time: 0.58176s