From 0fe0c74258f253b063b25c833a929b812bc7264a Mon Sep 17 00:00:00 2001 From: AIboy996 <2207854887@qq.com> Date: Thu, 23 May 2024 00:00:24 +0800 Subject: [PATCH] [feature] add ai summary --- .github/workflows/issueMySite.yml | 3 ++- _ai_summary_cache.json | 1 + docs/Blog/2023/travel_to_japan.md | 2 ++ docs/Blog/2024/travel_to_hk.md | 2 ++ docs/Blog/2024/winter.md | 2 ++ docs/Python/BasicSyntax/builtin_class.md | 2 ++ docs/Python/BasicSyntax/builtin_keyword.md | 2 ++ docs/Python/SeniorSyntax/OOP.md | 2 ++ .../SeniorSyntax/functional_programming.md | 2 ++ docs/Python/StandardLibrary/re.md | 2 ++ docs/Python/StandardLibrary/time.md | 2 ++ docs/assets/stylesheets/ai-summary.css | 21 +++++++++++++++++++ mkdocs.yml | 1 + plugins_full.yml | 1 + requirements.txt | 1 + 15 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 _ai_summary_cache.json create mode 100644 docs/assets/stylesheets/ai-summary.css diff --git a/.github/workflows/issueMySite.yml b/.github/workflows/issueMySite.yml index c18b16be1..26f81fc9f 100644 --- a/.github/workflows/issueMySite.yml +++ b/.github/workflows/issueMySite.yml @@ -9,6 +9,7 @@ on: jobs: build: runs-on: ubuntu-latest + environment: mkdocs-build steps: - uses: actions/checkout@v4 with: @@ -17,7 +18,7 @@ jobs: with: python-version: "3.11.5" - run: python3 -m pip install -r requirements.txt - - run: PLUGIN="./plugins_full.yml" mkdocs gh-deploy --force -b publishment + - run: PLUGIN="./plugins_full.yml" DASHSCOPE_API_KEY=${{ secrets.DASHSCOPE_API_KEY }} mkdocs gh-deploy --force -b publishment deployment-cloudfare-pages: needs: build runs-on: ubuntu-latest diff --git a/_ai_summary_cache.json b/_ai_summary_cache.json new file mode 100644 index 000000000..473aa18c3 --- /dev/null +++ b/_ai_summary_cache.json @@ -0,0 +1 @@ +{"\u4e94\u4e00\u66b4\u8d70\u5e7f\u4e1c": {"content_md5": "84aede98ca446560c9cc99d565996026", "ai_summary": "\u4e94\u4e00\u671f\u95f4\uff0c\u4f5c\u8005\u72ec\u81ea\u66b4\u8d70\u5e7f\u4e1c\uff08\u5e7f\u5dde\u3001\u9999\u6e2f\u3001\u6df1\u5733\uff09\uff0c\u4eab\u53d7\u4e86\u5929\u65f6\u5730\u5229\u4eba\u548c\u7684\u65c5\u884c\u4f53\u9a8c\u3002\u5e7f\u4e1c\u8fde\u6708\u66b4\u96e8\u540e\u8fce\u6765\u6674\u6717\u5929\u6c14\uff0c\u76f8\u6bd4\u4e0a\u6d77\uff0c\u5e7f\u4e1c\u65c5\u6e38\u666f\u70b9\u4eba\u5c11\u4e14\u7f8e\u98df\u4e30\u5bcc\u3002\u4f5c\u8005\u5206\u4eab\u4e86\u901a\u5bb5\u7eff\u76ae\u706b\u8f66\u65c5\u884c\u5efa\u8bae\uff0c\u5305\u62ec\u9009\u4e0b\u94fa\u3001\u6ce1\u9762\u3001\u5145\u7535\u5b9d\u548c\u773c\u8033\u9632\u62a4\u7b49\u3002\u9999\u6e2f\u4e4b\u884c\u8f7b\u677e\u4fbf\u6377\uff0c\u6d89\u53ca\u7b7e\u6ce8\u3001\u652f\u4ed8\u3001\u4ea4\u901a\u548c\u4e0a\u7f51\u5efa\u8bae\u3002\u5403\u559d\u73a9\u4e50\u65b9\u9762\uff0c\u54c1\u5c1d\u4e86\u7ca4\u83dc\u3001\u6d77\u9c9c\u7b49\uff0c\u6e38\u89c8\u4e86\u73e0\u6c5f\u3001\u6e2f\u5927\u3001\u6df1\u5733\u6e7e\u7b49\u5730\uff0c\u611f\u53d7\u5230\u6df1\u5733\u7684\u6d3b\u529b\u4e0e\u73b0\u4ee3\u5316\u3002\u6574\u4e2a\u65c5\u7a0b\u4e2d\uff0c\u4f5c\u8005\u8bb0\u5f55\u4e86\u5e7f\u5dde\u7684\u8001\u57ce\u98ce\u60c5\u3001\u9999\u6e2f\u7684\u5b81\u9759\u548c\u6df1\u5733\u7684\u73b0\u4ee3\u5316\u90fd\u5e02\u666f\u8c61\u3002"}, "\u51ac\u304c\u4e00\u756a\u5acc\u3044": {"content_md5": "fdb276d87d161c28fd3c2ae8aa2e403f", "ai_summary": "\u672c\u6587\u4f5c\u8005\u8868\u8fbe\u4e86\u5bf9\u51ac\u5929\u7684\u4e0d\u559c\u6b22\uff0c\u5c24\u5176\u662f\u5728\u6c5f\u6d59\u6caa\u5730\u533a\uff0c\u56e0\u5929\u6c14\u5bd2\u51b7\u3001\u65e0\u4f9b\u6696\u3001\u7f3a\u4e4f\u51ac\u5b63\u6d3b\u52a8\u548c\u4eba\u6587\u4e50\u8da3\uff0c\u4e14\u7a7f\u8863\u590d\u6742\u8d39\u65f6\u3002\u8001\u820d\u7b14\u4e0b\u7684\u6d4e\u5357\u51ac\u5929\u6e29\u6696\u8212\u9002\u5f62\u6210\u5bf9\u6bd4\u3002\u4f5c\u8005\u671f\u5f85\u6625\u5929\u7684\u5230\u6765\uff0c\u5e76\u63d0\u5230\u4e1c\u5317\u7684\u51b0\u96ea\u6d3b\u52a8\u548c\u7f8e\u98df\u662f\u51ac\u5b63\u4eae\u70b9\u3002\u6587\u7ae0\u7ed3\u5c3e\u611f\u53f9\u51ac\u5929\u7684\u4e0d\u4fbf\u548c\u5e0c\u671b\u5176\u5c3d\u5feb\u8fc7\u53bb\u3002"}, "\u5185\u7f6e\u7c7b": {"content_md5": "14d67f3833ee46e01143fa8c28f176c4", "ai_summary": "\u672c\u6559\u7a0b\u4ecb\u7ecd\u4e86Python\u7f16\u7a0b\u7684\u57fa\u7840\u6982\u5ff5\uff0c\u5305\u62ec\u7c7b\u3001\u5bf9\u8c61\u3001\u5185\u7f6e\u51fd\u6570\u3001\u6570\u636e\u7c7b\u578b\u548c\u6a21\u5757\u3002\u8981\u5b66\u4f1a\u4f7f\u7528`dir`\u548c`help`\u51fd\u6570\uff0c\u5b83\u4eec\u80fd\u5e2e\u52a9\u67e5\u8be2\u5bf9\u8c61\u5c5e\u6027\u548c\u83b7\u53d6\u51fd\u6570\u4fe1\u606f\u3002\u7c7b\u662f\u5bf9\u8c61\u7684\u62bd\u8c61\uff0c\u5982`\u8001\u5e08`\u662f\u7c7b\uff0c\u5bf9\u8c61\u662f\u7c7b\u7684\u5b9e\u4f8b\uff0c\u5982\u738b\u8001\u5e08\u3002Python\u4e2d\u4e07\u7269\u7686\u5bf9\u8c61\uff0c\u5185\u7f6e\u6570\u636e\u7c7b\u578b\u5982\u5b57\u7b26\u4e32\u3001\u5217\u8868\u3001\u6574\u6570\u7b49\u90fd\u662f\u7c7b\u3002\u5185\u7f6e\u51fd\u6570\u5982`print`\u548c`help`\u63d0\u4f9b\u4e86\u4ea4\u4e92\u5f0f\u5b66\u4e60\u5de5\u5177\u3002\u901a\u8fc7\u7406\u89e3\u7c7b\u7684\u89c6\u89d2\uff0c\u8bfb\u8005\u80fd\u66f4\u597d\u5730\u638c\u63e1Python\u7684\u57fa\u672c\u6784\u9020\u548c\u64cd\u4f5c\u3002\u6b64\u5916\uff0c\u8fd8\u63d0\u5230\u4e86\u5b57\u7b26\u4e32\u3001\u5217\u8868\u63a8\u5bfc\u5f0f\u7b49\u91cd\u8981\u77e5\u8bc6\u70b9\u3002\u6700\u540e\uff0c\u5185\u7f6e\u51fd\u6570\u5982`print`\u548c`len`\u7b49\u7684\u4f7f\u7528\u65b9\u6cd5\u4e5f\u8fdb\u884c\u4e86\u8bf4\u660e\u3002"}, "\u5185\u7f6e\u5173\u952e\u5b57": {"content_md5": "538b7f572314ad5f9faea3aabe7c4f02", "ai_summary": "\u672c\u6587\u4ecb\u7ecd\u4e86Python\u7f16\u7a0b\u4e2d\u7684\u5173\u952e\u6982\u5ff5\uff0c\u5305\u62ec\u591a\u884c\u903b\u8f91\u5757\uff08\u7f29\u8fdb\uff09\u3001\u81ea\u5b9a\u4e49\u51fd\u6570\uff08`def`\u548c`lambda`\uff09\u3001\u81ea\u5b9a\u4e49\u7c7b\uff08`class`\u548c\u7ee7\u627f\uff09\u3001\u6761\u4ef6\u8bed\u53e5\uff08`if`\u3001`elif`\u3001`if...else`\u548c`match`\uff09\u3001\u5faa\u73af\uff08`for`\u3001`while`\u548c\u63a7\u5236\u7ed3\u6784\u5982`continue`\u3001`break`\u3001`pass`\uff09\u3001`import`\u8bed\u53e5\u3001\u5f02\u5e38\u5904\u7406\uff08`try`\u3001`except`\u3001`else`\u3001`finally`\u3001\u81ea\u5b9a\u4e49\u5f02\u5e38\u548c`assert`\uff09\u3002\u8fd9\u4e9b\u5185\u5bb9\u6db5\u76d6\u4e86\u57fa\u7840\u8bed\u6cd5\u7684\u63a7\u5236\u6d41\u548c\u6570\u636e\u7ed3\u6784\uff0c\u5f3a\u8c03\u4e86\u5b9e\u8df5\u548c\u7406\u89e3\u7684\u91cd\u8981\u6027\u3002\u5efa\u8bae\u901a\u8fc7\u7f16\u5199\u4ee3\u7801\u6765\u52a0\u6df1\u5bf9\u8fd9\u4e9b\u6982\u5ff5\u7684\u7406\u89e3\u3002"}, "\u9762\u5411\u5bf9\u8c61\u7f16\u7a0b": {"content_md5": "01cb620afb279ba70ee8608e23a93745", "ai_summary": "\u672c\u6587\u8be6\u7ec6\u4ecb\u7ecd\u4e86Python\u4e2d\u7684\u9762\u5411\u5bf9\u8c61\u7f16\u7a0b\uff08OOP\uff09\uff0c\u5f3a\u8c03\u4e86OOP\u5728Python\u4e2d\u7684\u5f3a\u5927\u63a7\u5236\u80fd\u529b\uff0c\u5305\u62ec\u5bf9\u8c61\u7684\u884c\u4e3a\u63a7\u5236\uff08\u5982\u8fed\u4ee3\u3001\u6253\u5370\u3001\u4e0a\u4e0b\u6587\u7ba1\u7406\u7b49\uff09\u3001\u5143\u7c7b\u7684\u5e94\u7528\uff08\u5982\u5b9a\u4e49\u7c7b\u7684\u8fc7\u7a0b\uff09\u3001\u7c7b\u548c\u5b9e\u4f8b\u5c5e\u6027\u3001\u65b9\u6cd5\uff08\u5305\u62ec\u9759\u6001\u65b9\u6cd5\u3001\u7c7b\u65b9\u6cd5\u3001\u9b54\u6cd5\u65b9\u6cd5\u7b49\uff09\u3001\u591a\u6001\u3001\u4ee5\u53ca\u9b54\u6cd5\u65b9\u6cd5\u5982\u6784\u9020\u65b9\u6cd5\u3001\u8868\u793a\u65b9\u6cd5\u3001\u6bd4\u8f83\u548c\u8fd0\u7b97\u7b26\u3001\u8f6c\u6362\u65b9\u6cd5\u3001\u5c5e\u6027\u8bbf\u95ee\u63a7\u5236\u3001\u8fed\u4ee3\u5668\u3001\u63cf\u8ff0\u5668\u3001\u5bb9\u5668\u64cd\u4f5c\u3001\u4e0a\u4e0b\u6587\u7ba1\u7406\u5668\u3001\u53ef\u8c03\u7528\u5bf9\u8c61\u3001\u534f\u7a0b\u548c\u6cdb\u578b\u7b49\u3002\u6587\u7ae0\u8fd8\u6d89\u53ca\u7c7b\u7684\u521b\u5efa\u8fc7\u7a0b\uff0c\u5982\u5143\u7c7b\u7684\u4f7f\u7528\u548c\u7c7b\u7684\u7ee7\u627f\uff0c\u4ee5\u53ca\u5982\u4f55\u901a\u8fc7\u5143\u7c7b\u5b9e\u73b0\u81ea\u5b9a\u4e49\u7c7b\u7684\u884c\u4e3a\u3002\u6700\u540e\uff0c\u4f5c\u8005\u63d0\u9192\u8bfb\u8005\u4e0d\u5fc5\u8fc7\u4e8e\u5173\u6ce8\u590d\u6742\u7684\u8bed\u6cd5\u7ec6\u8282\uff0c\u800c\u5e94\u6ce8\u91cd\u5b9e\u9645\u7f16\u7a0b\u7ecf\u9a8c\u548c\u5e38\u7528\u5e93\u7684\u8fd0\u7528\u3002"}, "\u51fd\u6570\u5f0f\u7f16\u7a0b": {"content_md5": "e3aeb69f4fcd5e6c50e24c4a33a5e853", "ai_summary": "\u51fd\u6570\u5f0f\u7f16\u7a0b\u662f\u4e00\u79cd\u7f16\u7a0b\u8303\u5f0f\uff0c\u5b83\u5c06\u95ee\u9898\u89c6\u4e3a\u65e0\u72b6\u6001\u51fd\u6570\u7684\u5e8f\u5217\u8ba1\u7b97\uff0c\u4fa7\u91cd\u4e8e\u63cf\u8ff0\u95ee\u9898\u800c\u975e\u6307\u4ee4\u3002\u4e0e\u8fc7\u7a0b\u5f0f\u3001\u58f0\u660e\u5f0f\u548c\u9762\u5411\u5bf9\u8c61\u7f16\u7a0b\u4e0d\u540c\uff0c\u51fd\u6570\u5f0f\u7f16\u7a0b\u5f3a\u8c03\u7eaf\u51fd\u6570\uff0c\u5373\u63a5\u53d7\u8f93\u5165\u540e\u8f93\u51fa\u786e\u5b9a\u7684\u7ed3\u679c\uff0c\u4e0d\u6539\u53d8\u81ea\u8eab\u72b6\u6001\u3002Python\u652f\u6301\u51fd\u6570\u5f0f\u7f16\u7a0b\uff0c\u5305\u62ec\u4f7f\u7528\u5f62\u53c2\u548c\u5b9e\u53c2\u3001\u51fd\u6570\u8fd4\u56de\u503c\u3001\u9012\u5f52\u3001\u8fed\u4ee3\u5668\uff08\u5982\u751f\u6210\u5668\uff09\u3001\u88c5\u9970\u5668\u7b49\u529f\u80fd\u3002\u751f\u6210\u5668\u7b80\u5316\u4e86\u8fed\u4ee3\u5668\u7684\u5b9e\u73b0\uff0c\u800c\u88c5\u9970\u5668\u5219\u7528\u4e8e\u5728\u4e0d\u6539\u53d8\u539f\u51fd\u6570\u4ee3\u7801\u7684\u60c5\u51b5\u4e0b\u6dfb\u52a0\u989d\u5916\u529f\u80fd\uff0c\u5982\u65e5\u5fd7\u3001\u53c2\u6570\u9a8c\u8bc1\u548c\u5f02\u5e38\u5904\u7406\u3002Python\u7684`functools`\u6a21\u5757\u63d0\u4f9b\u4e86\u5b9e\u7528\u7684\u88c5\u9970\u5668\uff0c\u5982\u7f13\u5b58\u548c\u4fdd\u6301\u51fd\u6570\u5143\u4fe1\u606f\u3002"}, "re": {"content_md5": "eded0f54965dbd422a06ef23b4b86755", "ai_summary": "`re`\u662fPython\u6807\u51c6\u5e93\u4e2d\u7684\u6b63\u5219\u8868\u8fbe\u5f0f\u6a21\u5757\uff0c\u7528\u4e8e\u5904\u7406\u548c\u5339\u914d\u6587\u672c\u4e2d\u7684\u6a21\u5f0f\u3002\u6b63\u5219\u8868\u8fbe\u5f0f\u662f\u4e00\u79cd\u5f3a\u5927\u7684\u6587\u672c\u5904\u7406\u5de5\u5177\uff0c\u53ef\u4ee5\u7528\u6765\u6807\u51c6\u5316\u6708\u85aa\u3001\u63d0\u53d6\u7279\u5b9a\u5b57\u7b26\u6a21\u5f0f\u3001\u5206\u5272\u5b57\u7b26\u4e32\u7b49\u3002`re`\u5e93\u63d0\u4f9b\u4e86\u591a\u79cd\u51fd\u6570\u5982`match`, `fullmatch`, `search`, `sub`, `split`\u7b49\uff0c\u7528\u4e8e\u6267\u884c\u5339\u914d\u3001\u67e5\u627e\u548c\u66ff\u6362\u64cd\u4f5c\u3002\u6b63\u5219\u8868\u8fbe\u5f0f\u5305\u542b\u4e30\u5bcc\u7684\u8bed\u6cd5\uff0c\u5982\u7279\u6b8a\u5b57\u7b26\uff08\u5982`.`, `^`, `$`, `[]`, `()`\u7b49\uff09\uff0c\u4ee5\u53ca\u53ef\u9009\u7684\u6807\u5fd7\uff08\u5982`re.IGNORECASE`\uff09\u6765\u63a7\u5236\u5339\u914d\u884c\u4e3a\u3002\u901a\u8fc7\u5b9e\u4f8b\u6f14\u793a\u548cAPI\u8c03\u7528\uff0c\u53ef\u4ee5\u7075\u6d3b\u8fd0\u7528\u6b63\u5219\u8868\u8fbe\u5f0f\u8fdb\u884c\u6587\u672c\u5904\u7406\u3002"}, "time": {"content_md5": "bb4f89beb98a03562485c94a4ea65406", "ai_summary": "Python\u4e2d\u7684time\u6a21\u5757\u63d0\u4f9b\u5e95\u5c42\u65f6\u95f4\u5904\u7406\uff0cdatetime\u6a21\u5757\u5219\u4e3a\u7528\u6237\u53cb\u597d\uff0c\u5305\u542bdate\u3001time\u548cdatetime\u7c7b\uff0c\u7528\u4e8e\u65e5\u671f\u548c\u65f6\u95f4\u64cd\u4f5c\uff0c\u5982\u521b\u5efa\u3001\u89e3\u6790\u3001\u683c\u5f0f\u5316\u548c\u8ba1\u7b97\u3002calender\u5e93\u7528\u4e8e\u67e5\u770b\u65e5\u5386\u3002time\u7c7b\u4e3b\u8981\u7528\u4e8e\u65f6\u95f4\u6233\u548c\u57fa\u672c\u65f6\u95f4\u8868\u793a\uff0c\u800cdatetime\u7c7b\u652f\u6301\u65e5\u671f\u8303\u56f4\u548c\u65f6\u95f4\u8de8\u5ea6\u8ba1\u7b97\u3002\u7279\u522b\u63d0\u5230\u95f0\u79d2\u548cUTC\u65f6\u95f4\u6807\u51c6\u3002date\u7c7b\u53ef\u7528\u4e8e\u6307\u5b9a\u65e5\u671f\u3001\u4eca\u65e5\u3001\u4ece\u5e8f\u6570\u6216\u65f6\u95f4\u6233\u521b\u5efa\uff0c\u63d0\u4f9b\u4e86\u4e30\u5bcc\u7684\u5c5e\u6027\u548c\u65b9\u6cd5\u3002calender\u5e93\u5219\u63d0\u4f9b\u67e5\u770b\u65e5\u5386\u7684\u529f\u80fd\u3002"}} \ No newline at end of file diff --git a/docs/Blog/2023/travel_to_japan.md b/docs/Blog/2023/travel_to_japan.md index da41f5407..abea062b0 100644 --- a/docs/Blog/2023/travel_to_japan.md +++ b/docs/Blog/2023/travel_to_japan.md @@ -3,6 +3,8 @@ tags: - blog - 毕业碎碎念 - 旅行 +include: +- ai-summary --- # 毕业.旅行 diff --git a/docs/Blog/2024/travel_to_hk.md b/docs/Blog/2024/travel_to_hk.md index 470b7d2e6..a1e26bb32 100644 --- a/docs/Blog/2024/travel_to_hk.md +++ b/docs/Blog/2024/travel_to_hk.md @@ -2,6 +2,8 @@ tags: - blog - 旅行 +include: +- ai-summary --- # 五一暴走广东 diff --git a/docs/Blog/2024/winter.md b/docs/Blog/2024/winter.md index 6f94ec63f..029e39903 100644 --- a/docs/Blog/2024/winter.md +++ b/docs/Blog/2024/winter.md @@ -1,6 +1,8 @@ --- tags: - blog +include: +- ai-summary --- # 冬が一番嫌い diff --git a/docs/Python/BasicSyntax/builtin_class.md b/docs/Python/BasicSyntax/builtin_class.md index 865db8aba..9de34cf22 100644 --- a/docs/Python/BasicSyntax/builtin_class.md +++ b/docs/Python/BasicSyntax/builtin_class.md @@ -1,6 +1,8 @@ --- tags: - PyIntro +include: +- ai-summary --- # 内置类 diff --git a/docs/Python/BasicSyntax/builtin_keyword.md b/docs/Python/BasicSyntax/builtin_keyword.md index a21a6da21..4d4be9da1 100644 --- a/docs/Python/BasicSyntax/builtin_keyword.md +++ b/docs/Python/BasicSyntax/builtin_keyword.md @@ -1,6 +1,8 @@ --- tags: - PyIntro +include: +- ai-summary --- # 内置关键字 到目前为止,我们所学的内容都是**一句话**可以解决的。不论是函数调用,还是变量赋值抑或是创建对象。 diff --git a/docs/Python/SeniorSyntax/OOP.md b/docs/Python/SeniorSyntax/OOP.md index 7c1ad8006..4bddc9b01 100644 --- a/docs/Python/SeniorSyntax/OOP.md +++ b/docs/Python/SeniorSyntax/OOP.md @@ -1,6 +1,8 @@ --- tags: - PySenior +include: +- ai-summary --- # 面向对象编程 diff --git a/docs/Python/SeniorSyntax/functional_programming.md b/docs/Python/SeniorSyntax/functional_programming.md index 8ab9119b3..3f8cfc0d7 100644 --- a/docs/Python/SeniorSyntax/functional_programming.md +++ b/docs/Python/SeniorSyntax/functional_programming.md @@ -1,6 +1,8 @@ --- tags: - PySenior +include: +- ai-summary --- # 函数式编程 diff --git a/docs/Python/StandardLibrary/re.md b/docs/Python/StandardLibrary/re.md index 0eab09503..31e5ef20c 100644 --- a/docs/Python/StandardLibrary/re.md +++ b/docs/Python/StandardLibrary/re.md @@ -1,6 +1,8 @@ --- tags: - PyLib +include: +- ai-summary --- # re diff --git a/docs/Python/StandardLibrary/time.md b/docs/Python/StandardLibrary/time.md index abfa49334..2ef20bb72 100644 --- a/docs/Python/StandardLibrary/time.md +++ b/docs/Python/StandardLibrary/time.md @@ -1,6 +1,8 @@ --- tags: - PyLib +include: +- ai-summary --- # time diff --git a/docs/assets/stylesheets/ai-summary.css b/docs/assets/stylesheets/ai-summary.css new file mode 100644 index 000000000..41641bc0c --- /dev/null +++ b/docs/assets/stylesheets/ai-summary.css @@ -0,0 +1,21 @@ +:root { + --md-admonition-icon--ai-summary: url('data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyMTAgMjEwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGZpbGw9IiM2MTVDRUQiIGQ9Im0yMTIgMTI3LjEtMjQuMi00Mi0yLjktNSAxMi44LTIyLjFjMC40LTAuOCAwLjctMS42IDAuNy0yLjVzLTAuMi0xLjctMC43LTIuNWwtMTQuMy0yNC43Yy0wLjQtMC44LTEuMS0xLjQtMS44LTEuOHMtMS42LTAuNy0yLjUtMC43aC01NC4ybC0xMi44LTIyLjFjLTAuOS0xLjUtMi41LTIuNS00LjMtMi41aC0yOC40Yy0wLjkgMC0xLjcgMC4yLTIuNSAwLjctMC43IDAuNC0xLjQgMS0xLjggMS44bC0yNC4zIDQyLTIuOSA0LjloLTI1LjZjLTAuOSAwLTEuNyAwLjItMi41IDAuNy0wLjcgMC40LTEuNCAxLTEuOCAxLjhsLTE0LjMgMjQuN2MtMC40IDAuOC0wLjcgMS42LTAuNyAyLjVzMC4yIDEuNyAwLjcgMi41bDI3LjEgNDctMTIuOCAyMi4xYy0wLjQgMC44LTAuNyAxLjYtMC43IDIuNXMwLjIgMS43IDAuNyAyLjVsMTQuMyAyNC43YzAuNCAwLjggMS4xIDEuNCAxLjggMS44czEuNiAwLjcgMi41IDAuN2g1NC4ybDEyLjggMjIuMmMwLjkgMS41IDIuNSAyLjUgNC4zIDIuNWgyOC41YzAuOSAwIDEuNy0wLjIgMi41LTAuNyAwLjctMC40IDEuNC0xIDEuOC0xLjhsMjcuMS00N2gyNS43YzAuOSAwIDEuNy0wLjIgMi41LTAuNyAwLjctMC40IDEuNC0xIDEuOC0xLjhsMTQuMy0yNC43YzAuNC0wLjggMC43LTEuNiAwLjctMi41LTAuMi0wLjgtMC40LTEuNy0wLjgtMi41eiIvPjxwYXRoIGZpbGw9IiNGRkZGRkYiIGQ9Ik03OS40LDYuMWwxNC4yLDI0LjhMNzkuNCw1NS42aDExNGwtMTQuMiwyNC43SDcwLjhMNTMuNyw1MC42TDc5LjQsNi4xeiBNMjIuMyw1NS42aDI4LjVsNTQuMiw5My45TDg3LjksMTc5ICBIMzYuNmwxNC4yLTI0LjdoMjguNkwyMi4zLDU1LjZ6IE05My42LDE3OWwxNC4zLDI0LjhsNTcuMS05OC45bDE0LjIsMjQuN2gyOC42TDE4Miw4NS4yaC0zNC4yTDkzLjYsMTc5eiIvPjwvc3ZnPg==') +} + +.md-typeset .admonition.ai-summary, +.md-typeset details.ai-summary { + border-color: rgb(91,97,232); +} + +.md-typeset .ai-summary>.admonition-title, +.md-typeset .ai-summary>summary { + background-color: rgba(91,97,232, 0.1); +} + +.md-typeset .ai-summary>.admonition-title::before, +.md-typeset .ai-summary>summary::before { + background-color: rgb(91,97,232); + -webkit-mask-image: var(--md-admonition-icon--ai-summary); + mask-image: var(--md-admonition-icon--ai-summary); + background-image: var(--md-admonition-icon--ai-summary); +} \ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml index 06d0a9e4e..f3524d68b 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -114,6 +114,7 @@ markdown_extensions: - meta # 支持Markdown文件上方自定义标题标签等 extra_css: + - assets/stylesheets/ai-summary.css - assets/stylesheets/extra.css - assets/stylesheets/termynal.css - https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css diff --git a/plugins_full.yml b/plugins_full.yml index 7cb5a1275..71aaffa34 100644 --- a/plugins_full.yml +++ b/plugins_full.yml @@ -1,4 +1,5 @@ plugins: + - ai-summary - i18n: docs_structure: suffix languages: diff --git a/requirements.txt b/requirements.txt index 2fb4825e1..ebc69afa6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,4 +7,5 @@ mkdocs-minify-plugin==0.6.2 mkdocs-rss-plugin==1.7.0 mkdocs-static-i18n==1.2.3 mkdocs-video==1.5.0 +mkdocs-ai-summary==0.1.1 # mkdocs-jupyter==0.22.0 \ No newline at end of file