{"id":15552096,"url":"https://github.com/mgeier/sphinx-last-updated-by-git","last_synced_at":"2025-04-04T23:07:21.300Z","repository":{"id":40653515,"uuid":"254185007","full_name":"mgeier/sphinx-last-updated-by-git","owner":"mgeier","description":":watch: Get the \"last updated\" time for each Sphinx page from Git","archived":false,"fork":false,"pushed_at":"2025-02-16T16:34:12.000Z","size":74,"stargazers_count":49,"open_issues_count":5,"forks_count":9,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-28T22:12:01.021Z","etag":null,"topics":["sphinx-doc","sphinx-extension"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mgeier.png","metadata":{"files":{"readme":"README.rst","changelog":"NEWS.rst","contributing":null,"funding":null,"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}},"created_at":"2020-04-08T19:45:52.000Z","updated_at":"2025-03-26T08:49:22.000Z","dependencies_parsed_at":"2024-04-01T14:47:42.972Z","dependency_job_id":"92518d58-8ff7-46e6-a00a-1d3e47ecfd43","html_url":"https://github.com/mgeier/sphinx-last-updated-by-git","commit_stats":{"total_commits":108,"total_committers":6,"mean_commits":18.0,"dds":"0.11111111111111116","last_synced_commit":"7d226ef95ff2e19caaddc5018fb86f1bbf304232"},"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgeier%2Fsphinx-last-updated-by-git","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgeier%2Fsphinx-last-updated-by-git/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgeier%2Fsphinx-last-updated-by-git/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgeier%2Fsphinx-last-updated-by-git/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mgeier","download_url":"https://codeload.github.com/mgeier/sphinx-last-updated-by-git/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247261600,"owners_count":20910108,"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":["sphinx-doc","sphinx-extension"],"created_at":"2024-10-02T14:09:10.615Z","updated_at":"2025-04-04T23:07:21.279Z","avatar_url":"https://github.com/mgeier.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Get the \"last updated\" time for each Sphinx page from Git\n=========================================================\n\nThis is a little Sphinx_ extension that does exactly that.\nIt also checks for included files and other dependencies and\nuses their \"last updated\" time if it's more recent.\nFor each file, the \"author date\" of the Git commit where it was last changed\nis taken to be its \"last updated\" time.  Uncommitted changes are ignored.\n\nIf a page doesn't have a source file, its last_updated_ time is set to ``None``.\n\nThe default value for html_last_updated_fmt_ is changed\nfrom ``None`` to the empty string.\n\nUsage\n    #. Install the Python package ``sphinx-last-updated-by-git``\n    #. Add ``'sphinx_last_updated_by_git'`` to ``extensions`` in your ``conf.py``\n    #. Run Sphinx!\n\nOptions\n    * If a source file is not tracked by Git (e.g. because it has been\n      auto-generated on demand by autosummary_generate_) but its dependencies\n      are, the last_updated_ time is taken from them.  If you don't want this\n      to happen, use ``git_untracked_check_dependencies = False``.\n\n    * If a source file is not tracked by Git, its HTML page doesn't get a\n      source link.  If you do want those pages to have a sourcelink, set\n      ``git_untracked_show_sourcelink = True``.  Of course, in this case\n      html_copy_source_ and html_show_sourcelink_ must also be ``True``, and\n      the theme you are using must support source links in the first place.\n\n    * By default, timestamps are displayed using the local time zone.\n      You can specify a datetime.timezone_ object (or any ``tzinfo`` subclass\n      instance) with the configuration option ``git_last_updated_timezone``.\n      You can also use any string recognized by babel_,\n      e.g. ``git_last_updated_timezone = 'Pacific/Auckland'``.\n\n    * By default, the \"last updated\" timestamp is added as an HTML ``\u003cmeta\u003e``\n      tag.  This can be disabled by setting the configuration option\n      ``git_last_updated_metatags`` to ``False``.\n\n    * Files can be excluded from the last updated date calculation by passing\n      a list of exclusion patterns to the configuration option\n      ``git_exclude_patterns``.\n      These patterns are checked on both source files and dependencies\n      and are treated the same way as Sphinx's exclude_patterns_.\n\n    * Individual commits can be excluded from the last updated date\n      calculation by passing a list of commit hashes to the configuration\n      option ``git_exclude_commits``.\n\nCaveats\n    * When using a \"Git shallow clone\" (with the ``--depth`` option),\n      the \"last updated\" commit for a long-unchanged file\n      might not have been checked out.\n      In this case, the last_updated_ time is set to ``None``\n      (and a warning is shown during the build).\n\n      This might happen on https://readthedocs.org/\n      because they use shallow clones by default.\n      To avoid this problem, you can edit your config file ``.readthedocs.yml``:\n\n      .. code:: yaml\n\n          version: 2\n          build:\n            os: \"ubuntu-22.04\"\n            tools:\n              python: \"3\"\n            jobs:\n              post_checkout:\n                - git fetch --unshallow || true\n\n      For more details, `read the docs`__.\n\n      __ https://docs.readthedocs.com/platform/stable/build-customization.html#unshallow-git-clone\n\n      This might also happen when using Github Actions,\n      because `actions/checkout`__ also uses shallow clones by default.\n      This can be changed by using ``fetch-depth: 0``:\n\n      .. code:: yaml\n\n          steps:\n            - uses: actions/checkout@v3\n              with:\n                fetch-depth: 0\n\n      __ https://github.com/actions/checkout\n\n      If you only want to get rid of the warning (without actually fixing the problem),\n      use this in your ``conf.py``::\n\n          suppress_warnings = ['git.too_shallow']\n\n    * If depedency file does not exist, a warning is being emitted.\n\n      If you only want to get rid of the warning (without actually fixing the problem),\n      use this in your ``conf.py``::\n\n          suppress_warnings = ['git.dependency_not_found']\n\n    * When a project on https://readthedocs.org/ using their default theme\n      ``sphinx_rtd_theme`` was created before October 20th 2020,\n      the date will not be displayed in the footer.\n\n      An outdated work-around is to enable the (undocumented) feature flag\n      ``USE_SPHINX_LATEST``.\n\n      A better work-around is to override the defaults\n      by means of a ``requirements.txt`` file containing something like this::\n\n          sphinx\u003e=2\n          sphinx_rtd_theme\u003e=0.5\n\n      See also `issue #1`_.\n\n    * In Sphinx versions 5.0 and 5.1, there has been\n      a regression in how dependencies are determined.\n      This could lead to spurious dependencies\n      which means that some \"last changed\" dates were wrong.\n      This has been fixed in Sphinx version 5.2 and above.\n\n      See also `issue #40`_.\n\nLicense\n    BSD-2-Clause (same as Sphinx itself),\n    for more information take a look at the ``LICENSE`` file.\n\nSimilar stuff\n    | https://github.com/jdillard/sphinx-gitstamp\n    | https://github.com/OddBloke/sphinx-git\n    | https://github.com/MestreLion/git-tools (``git-restore-mtime``)\n    | https://github.com/TYPO3-Documentation/sphinxcontrib-gitloginfo\n\n.. _Sphinx: https://www.sphinx-doc.org/\n.. _last_updated: https://www.sphinx-doc.org/en/master/\n    development/html_themes/templating.html#last_updated\n.. _exclude_patterns: https://www.sphinx-doc.org/en/master/usage/\n    configuration.html#confval-exclude_patterns\n.. _autosummary_generate: https://www.sphinx-doc.org/en/master/\n    usage/extensions/autosummary.html#confval-autosummary_generate\n.. _html_copy_source: https://www.sphinx-doc.org/en/master/\n    usage/configuration.html#confval-html_copy_source\n.. _html_show_sourcelink: https://www.sphinx-doc.org/en/master/\n    usage/configuration.html#confval-html_show_sourcelink\n.. _html_last_updated_fmt: https://www.sphinx-doc.org/en/master/\n    usage/configuration.html#confval-html_last_updated_fmt\n.. _datetime.timezone: https://docs.python.org/3/library/\n    datetime.html#timezone-objects\n.. _babel: https://babel.pocoo.org/\n.. _issue #1: https://github.com/mgeier/sphinx-last-updated-by-git/issues/1\n.. _issue #40: https://github.com/mgeier/sphinx-last-updated-by-git/issues/40\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmgeier%2Fsphinx-last-updated-by-git","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmgeier%2Fsphinx-last-updated-by-git","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmgeier%2Fsphinx-last-updated-by-git/lists"}