meine
meine 🌒 - A CLI file manager and system utility built with Textual. It combines intuitive command parsing with rich t…
MkDocs plugin for SEO metadata, social cards, JSON-LD, Git authors, Copy for LLM, and llms.txt generation.
Welcome to the MkDocs Ultralytics Plugin! 📄 This powerful tool enhances your MkDocs, Zensical, or any static site documentation with advanced Search Engine Optimization (SEO) features, interactive social elements, and structured data support. It automates the generation of essential meta tags, incorporates social sharing capabilities, and adds JSON-LD structured data to elevate user engagement and improve your documentation's visibility on the web.
Two modes available:
This tool seamlessly integrates valuable features into your documentation site:
llms.txt index after builds for LLM-friendly site discovery.Install via pip:
pip install mkdocs-ultralytics-plugin
Or install from source for development:
git clone https://github.com/ultralytics/mkdocs cd mkdocs pip install -e .
Activate the plugin in your mkdocs.yml:
plugins:
- search
- ultralytics:
add_desc: False
add_image: True
add_authors: True
add_json_ld: True
add_share_buttons: True
default_image: https://example.com/image.png
default_author: you@example.com
Then build normally:
mkdocs build mkdocs serve
For static site generators that don't support MkDocs plugins, use the standalone postprocess script.
Step 1: Create postprocess.py in your project root:
from plugin import postprocess_site
if __name__ == "__main__":
postprocess_site(
site_dir="site", # Your build output directory
docs_dir="docs", # Your source docs directory
site_url="https://example.com",
default_image="https://example.com/image.png",
default_author="you@example.com",
add_desc=True,
add_image=True,
add_authors=True,
add_json_ld=True,
add_share_buttons=True,
add_css=True,
add_copy_llm=True,
verbose=True,
)
Step 2: Build your site and run postprocess:
# For Zensical zensical build && python postprocess.py # For MkDocs (without plugin) mkdocs build && python postprocess.py # For Hugo hugo && python postprocess.py # For Jekyll jekyll build && python postprocess.py
Both modes support the feature options below. Differences: enabled applies to plugin mode only, while postprocess mode reads site_dir, docs_dir, and site_url as arguments (plugin mode gets these from mkdocs.yml) and additionally accepts use_processes (default True) and workers (default: CPU count) to control parallelism.
| Option | Type | Default | Description |
|---|---|---|---|
verbose |
bool | True |
Enable detailed console output |
enabled |
bool | True |
Enable/disable processing |
default_image |
str | None |
Fallback image URL for meta tags |
default_author |
str | None |
Default GitHub author email |
add_desc |
bool | True |
Generate meta description tags |
add_image |
bool | True |
Generate meta image tags |
add_keywords |
bool | True |
Generate meta keyword tags |
add_share_buttons |
bool | True |
Add social share buttons |
add_authors |
bool | False |
Display Git author info |
add_json_ld |
bool | False |
Add JSON-LD structured data |
add_css |
bool | True |
Include inline CSS styles |
add_copy_llm |
bool | True |
Add "Copy for LLM" button |
add_llms_txt |
bool | True |
Generate an llms.txt index |
The tool processes HTML pages to enhance them with metadata and interactive elements:
Extracts the first paragraph from your content and generates <meta name="description"> tags for SEO.
Identifies the first image in the content or uses the default image for og:image and twitter:image tags.
Appends pre-styled Twitter and LinkedIn sharing buttons to your content.
Retrieves Git history to show creation/update dates and author avatars at the bottom of pages.
Generates Article and FAQPage schema for better search engine understanding.
Adds a button next to the "Edit this page" button that fetches the raw Markdown and copies it to clipboard, perfect for sharing with AI assistants.
The codebase is organized for maximum code reuse:
plugin/
├── __init__.py # Package metadata
├── processor.py # ⭐ Core HTML processing logic
├── main.py # MkDocs plugin wrapper
├── postprocess.py # Standalone postprocess wrapper
└── utils.py # Helper functions
Both plugin mode and postprocess mode use the same process_html() function in processor.py, ensuring identical output regardless of which mode you use.
| Feature | Plugin Mode | Postprocess Mode |
|---|---|---|
| Works with | MkDocs only | Any static site generator |
| Processing time | During build (per-page) | After build (batch) |
| Configuration | mkdocs.yml |
Python script |
| Hot reload | ✅ Yes | ❌ No (rebuild required) |
| Git info | ✅ Yes | ✅ Yes |
| Best for | MkDocs projects | Zensical, Hugo, Jekyll, etc. |
Collaboration fuels innovation! 🤗 The success of Ultralytics' open-source projects thrives on community contributions. We welcome your involvement, whether it's fixing bugs, proposing new features, improving documentation, engaging in discussions, or sharing how you use Ultralytics tools.
Please see our Contributing Guide for details. Filling out our Survey also provides valuable feedback. We sincerely appreciate 🙇♂️ every contribution!
Ultralytics provides two licensing options:
Encountered a bug or have an idea? Visit GitHub Issues to report problems or suggest enhancements. For discussions and community support, join our Discord server and check out Ultralytics Reddit.
more like this
meine 🌒 - A CLI file manager and system utility built with Textual. It combines intuitive command parsing with rich t…
Create and add progress bars, Office365 Files and Dropbox Paper papers by labels and link them to your Todoist tasks.
search projects, people, and tags