From 3c324af39e141b0b47dd4e0e6ae114c1ecd94e3c Mon Sep 17 00:00:00 2001 From: mayx Date: Sun, 10 Aug 2025 17:01:39 +0000 Subject: Update 3 files - /_data/ai-cache.json - /rss.xml - /feed.json--- _data/ai-cache.json | 3 ++- feed.json | 2 +- rss.xml | 5 ++++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/_data/ai-cache.json b/_data/ai-cache.json index de5fcdc..ccb3c8f 100644 --- a/_data/ai-cache.json +++ b/_data/ai-cache.json @@ -167,5 +167,6 @@ "/2025/07/01/xslt.html": "这篇文章讲述了作者如何为博客的XML订阅文件添加一个与博客主题一致的XSLT样式,以提高整体风格的统一性。作者遇到的问题包括Jekyll引擎的限制、XML格式的规则、命名空间对输出的影响,以及如何解决样式问题。通过模仿现有样式、自定义XSLT布局和doctype-system设置,作者最终成功地为订阅文件和Sitemap创建了定制的XSLT样式。整个过程不仅提升了博客细节,也让作者学习到了关于XML和XSLT的新知识。", "/2025/07/13/hacked.html": "这篇文章讲述了作者在登录一台闲置服务器时发现被入侵的经历。通过观察服务器负载和进程,作者意识到存在恶意软件。作者使用了netstat、lsof等工具进行调查,发现了一个名为gs-dbus的木马进程和libprocesshider.so文件,这隐藏了其他恶意工具。作者通过查找自启动服务、清理木马、修改密码等方式进行了应对,并分析了入侵者使用的工具,如Global Socket项目和logclean。作者认为这次入侵虽然造成了损失,但也学到了一些知识。", "/2025/07/24/screenshot.html": "这篇文章介绍了如何利用Cloudflare的“浏览器呈现”功能,创建一个自动更新的网站预览图服务。作者发现这个新功能可以用来展示网站在不同设备上的显示效果,通过在Cloudflare Workers中使用iframe和CSS缩放技术,以及调用Cloudflare的接口抓取浏览器渲染的截图。虽然免费用户每天只有10分钟的使用时间,限制了实时更新,但作者通过缓存实现了每天自动更新一次的预览图,并分享了具体的实现代码和使用方法。作者赞赏Cloudflare提供的这项强大且免费的服务。", - "/2025/08/01/sw-proxy.html": "这篇文章介绍了作者如何利用Service Worker在现代浏览器中实现一个简单的反向代理功能,以提供博客的备份和离线访问。作者原本希望通过Service Worker在用户浏览器中运行一个Web服务器来存储博客副本,但发现 tar.gz 文件的处理需要第三方库且难以找到适用的解决方案,尤其是对于tar文件的处理。作者最终选择使用Service Worker作为反向代理,将请求转发到其他网站,如GeoCities风格的静态网站托管平台,实现了类似的效果。这个过程中,作者体验到了浏览器功能的强大,并认为Service Worker在离线场景中有更大的潜力,尽管在他的例子中并没有充分展示这种优势。" + "/2025/08/01/sw-proxy.html": "这篇文章介绍了作者如何利用Service Worker在现代浏览器中实现一个简单的反向代理功能,以提供博客的备份和离线访问。作者原本希望通过Service Worker在用户浏览器中运行一个Web服务器来存储博客副本,但发现 tar.gz 文件的处理需要第三方库且难以找到适用的解决方案,尤其是对于tar文件的处理。作者最终选择使用Service Worker作为反向代理,将请求转发到其他网站,如GeoCities风格的静态网站托管平台,实现了类似的效果。这个过程中,作者体验到了浏览器功能的强大,并认为Service Worker在离线场景中有更大的潜力,尽管在他的例子中并没有充分展示这种优势。", + "/2025/08/10/tilde.html": "这篇文章介绍了作者在Tilde社区的体验,这是一类基于类Unix环境的公共服务器社区,类似于家目录,提供预装的软件、开发环境和公共服务,如聊天室、邮件、BBS论坛等,强调了社区的互动性和共享精神。作者通过申请、审核过程加入了几个社区,并详细描述了在这些社区中的个人主页、编程支持(如Gemini和Gopher协议)、博客发布、代码托管(Git支持)、CI/CD部署以及使用Git hooks自动化博客更新等功能。尽管作者受限于语言和工具使用体验,未能充分参与社区交流,但对社区学习新知识和丰富博客内容印象深刻。" } \ No newline at end of file diff --git a/feed.json b/feed.json index 7f66b1b..abddeeb 100644 --- a/feed.json +++ b/feed.json @@ -1,4 +1,4 @@ --- --- -{"version":"https://jsonfeed.org/version/1","title":"{{ site.title | xml_escape }}","home_page_url":"{{ "/" | absolute_url }}","feed_url":"{{ "/feed.json" | absolute_url }}","description":{{ site.description | jsonify }},"favicon":"{{ "/favicon.ico" | absolute_url }}","expired":false,{% if site.author %}"author":{% if site.author.name %}{"name":"{{ site.author.name }}","url":{% if site.author.url %}"{{ site.author.url }}"{% else %}null{% endif %},"avatar":{% if site.author.avatar %}"{{ site.author.avatar }}"{% else %}null{% endif %}},{% else %}{"name":"{{ site.author }}"},{% endif %}{% endif %}"items":[{% for post in site.posts limit:10 %}{"id":"{{ post.url | absolute_url }}","title":{{ post.title | jsonify }},"summary":{{ post.excerpt | strip_html | jsonify }},"content_text":{{ post.content | strip_html | strip_newlines | jsonify }},"content_html":{{ post.content | strip_newlines | jsonify }},"url":"{{ post.url | absolute_url }}",{% if post.image.size > 1 %}"image":{{ post.image | jsonify }},{% endif %}{% if post.link.size > 1 %}"external_url":"{{ post.link }}",{% endif %}{% if post.banner.size > 1 %}"banner_image":"{{ post.banner }}",{% endif %}{% if post.tags.size > 1 %}"tags":{{ post.tags | jsonify }},{% endif %}{% if post.enclosure.size > 1 %}"attachments":[{ "url":"{{ post.enclosure }}", "mime_type":"{{ post.enclosure_type }}", "size_in_bytes":"{{ post.enclosure_length }}"}],{% endif %}"date_published":"{{ post.date | date_to_xmlschema }}","date_modified":"{{ post.date | date_to_xmlschema }}",{% if post.author %}"author":{% if post.author.name %} {"name":"{{ post.author.name }}","url":{% if post.author.url %}"{{ post.author.url }}"{% else %}null{% endif %},"avatar":{% if post.author.avatar %}"{{ post.author.avatar }}"{% else %}null{% endif %}}{% else %}"{{ post.author }}"{% endif %}{% else %}"author":{% if site.author.name %} {"name":"{{ site.author.name }}","url":{% if site.author.url %}"{{ site.author.url }}"{% else %}null{% endif %},"avatar":{% if site.author.avatar %}"{{ site.author.avatar }}"{% else %}null{% endif %}}{% else %}{"name":"{{ site.author }}"}{% endif %}{% endif %}}{% if forloop.last == false %},{% endif %}{% endfor %}]} \ No newline at end of file +{"version":"https://jsonfeed.org/version/1","title":"{{ site.title | xml_escape }}","home_page_url":"{{ "/" | absolute_url }}","feed_url":"{{ "/feed.json" | absolute_url }}","description":{{ site.description | jsonify }},"favicon":"{{ "/favicon.ico" | absolute_url }}","expired":false,{% if site.author %}"author":{% if site.author.name %}{"name":"{{ site.author.name }}","url":{% if site.author.url %}"{{ site.author.url }}"{% else %}null{% endif %},"avatar":{% if site.author.avatar %}"{{ site.author.avatar }}"{% else %}null{% endif %}},{% else %}{"name":"{{ site.author }}"},{% endif %}{% endif %}"items":[{% for post in site.posts limit:10 %}{"id":"{{ post.url | absolute_url }}","title":{{ post.title | jsonify }},"summary":{% assign ai_cache = site.data.ai-cache[post.url] %}{% if ai_cache %}{{ ai_cache | strip_newlines | jsonify }}{% else %}{{ post.excerpt | strip_html | jsonify }}{% endif %},"content_html":{{ post.content | strip_newlines | jsonify }},"url":"{{ post.url | absolute_url }}",{% if post.image.size > 1 %}"image":{{ post.image | jsonify }},{% endif %}{% if post.link.size > 1 %}"external_url":"{{ post.link }}",{% endif %}{% if post.banner.size > 1 %}"banner_image":"{{ post.banner }}",{% endif %}{% if post.tags.size > 1 %}"tags":{{ post.tags | jsonify }},{% endif %}{% if post.enclosure.size > 1 %}"attachments":[{ "url":"{{ post.enclosure }}", "mime_type":"{{ post.enclosure_type }}", "size_in_bytes":"{{ post.enclosure_length }}"}],{% endif %}"date_published":"{{ post.date | date_to_xmlschema }}","date_modified":"{{ post.date | date_to_xmlschema }}",{% if post.author %}"author":{% if post.author.name %} {"name":"{{ post.author.name }}","url":{% if post.author.url %}"{{ post.author.url }}"{% else %}null{% endif %},"avatar":{% if post.author.avatar %}"{{ post.author.avatar }}"{% else %}null{% endif %}}{% else %}"{{ post.author }}"{% endif %}{% else %}"author":{% if site.author.name %} {"name":"{{ site.author.name }}","url":{% if site.author.url %}"{{ site.author.url }}"{% else %}null{% endif %},"avatar":{% if site.author.avatar %}"{{ site.author.avatar }}"{% else %}null{% endif %}}{% else %}{"name":"{{ site.author }}"}{% endif %}{% endif %}}{% if forloop.last == false %},{% endif %}{% endfor %}]} \ No newline at end of file diff --git a/rss.xml b/rss.xml index d29a94d..2f09425 100644 --- a/rss.xml +++ b/rss.xml @@ -15,7 +15,10 @@ {% for post in site.posts limit:10 %} {{ post.title | xml_escape }} - {% if post.excerpt %} + {% assign ai_cache = site.data.ai-cache[post.url] %} + {% if ai_cache %} + {{ ai_cache | xml_escape }} + {% elsif post.excerpt %} {{ post.excerpt | strip_html | xml_escape }} {% else %} {{ post.content | xml_escape }} -- cgit v1.2.3