Skip to main content

A comprehensive SEO plugin for MkDocs with Advanced Meta tags, Open Graph, Twitter Cards, JSON-LD, and more.

Project description

MkDocs Advanced SEO Plugin

PyPI version License: MIT

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, and og:locale.
  • Twitter Cards Integration: Optimizes tweets with summary cards, images, and creator/site attributions.
  • JSON-LD Structured Data: Automatically generates Google-compliant WebPage and BreadcrumbList schema.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 like 2025-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.

  1. Clone the repository.

  2. Install dependencies: pip install -e .

  3. 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

mkdocs_advanced_seo-1.0.1.tar.gz (12.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mkdocs_advanced_seo-1.0.1-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

Details for the file mkdocs_advanced_seo-1.0.1.tar.gz.

File metadata

  • Download URL: mkdocs_advanced_seo-1.0.1.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

Hashes for mkdocs_advanced_seo-1.0.1.tar.gz
Algorithm Hash digest
SHA256 c14413246ca4f572d705bcd81339e2348768eb42b623cc470bb12efc5db2e8eb
MD5 0f8aff84d31359ddde037c0a25f386a0
BLAKE2b-256 f2011c5e1c2ec9565626eb13edd766a8c646d08d1bb942c48514f689e058b567

See more details on using hashes here.

Provenance

The following attestation bundles were made for mkdocs_advanced_seo-1.0.1.tar.gz:

Publisher: publish.yml on raineblog/mkdocs-advanced-seo

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mkdocs_advanced_seo-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for mkdocs_advanced_seo-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4395cf6457bfd4b1981ac47ebc1526be54b0ba293a74124ec6ccf47a6e523671
MD5 e1388d38188a46f3609adaa99739b9f0
BLAKE2b-256 ea3c3dd736367baee84340a9b729ce8f9bb431b981888f1e72b7f25d44ad1eb1

See more details on using hashes here.

Provenance

The following attestation bundles were made for mkdocs_advanced_seo-1.0.1-py3-none-any.whl:

Publisher: publish.yml on raineblog/mkdocs-advanced-seo

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page