{"id":19732417,"url":"https://github.com/entrepreneur-interet-general/mkinx","last_synced_at":"2025-04-30T02:32:22.325Z","repository":{"id":50205197,"uuid":"122609795","full_name":"entrepreneur-interet-general/mkinx","owner":"entrepreneur-interet-general","description":"Manage sphinx documentations with mkdocs","archived":false,"fork":false,"pushed_at":"2022-12-08T02:17:01.000Z","size":128,"stargazers_count":4,"open_issues_count":7,"forks_count":0,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-04-05T21:51:11.781Z","etag":null,"topics":["documentation-tool","entrepreneur-interet-general","mkdocs","open-source","python","sphinx-documentation"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/entrepreneur-interet-general.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-02-23T10:54:50.000Z","updated_at":"2020-09-19T15:07:46.000Z","dependencies_parsed_at":"2022-09-26T20:53:17.190Z","dependency_job_id":null,"html_url":"https://github.com/entrepreneur-interet-general/mkinx","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/entrepreneur-interet-general%2Fmkinx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/entrepreneur-interet-general%2Fmkinx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/entrepreneur-interet-general%2Fmkinx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/entrepreneur-interet-general%2Fmkinx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/entrepreneur-interet-general","download_url":"https://codeload.github.com/entrepreneur-interet-general/mkinx/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251342721,"owners_count":21574245,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["documentation-tool","entrepreneur-interet-general","mkdocs","open-source","python","sphinx-documentation"],"created_at":"2024-11-12T00:26:22.654Z","updated_at":"2025-04-30T02:32:22.005Z","avatar_url":"https://github.com/entrepreneur-interet-general.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"### DEPRECATED -\u003e MOVED TO METADOCS\n\n[**metadocs's repo**](https://github.com/entrepreneur-interet-general/metadocs)\n\u003cbr/\u003e\u003cbr/\u003e\u003cbr/\u003e\u003cbr/\u003e\u003cbr/\u003e\u003cbr/\u003e\n---\n\n\u003c!-- TOC --\u003e\n\n- [About](#about)\n- [Install](#install)\n- [Getting Started](#getting-started)\n- [Usage](#usage)\n    - [Adding a Python project](#adding-a-python-project)\n    - [Manual addition of a built documentation](#manual-addition-of-a-built-documentation)\n    - [Customization](#customization)\n        - [Useful Resources](#useful-resources)\n\n\u003c!-- /TOC --\u003e\n---\n\n\n# About\n\n`mkinx` allows you to integrate several `sphinx` documentation projects into one Home Documentation listing them and allowing you to have cross projects documentation with `mkdocs`. \n\nAny `sphinx` module can be used as long as `make html` works and the built code is in `your_documentation/your_project/build`.\n\n`mkinx` comes with an example project and a standalone documention so you can already get started!\n\nDefault settings are that the Home Documentation will use a Material Design theme and Project Documentations will use Read The Docs's theme, to better distinguish the hierarchy. You can change that (in the global `mkdocs.yml` and in individual python projects' `conf.py`).\n\n# Install\n\nmkinx requires python3 and mainly uses `sphinx`, `mkdocs` and `watchdog` as 3rd party libraries. Check out the [full requirements](/requirements.txt)\n\n```\npip install mkinx\n```\n\n# Getting Started\n\nStart your Home Documentation with:\n\n```\nmkinx init your_home_documentation\n```\n\nStart the server with \n\n```\nmkinx serve\n```\n\nOptionnaly you can specify a port with `mkinx serve -s your_port`\n\n\u003cimg src=\"http://g.recordit.co/3vikPzjJPv.gif\" alt=\"mkinx demo\" style=\"max-width:300px\"\u003e\u003c/img\u003e\n\nYou can also manually build the documentation with `build`:\n\n```\nmkinx build [FLAGS]\n```\n\nFlags being:\n\n```\n  -v, --verbose                             verbose flag (Sphinx will stay verbose)\n  -A, --all                                 Build doc for all projects\n  -F, --force                               force the build, no verification asked\n  -o, --only_index                          only build projects listed in the Documentation's Home\n  -p, --projects [PROJECTS [PROJECTS ...]]  list of projects to build\n```\n\n\n\n# Usage\n\nThe package comes with a thorough documentation by default, which you'll see by running `mkinx serve` after a proper `init`. A Read The Docs-hosted version may arrive at some point. \n\nThe built in documentation is there to help you but is in no way necessary, you can overwrite or delete everything. **There are however 2 mandatory things:**\n\n**1** You have to keep this structure:\n\n```\nyour_home_documentation/\n    mkdocs.yml\n    docs/ # your home documentation, listing sphinx docs\n        index.md # mandatory file -\u003e mkdocs's index\n    site/\n    your_project_1/\n        build/ # sphinx's build directory\n        source/ # sphinx's documentation source directory\n        your_project_1/ # your documented code as a package\n            __init__.py\n            your_package_1_1/\n            your_package_1_2/\n            ...\n    your_project_2/\n        build/\n        source/\n        your_project_2/\n            __init__.py\n            your_package_2_1/\n            your_package_2_2/\n            ...\n    ...\n```\n\n**2**  `mkdocs`'s `index.md` file must have a `# Projects` section listing them as in the example\n\nAlso, remember to run `build` or `serve` commands from your Home Documenation's **root folder** (in `your_home_documentation/` in the example above) otherwise you may get errors saying `mkinx` can't find a file.\n\n## Adding a Python project\n\n`mkinx` comes with a useful `autodoc` command helping you easily add a new python project to your documentation.\n\nAll you have to do is put the documented (Google-style docstrings) code along the documentation in `your_home_documentation/`. Say it's called `your_project_3`. Then you just need to make a new directory called `your_project_3` go there, copy `your_project_3`'s code in there (as a package, meaning it should include a `__init__.py` and use `autodoc`:\n\n```\n$ pwd\n/path_to_your_documentation/\n$ mkdir your_project_3\n$ cd your_project_3\n$ cp -r path/to/your_project_3 .\n$ ls\nyour_project_3\n$ mkinx autodoc\n... some prints\n$ ls\nMakefile    source    build    your_project_3\n```\n\nUnder the hood, `mkinx autodoc` runs `sphinx-quickstart`, updates default values in `conf.py`, runs `sphinx-apidoc`, rearranges the created `.rst` files, builds the documentation with `mkinx build` and updates the Home Documentation's `index.md` file to list `your_project_3`.\n\nIf `mkinx autodoc`'s default values for the `sphinx` documentation don't suit you, do update `/path_to_your_documentation/your_project_3/source/conf.py`.\n\n## Manual addition of a built documentation\n\nIf you don't want to `mkinx autodoc`, you may use any sphinx configuration you want. Just keep in mind that `mkinx` will run `make html` from your project's directory (so check that this works) and `mkinx serve` expects to find a file called `index.html` in a directory called `build/` in your project.\n\n## Customization\n\nYou may use any other theme for instance. To use `mkdocs-nature` just:\n\n```\npip install mkdocs-nature\n```\n\nThen change this in `mkdocs.yaml` : `theme: nature` and finally:\n\n```\nmkdocs build\n```\n\nEdit the global configuration in `mkdocs.yaml` and each project's in `source/conf.py`.\n\n\n### Useful Resources\n\n* [Mkdocs's Getting Started](https://www.mkdocs.org/user-guide/writing-your-docs/)\n* [Material for Mkdocs's customization instructions](https://squidfunk.github.io/mkdocs-material/customization/)\n* [Material for Mkdocs's supported extensions list](https://squidfunk.github.io/mkdocs-material/extensions/admonition/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fentrepreneur-interet-general%2Fmkinx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fentrepreneur-interet-general%2Fmkinx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fentrepreneur-interet-general%2Fmkinx/lists"}