Update 2 files

- /_data/ai-cache.json
- /_layouts/post.html
master
mayx 2025-04-14 15:45:30 +00:00
parent 526c8c35b7
commit 7fe88c21a6
2 changed files with 4 additions and 1 deletions

File diff suppressed because one or more lines are too long

View File

@ -28,7 +28,8 @@ layout: default
{% if page.layout != "encrypt" %} {% if page.layout != "encrypt" %}
<!--[if !IE]> --> <!--[if !IE]> -->
<b>AI摘要</b> <b>AI摘要</b>
<p id="ai-output">正在生成中……</p> <p id="ai-output">{% assign ai_cache = site.data.ai-cache[page.url] %}{% if ai_cache %}{{ ai_cache }}{% else %}正在生成中……{% endif %}</p>
{% unless ai_cache %}
<script> <script>
async function sha(str) { async function sha(str) {
const encoder = new TextEncoder(); const encoder = new TextEncoder();
@ -69,6 +70,7 @@ layout: default
} }
ai_gen(); ai_gen();
</script> </script>
{% endunless %}
<hr /> <hr />
<!-- <![endif]--> <!-- <![endif]-->
{% endif %} {% endif %}