소스 검색

Update 2 files

- /_data/ai-cache.json
- /_layouts/post.html
mayx 7 달 전
부모
커밋
7fe88c21a6
2개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 0 0
      _data/ai-cache.json
  2. 3 1
      _layouts/post.html

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
_data/ai-cache.json


+ 3 - 1
_layouts/post.html

@@ -28,7 +28,8 @@ layout: default
 {% if page.layout != "encrypt" %}
 <!--[if !IE]> -->
 <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>
   async function sha(str) {
     const encoder = new TextEncoder();
@@ -69,6 +70,7 @@ layout: default
   }
   ai_gen();
 </script>
+{% endunless %}
 <hr />
 <!-- <![endif]-->
 {% endif %}

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.