{"id":13551967,"url":"https://github.com/cjsheets/mkdocs-rtd-dropdown","last_synced_at":"2025-06-28T22:32:50.798Z","repository":{"id":46148099,"uuid":"108765249","full_name":"cjsheets/mkdocs-rtd-dropdown","owner":"cjsheets","description":"MkDocs Theme - modified version of ReadTheDocs","archived":false,"fork":false,"pushed_at":"2018-11-21T04:34:04.000Z","size":1779,"stargazers_count":77,"open_issues_count":13,"forks_count":55,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-16T02:06:04.727Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://readthedocs.sheets.ch","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cjsheets.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-10-29T19:41:23.000Z","updated_at":"2025-02-04T09:41:04.000Z","dependencies_parsed_at":"2022-08-02T13:47:28.365Z","dependency_job_id":null,"html_url":"https://github.com/cjsheets/mkdocs-rtd-dropdown","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/cjsheets/mkdocs-rtd-dropdown","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cjsheets%2Fmkdocs-rtd-dropdown","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cjsheets%2Fmkdocs-rtd-dropdown/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cjsheets%2Fmkdocs-rtd-dropdown/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cjsheets%2Fmkdocs-rtd-dropdown/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cjsheets","download_url":"https://codeload.github.com/cjsheets/mkdocs-rtd-dropdown/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cjsheets%2Fmkdocs-rtd-dropdown/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262507126,"owners_count":23321868,"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":[],"created_at":"2024-08-01T12:01:56.679Z","updated_at":"2025-06-28T22:32:50.782Z","avatar_url":"https://github.com/cjsheets.png","language":"HTML","funding_links":[],"categories":["HTML","others"],"sub_categories":[],"readme":"ReadTheDocs Dropdown for MkDocs\n=======================\n[![Pypi Version][pypi-image]][pypi-link]\n\n  [pypi-image]: http://img.shields.io/pypi/v/mkdocs-rtd-dropdown.svg\n  [pypi-link]: https://pypi.python.org/pypi/mkdocs-rtd-dropdown\n\nA ReadTheDocs theme for [MkDocs](http://www.mkdocs.org/) with collapsing menu support.\n\n![Dropdown Demo](docs/img/example.png)\n\n\nHow to install\n----------\n\nInstall the ReadTheDocs Dropdown theme with pip:\n\n```\npip install mkdocs-rtd-dropdown\n```\n\nSet the theme name to rtd-dropdown in your projects `mkdocs.yml`:\n\n```\ntheme:\n  name: 'rtd-dropdown'\n```\n\n\nHow to use\n--------\n\nSee the supplied `docs` folder as an example. The main limitation is each file name needs to be the same as the\nfirst heading in each file. This seems to be a fairly common configuration.\n\nMkDocs added navigation improvemetns which allows this theme to support more than 2 collapsing levels.\n\nThe stylesheets are currently only configured for 4 levels. Please reaise an issue if you need style support for more than that.\n\n\n\nHow to use (Old Version, pre-v1.0)\n----------\n\nSimilar to [readthedocs.io](https://docs.readthedocs.io/en/latest/), this theme is built\nassuming a flat file structure.\n\n### File Structure (Old Version, pre-v1.0)\n\nRight now, your documentation can only use the first two file levels. I'm working on \nadding support for a 3rd level. \n\n![Code structure](docs/img/level-example.png)\n\nIn the example above, MkDocs will be a linked-page on the sidebar (to index.md) while UserGuide\nwill be a category containing the pages nested under it (ex. Instructions which contains instructions.md)\n\n![Code output](docs/img/output-example.png)\n\n\n**Note:** If you don't declare your doc-structure explicitly in mkdocs.yml, each folder is considered a file level.\n\n### Collapsing\n\nThe dropdown menu is controlled by heading levels.\n\n```\n# Page Title    \u003c-- H1\n\ncontent, content, content\n\n## Section      \u003c-- H2\n\n### Section     \u003c-- H3\n```\n\nThe rules for headings are essentially:\n\n* If there is only one H1, it will be ignored and the page/file name will be the root dropdown element\n  * Having 2 sub-menus with no choices was a wierd experience \n  * See [MkDocs](http://readthedocs.sheets.ch/) for an example\n* If there are multiple H1, they each become dropdown elements\n  * See [user-guide/instructions](http://readthedocs.sheets.ch/user-guide/instructions/) for an example\n\nThere is currently no support for H3+ dropdowns. I'm working on adding support to the next version.\n\n\nConsiderations\n--------------\n\n* Based on the ReadTheDocs theme build-into MkDocs\n* Adds dropdown functionality to the sidebar (similar to ReadTheDocs)\n\nFor further discussion, see [this issue](https://github.com/mkdocs/mkdocs/issues/588#issuecomment-341931422).\n\n\nDevelopment\n-----------\n\nIf you discover bugs or areas for improvement please feel free to submit issues or PRs.\n\n\u003c!-- Basic hit-counter, helps me decide which projects to dedicate time --\u003e\n[![Analytics](https://cjs-beacon.appspot.com/UA-10006093-3/github/cjsheets/mkdocs-rtd-dropdown?pixel)](https://github.com/cjsheets/mkdocs-rtd-dropdown)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcjsheets%2Fmkdocs-rtd-dropdown","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcjsheets%2Fmkdocs-rtd-dropdown","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcjsheets%2Fmkdocs-rtd-dropdown/lists"}