Package: mkdocs-ultralytics-plugin
🚀 MkDocs Ultralytics PluginWelcome to the MkDocs Ultralytics Plugin documentation! 📄 This delightful plugin enhances your MkDocs-generated documentation with savvy SEO optimizations and interactive social elements. Through the autogeneration of meta tags and incorporation of social sharing features, it aims to elevate user engagement and broaden your Markdown project's footprint on the web.🌟 FeaturesThis plugin seamlessly integrates a variety of features into your MkDocs site:Meta Tag Generation: Creates meta description and image tags from the first paragraph and image on the page.Keyword Customization: Allows you to define meta keywords directly in your Markdown front matter.Social Media Optimization: Generates Open Graph and Twitter meta tags for improved sharing on social platforms.Sharing Made Simple: Inserts convenient share buttons for Twitter and LinkedIn at the end of your content.Git Insights: Gathers and displays git commit information, including dates and authors, within the page footer.🛠 InstallationGetting started with the MkDocs Ultralytics Plugin is easy! Install it viapipwith the following command:pipinstallmkdocs-ultralytics-plugin💻 UsageTo enable the plugin in your MkDocs configuration, simply add it under thepluginssection in yourmkdocs.ymlfile:plugins:-mkdocstrings-search-ultralytics⚙️ Plugin ArgumentsThe plugin supports several configuration arguments to tailor its behavior to your needs:verbose: Toggles verbose output. Useful for debugging. (default:True)enabled: Toggles plugin activation. (default:True)default_image: Provides a fallback image URL if none is found in your content. (default:None)add_desc: Controls the generation of meta description tags. (default:True)add_image: Manages meta image tag generation. (default:True)add_keywords: Allows meta keyword tag generation. (default:True)add_share_buttons: Adds or removes social share buttons. (default:True)add_dates: Appends git commit dates to your content footer. (default:True)add_authors: Includes git author information in the content footer. (default:True)Include these arguments under theultralyticsplugin entry in yourmkdocs.yml:plugins:-mkdocstrings-search-ultralytics:verbose:Trueenabled:Truedefault_image:"https://example.com/default-image.png"add_desc:Trueadd_image:Trueadd_keywords:Trueadd_share_buttons:Trueadd_dates:Trueadd_authors:True🧩 How it worksHere's a breakdown of the plugin's inner workings:Meta DescriptionWhenadd_descis on, the plugin plucks the first paragraph from your Markdown and turns it into a<meta name="description">tag within the<head>of your page.Meta ImageEnabled byadd_image, the first available image in the Markdown is assigned as<meta property="og:image">and<meta property="twitter:image">tags. If no image is detected,default_imagesteps in.Meta KeywordsManually specify meta keywords in the Markdown front matter to inject a<meta name="keywords">tag into the<head>of your page.Share ButtonsEngageadd_share_buttons, and voila! Twitter and LinkedIn sharing buttons appear, inviting users to spread the word about your content.Git Dates and AuthorsWithadd_datesandadd_authors, the plugin fetches and flaunts the git commit timestamp and author names at the bottom of your page, keeping readers informed.💡 Plugin Code InsightTheMetaPluginclass withinplugin.pyis the heart of the plugin, orchestrating the metadata and feature insertions:# Our MkDocs plugin inherits features from the BasePlugin available in mkdocsfrommkdocs.pluginsimportBasePlugin# The MetaPlugin class holds the core functionalityclassMetaPlugin(BasePlugin):# Acts on the page content to generate meta tagsdefon_page_content(self,content,page,config,files):# ... (omitted code handling meta description and image generation)# Comments could further explain code (but are omitted for brevity)returncontent# Alters the final page output to include the new meta tagsdefon_post_page(self,output,page,config):# ... (omitted code that injects generated meta tags into the output)# Additional comments could describe processing stepsreturnoutput🤝 ContributeJoin in on the collaboration! 🤗 The success of Ultralytics' open-source initiatives springs from the vibrant contributions of our community. Whether you're fixing bugs, adding features, warming up our discussions, or sharing your Ultralytics project tale,check outhow you can be part of the journey. Filling out oursurveyis another great way to share your feedback. We are deeply thankful 🙇‍♂️ for each contributor's time and efforts!📜 LicenseUltralytics projects come with two licensing flavors:AGPL-3.0 License: This license fosters open collaboration and knowledge sharing, making it a perfect match for students and hobbyists. For specifics, check theLICENSEfile.Enterprise License: When it comes to commercial endeavors, this license gets things rolling by allowing Ultralytics software and AI models to be woven into your business offerings without the AGPL-3.0's open-source constraints. For commercial integrations, please explore ourUltralytics Licensingoptions.✉️ Connect with UsHave you stumbled upon a glitch, or do you have a splendid feature idea? Pop over toGitHub Issuesto drop us a line! Also, join ourDiscordfor buzzing discussions, insights, and tips around our shared ML journeys.