Skip to main content

A mkdocs plugin to generage summary with the help of AI.

Project description

mkdocs-ai-summary

PyPI - Version PyPI - Implementation PyPI - Python Version

Generage an ai-summary for the page:

Minimal demo aiboy996.github.io/mkdocs-ai-summary

Live demo(my homepage): yangzhang.site

Installation

You should install the package with pip:

pip install mkdocs-ai-summary[tongyi]

Only support tongyi ai for now. Soon to support ChatGPT.

And you should include the ai-summary.css(optional, this is for the custom admonition style) in the config file as below:

Configuration

A demo for mkdocs.yml:

site_name: mkdocs-ai-summary
theme:
  name: material

plugins:
  - ai-summary:
      api: "tongyi"
      ignore_code: true
      cache: true
      cache_dir: "./"
      prompt: "请帮我把下面的内容总结为200字以内的摘要:"
  - tags

markdown_extensions:
  - admonition
  - pymdownx.details
  - pymdownx.superfences
  - pymdownx.tabbed:
      alternate_style: true 
extra_css:
  - ai-summary.css

Then for each page you can add the ai-summary with a meta tag:

---
include:
- ai-summary
---

# h1

....

About Cache

Don't worry about duplicate api calls, we've made the cache function so that if you've done an ai-summary before and the content hasn't changed it will use the cache.

Enjoy it.

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_ai_summary-0.1.1.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

mkdocs_ai_summary-0.1.1-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file mkdocs_ai_summary-0.1.1.tar.gz.

File metadata

  • Download URL: mkdocs_ai_summary-0.1.1.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.10.14

File hashes

Hashes for mkdocs_ai_summary-0.1.1.tar.gz
Algorithm Hash digest
SHA256 7edf3277b20c5d125bc5c44a56a2e361a00e919290ffa1164354cd0a20bf3acb
MD5 045449f69cd9ea3738d9ad3a13069da2
BLAKE2b-256 87edcf082a4bcd278ec2febcc8ddea00489e2f89626a4d51202de86a9df1f7c2

See more details on using hashes here.

File details

Details for the file mkdocs_ai_summary-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for mkdocs_ai_summary-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f8bb7ba96826777e4a6067e202edf1a6703296e9442a97ff558f189bb9e00776
MD5 216f79c5607f2977cbf012dad99b0830
BLAKE2b-256 aa072091e12aa78cb3f7e6ea1b0cd34684564256dbb5b611b1e8c4d36351b6a8

See more details on using hashes here.

Supported by

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