Skip to main content

A new generation MkDocs plugin for displaying exact creation date, last updated date, authors, email of documents

Project description

mkdocs-document-dates

English | 简体中文


A new generation MkDocs plugin for displaying exact creation date, last updated date, authors, email of documents

render

Features

  • Works in any environment: no-Git, Git environments, Docker, all CI/CD build systems, etc.
  • Support list display of recently updated documents (in descending order of update date)
  • Support for manually specifying date and author in Front Matter
  • Support for multiple date formats (date, datetime, timeago)
  • Support for multiple author modes (avatar, text, hidden)
  • Support for manually configuring author's name, link, avatar, email, etc.
  • Flexible display position (top or bottom)
  • Elegant styling (fully customizable)
  • Multi-language support, localization support, intelligent recognition of user language, automatic adaptation
  • Ultimate build efficiency: O(1), no need to set the env var !ENV to distinguish runs
Build Speed Comparison: 100 md: 1000 md: Time Complexity:
git-revision-date-localized
git-authors
> 3 s > 30 s O(n)
document-dates < 0.1 s < 0.15 s O(1)

Installation

pip install mkdocs-document-dates

Configuration

Just add the plugin to your mkdocs.yml:

plugins:
  - document-dates

Or, common configuration:

plugins:
  - document-dates:
      position: top            # Display position: top(after title) bottom(end of document), default: top
      type: date               # Date type: date datetime timeago, default: date
      exclude:                 # List of excluded files (support unix shell-style wildcards)
        - temp.md                  # Example: exclude the specified file
        - blog/*                   # Example: exclude all files in blog folder, including subfolders
        - '*/index.md'             # Example: exclude all index.md files in any subfolders

Customization Settings

In addition to the above basic configuration, the plug-in also provides a wealth of customization options to meet a variety of individual needs:

  • Date & Time: Introduces the mechanism for obtaining document dates and methods for personalized customization, support for manually specifying the creation date and last updated date for each document
  • Author: Introduces the mechanism for obtaining document authors and methods for personalized customization, support for manually specifying the author information for each document, such as name, link, avatar, email, etc.
  • Avatar: You can manually specify the avatar for each author, support local file path and URL path
  • Structure and Style: You can freely configure the plugin's display structure in mkdocs.yml or Front Matter. You can quickly set the plugin styles through preset entrances, such as icons, themes, colors, fonts, animations, dividing line and so on
  • Template Variables: Can be used to optimize sitemap.xml for site SEO
  • Recently Updated Module: Enable list of recently updated documents (in descending order of update date), this is ideal for sites with a large number of documents, so that readers can quickly see what's new
  • Localization Language: More localization languages for timeago and tooltip
  • Development Stories: Describes the origin of the plug-in, the difficulties and solutions encountered in development, and the principles and directions of product design

See the documentation for details: https://jaywhj.netlify.app/document-dates-en

recently-updated

Other Projects

  • MaterialX, the next generation of mkdocs-material. Build beautiful sites the way you already know and love. Based on mkdocs-material-9.7.1 and is named X, it provides ongoing maintenance and updates (since mkdocs-material will stop being maintained).
    Updates have been released that refactor and add a lot of new features, see https://github.com/jaywhj/mkdocs-materialx/releases/

Chat Group

Discord: https://discord.gg/cvTfge4AUy

Wechat:

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mkdocs_document_dates-3.7.4.tar.gz (194.1 kB view details)

Uploaded Source

Built Distribution

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

mkdocs_document_dates-3.7.4-py3-none-any.whl (199.4 kB view details)

Uploaded Python 3

File details

Details for the file mkdocs_document_dates-3.7.4.tar.gz.

File metadata

  • Download URL: mkdocs_document_dates-3.7.4.tar.gz
  • Upload date:
  • Size: 194.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.0

File hashes

Hashes for mkdocs_document_dates-3.7.4.tar.gz
Algorithm Hash digest
SHA256 75cbb2aea5ee90d9f6fbd5c07d96df1b923f1f9bb6cdc44ef5b90d3c0f74e525
MD5 7a6a8bc0f7c6873bd2d074ed73d2183d
BLAKE2b-256 a33660718707e71cf86ca18680c7830d6204c19cfe6a6320a606c2ad2fbfb970

See more details on using hashes here.

File details

Details for the file mkdocs_document_dates-3.7.4-py3-none-any.whl.

File metadata

File hashes

Hashes for mkdocs_document_dates-3.7.4-py3-none-any.whl
Algorithm Hash digest
SHA256 5d744c38dd7c2656a7c206da52f3aec9524b8ea6df454a8fc23ba249eb1a7769
MD5 f42915cbadd9934e99b0e11a74a6ffed
BLAKE2b-256 d1f5b4fefdd0e8d9bd0b4844de32722d0ef0e6204262318aa1b753133562a6c4

See more details on using hashes here.

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