{"id":26366012,"url":"https://github.com/patrick-kidger/hippogriffe","last_synced_at":"2026-05-11T16:37:57.578Z","repository":{"id":282626059,"uuid":"948745793","full_name":"patrick-kidger/hippogriffe","owner":"patrick-kidger","description":"Tweaks for `mkdocstrings[python]`","archived":false,"fork":false,"pushed_at":"2025-04-21T16:13:51.000Z","size":217,"stargazers_count":10,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-06T22:30:24.945Z","etag":null,"topics":["documentation","griffe","mkdocs","mkdocstrings","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/patrick-kidger.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["patrick-kidger"]}},"created_at":"2025-03-14T22:11:21.000Z","updated_at":"2026-02-20T15:28:05.000Z","dependencies_parsed_at":"2025-03-15T21:50:07.012Z","dependency_job_id":"d281c396-e4e3-4f66-bb00-07e8c3245e98","html_url":"https://github.com/patrick-kidger/hippogriffe","commit_stats":null,"previous_names":["patrick-kidger/hippogriffe"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/patrick-kidger/hippogriffe","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrick-kidger%2Fhippogriffe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrick-kidger%2Fhippogriffe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrick-kidger%2Fhippogriffe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrick-kidger%2Fhippogriffe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/patrick-kidger","download_url":"https://codeload.github.com/patrick-kidger/hippogriffe/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrick-kidger%2Fhippogriffe/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32903813,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-10T13:40:02.631Z","status":"online","status_checked_at":"2026-05-11T02:00:05.975Z","response_time":120,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","griffe","mkdocs","mkdocstrings","python"],"created_at":"2025-03-16T20:14:56.739Z","updated_at":"2026-05-11T16:37:57.570Z","avatar_url":"https://github.com/patrick-kidger.png","language":"Python","funding_links":["https://github.com/sponsors/patrick-kidger"],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eHippogriffe\u003c/h1\u003e\n\nThis is a set of tweaks on top of the MkDocs + `mkdocstrings[python]` + `griffe` documentation stack. In particular, we:\n\n- Add `[source]` links to GitHub to each top-level class or function.\n- Pretty-format type annotations:\n    - Fixes unions/generics/etc. to display as e.g. `int | str` rather than just `Union`, or `tuple[int, str]` rather than just `tuple`.\n    - Respects your public API: if a type is declared in your documentation as `::: yourlib.Foo` then its usage in type annotations will match: `some_fn(foo: yourlib.Foo)`.\n- Show base classes inline after the class.\n- Drops the `-\u003e None` return annotation from `__init__` methods.\n- Attributes display as `[attr] somelib.someattr` instead of `[attr] somelib.someattr = some_value [module]`. (I don't find usually-long default values to be useful documentation, nor the 'module' tag to be informative.)\n\nBefore                 | After\n:---------------------:|:----------------------:\n![old](./imgs/old.png) | ![new](./imgs/new.png)\n\n## Installation\n\n```bash\npip install hippogriffe\n```\n\nRequires MkDocs 1.6.1+ and `mkdocstrings[python]` 0.28.3+\n\n## Usage\n\nIn `mkdocs.yml`:\n```yml\n...\n\nplugins:\n    - hippogriffe\n    - mkdocstrings:\n        ...\n```\n\n## Configuration\n\nHippogriffe supports the following configuration options:\n\n```yml\nplugins:\n    - hippogriffe:\n        show_bases: true/false\n        show_source_links: all/toplevel/none\n        extra_public_objects:\n            - foo.SomeClass\n            - bar.subpackage.some_function\n```\n\n**show_bases:**\n\nIf `false` then base classes will not be displayed alongside a class. Defaults to `true`.\n\n**show_source_links:**\n\nSets which objects will have links to their location in the repository (as configured via the usual MkDocs `repo_url`). If `all` then all objects will have links. If `toplevel` then just `::: somelib.value` will have links, but their members will not. If `none` then no links will be added. Defaults to `toplevel`.\n\n**extra_public_objects:**\n\nPretty-formatting of type annotations is done strictly: every annotation must be part of the known public API, else an error will be raised. The public API is defined as the combination of:\n\n- Everything you document using `::: yourlib.Foo`, and all of their members.\n- Anything from the standard library.\n- All objects belonging to any of `extra_public_objects`.\n\nFor example,\n```yml\nplugins:\n    - hippogriffe:\n        extra_public_objects:\n            - jax.Array\n            - torch.Tensor\n```\n\nList each object under whatever public path `somelib.Foo` that you would like it to be displayed under (and from which it must be accessible), not whichever private path `somelib._internal.foo.Foo` it is defined at.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatrick-kidger%2Fhippogriffe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpatrick-kidger%2Fhippogriffe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatrick-kidger%2Fhippogriffe/lists"}