From 0ed8e2e4a3fee60e0b613a13a038bbec92085890 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Sun, 21 Jan 2024 21:56:00 +0100 Subject: [PATCH 1/2] Fix MkDocs reference share buttons --- plugin/main.py | 6 ++---- pyproject.toml | 44 ++++++++++++++++++++++---------------------- 2 files changed, 24 insertions(+), 26 deletions(-) diff --git a/plugin/main.py b/plugin/main.py index 0e1bf43..d6818de 100644 --- a/plugin/main.py +++ b/plugin/main.py @@ -78,7 +78,7 @@ def insert_content(soup, content_to_insert): if comments_header := soup.find("h2", id="__comments"): comments_header.insert_before(content_to_insert) # Fallback: append the content to the md-typeset div if the comments header is not found - if md_typeset := soup.select_one(".md-typeset"): + if md_typeset := soup.select_one(".md-content__inner"): md_typeset.append(content_to_insert) def on_post_page(self, output, page, config): @@ -183,9 +183,7 @@ def on_post_page(self, output, page, config): if self.config["add_authors"]: if self.config["add_dates"]: dates_and_authors_div += "
" - authors_str = ", ".join( - [f"{author[0]} ({author[2]})" for author in git_info["authors"]] - ) + authors_str = ", ".join([f"{a[0]} ({a[2]})" for a in git_info["authors"]]) dates_and_authors_div += f"Authors: {authors_str}" dates_and_authors_div += "" diff --git a/pyproject.toml b/pyproject.toml index ada1d66..9e3294f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta" [project] name = "mkdocs-ultralytics-plugin" -version = "0.0.37" +version = "0.0.38" description = "An MkDocs plugin that provides Ultralytics Docs customizations at https://docs.ultralytics.com." readme = "README.md" requires-python = ">=3.8" @@ -19,28 +19,28 @@ maintainers = [ { name = "Glenn Jocher", email = "glenn.jocher@ultralytics.com" } # Optional ] classifiers = [ - 'Development Status :: 4 - Beta', - 'Intended Audience :: Developers', - 'Intended Audience :: Education', - 'Intended Audience :: Science/Research', - 'License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'Programming Language :: Python :: 3.11', - 'Topic :: Software Development', - 'Topic :: Scientific/Engineering', - 'Topic :: Scientific/Engineering :: Artificial Intelligence', - 'Operating System :: POSIX :: Linux', - 'Operating System :: MacOS', - 'Operating System :: Microsoft :: Windows', + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "Intended Audience :: Education", + "Intended Audience :: Science/Research", + "License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Topic :: Software Development", + "Topic :: Scientific/Engineering", + "Topic :: Scientific/Engineering :: Artificial Intelligence", + "Operating System :: POSIX :: Linux", + "Operating System :: MacOS", + "Operating System :: Microsoft :: Windows", ] # Optional, for a list of valid classifiers, see https://pypi.org/classifiers/ dependencies = [ - 'mkdocs>=1.0', - 'beautifulsoup4>=4.9.3', - 'pyyaml', - 'requests>=2.31.0', + "mkdocs>=1.0", + "beautifulsoup4>=4.9.3", + "pyyaml", + "requests>=2.31.0", ] [project.urls] # Optional @@ -49,7 +49,7 @@ dependencies = [ "Source" = "https://github.com/ultralytics/mkdocs/" [project.entry-points."mkdocs.plugins"] -ultralytics = "plugin:MetaPlugin" # executes the function `MetaPlugin` from this package when 'plugin' is called. +ultralytics = "plugin:MetaPlugin" # executes the function `MetaPlugin` from this package when "plugin" is called. [project.optional-dependencies] # Optional dev = ["pytest"] From c40332541621fa8f51f0b4d63ee42718a43befcd Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Sun, 21 Jan 2024 21:56:35 +0100 Subject: [PATCH 2/2] Update format.yml --- .github/workflows/format.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index 4f0e42c..17b7eb4 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -19,7 +19,6 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} # automatically generated python: true - docstrings: true - markdown: true + prettier: true spelling: true links: true