Skip to main content

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

Project description

mkdocs-ai-summary

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

Uploaded Source

Built Distribution

mkdocs_ai_summary-0.1.0-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for mkdocs_ai_summary-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2c2915aca40dd9666af9804f1dce382d0de15fe268d2afa3356c9c9ac3f33ef4
MD5 b72e654a22cdace072c4e1107976b60c
BLAKE2b-256 05e845338decd49e38c115f52be1acce472477300a644aa41bc6b057192888f7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mkdocs_ai_summary-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2efa9c7b7397b0cc2898ea2ba3b2f312088743ffc3250fc2465312d054eab5e1
MD5 5e338d5e9b2aeedd089d1f6ee7de9430
BLAKE2b-256 0a9f5d42fff00d86ea9db76f42ad34a3d53578e0119df8e366c3cc384c9f2b47

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