A comprehensive SEO plugin for MkDocs with Advanced Meta tags, Open Graph, Twitter Cards, JSON-LD, and more.
Project description
MkDocs Advanced SEO Plugin
A comprehensive, deep, and powerful SEO plugin for MkDocs. This plugin is designed to squeeze every bit of SEO performance out of your MkDocs site by automatically generating advanced meta tags, Open Graph tags, Twitter Cards, and structured data (JSON-LD), while handling edge cases and missing data gracefully.
Features
- Deep SEO Optimization: Automatically inserts a full suite of meta tags (
description,keywords,author,robots, etc.). - Open Graph Support: Fully treats your pages as rich objects for social networks (Facebook, LinkedIn, etc.) with
og:title,og:description,og:image,og:url,og:site_name, andog:locale. - Twitter Cards Integration: Optimizes tweets with summary cards, images, and creator/site attributions.
- JSON-LD Structured Data: Automatically generates Google-compliant
WebPageandBreadcrumbListschema.org Data. - Smart Date Handling: Seamlessly integrates with
mkdocs-document-dates(and similar plugins) to correctly utilize creation and update timestamps (supports complex ISO formats like2025-07-23T07:55:08.813591+08:00). - Canonical URLs: Prevents duplicate content penalties by automatically generating correct canonical links.
- Robust Fallbacks: Designed to work even when metadata is missing, ensuring your site always builds without errors.
Installation
pip install mkdocs-advanced-seo
Usage
Add advanced-seo to your mkdocs.yml plugins list:
plugins:
- advanced-seo
Configuration
The plugin is "batteries included" and works out of the box, but you can deeply customize it:
plugins:
- advanced-seo:
url_base: "https://yourwebsite.com" # Highly Recommended for canonical/OG links
# Feature Toggles
use_canonical_url: true
use_open_graph: true
use_twitter_cards: true
add_schema_org_json_ld: true
# Default Values (Fallbacks)
og_type: "website"
og_image: "assets/default-share-image.jpg"
og_locale: "en_US"
# Twitter Defaults
twitter_card_type: "summary_large_image"
twitter_site: "@yourproject"
twitter_creator: "@yourhandle"
# Advanced Integration
support_document_dates: true # Auto-detect dates from other plugins
Frontmatter Overrides
You can control SEO parameters on a per-page basis using standard YAML frontmatter:
---
title: My Awesome Page
description: A custom description for search engines.
image: assets/page-specific-image.jpg
date: 2023-05-20
---
Development and Testing
This project includes a test suite to verify SEO tag generation.
-
Clone the repository.
-
Install dependencies:
pip install -e . -
Run verification:
python verify.py
Support & Contributing
This project is personally maintained by the author.
- Bug Reports: Welcome! Please open an issue if you find a bug or incorrect SEO tag generation.
- Contributions: Pull requests for bug fixes and corrections are appreciated. Major feature requests may not be prioritized due to time constraints.
[!NOTE] This project structure and code were generated by Antigravity (Google DeepMind) under human supervision. Verification and acceptance were performed by the user.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mkdocs_advanced_seo-1.0.3.tar.gz.
File metadata
- Download URL: mkdocs_advanced_seo-1.0.3.tar.gz
- Upload date:
- Size: 12.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9f079064bf6c4b29f7b3e4f63e83c39b51328b7106786db2e289026f948855cc
|
|
| MD5 |
66a098bdac55cdf175f3ea0d2473874d
|
|
| BLAKE2b-256 |
cdd1f0e4ce5d7ea5cd6a74127674fba687cd9c6771ddaf857ab0d6ffecc24bf9
|
Provenance
The following attestation bundles were made for mkdocs_advanced_seo-1.0.3.tar.gz:
Publisher:
publish.yml on raineblog/mkdocs-advanced-seo
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mkdocs_advanced_seo-1.0.3.tar.gz -
Subject digest:
9f079064bf6c4b29f7b3e4f63e83c39b51328b7106786db2e289026f948855cc - Sigstore transparency entry: 894006832
- Sigstore integration time:
-
Permalink:
raineblog/mkdocs-advanced-seo@6ea6424e6909f59455339e6f3f4f7a2c68b7524c -
Branch / Tag:
refs/tags/v1.0.3 - Owner: https://github.com/raineblog
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@6ea6424e6909f59455339e6f3f4f7a2c68b7524c -
Trigger Event:
push
-
Statement type:
File details
Details for the file mkdocs_advanced_seo-1.0.3-py3-none-any.whl.
File metadata
- Download URL: mkdocs_advanced_seo-1.0.3-py3-none-any.whl
- Upload date:
- Size: 7.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1bc2296a1f74612ebad12a0c131ebe8ae0edf54b98a22e1d60af4a69b00f101d
|
|
| MD5 |
6536bd67c937c69f35984e3f659be646
|
|
| BLAKE2b-256 |
1b84c4383c37f7e9121428c8468085c8173ba3e0f8fbd5977d9fc73b6bd61fa5
|
Provenance
The following attestation bundles were made for mkdocs_advanced_seo-1.0.3-py3-none-any.whl:
Publisher:
publish.yml on raineblog/mkdocs-advanced-seo
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mkdocs_advanced_seo-1.0.3-py3-none-any.whl -
Subject digest:
1bc2296a1f74612ebad12a0c131ebe8ae0edf54b98a22e1d60af4a69b00f101d - Sigstore transparency entry: 894006926
- Sigstore integration time:
-
Permalink:
raineblog/mkdocs-advanced-seo@6ea6424e6909f59455339e6f3f4f7a2c68b7524c -
Branch / Tag:
refs/tags/v1.0.3 - Owner: https://github.com/raineblog
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@6ea6424e6909f59455339e6f3f4f7a2c68b7524c -
Trigger Event:
push
-
Statement type: