summary refs log tree commit diff
diff options
context:
space:
mode:
authormayx2025-04-07 08:21:34 +0000
committermayx2025-04-07 08:21:34 +0000
commit8c26bc57d5b9c9d5a6155eba222bc7fd47dd74f8 (patch)
treed937722053cc5f18d677e5c5ee8ecc977a79cf9c
parent85594ca8b1a3e9315be9a6e4529cf39cfc18475b (diff)
Update 6 files
- /_layouts/post.html
- /_layouts/default.html
- /_posts/2024-07-03-ai-summary.md
- /_posts/2022-02-14-move.md
- /_posts/2022-01-04-banned.md
- /proxylist.md
-rw-r--r--_layouts/default.html59
-rw-r--r--_layouts/post.html2
-rw-r--r--_posts/2022-01-04-banned.md2
-rw-r--r--_posts/2022-02-14-move.md2
-rw-r--r--_posts/2024-07-03-ai-summary.md4
-rw-r--r--proxylist.md2
6 files changed, 28 insertions, 43 deletions
diff --git a/_layouts/default.html b/_layouts/default.html
index a3c59c7..90bb0da 100644
--- a/_layouts/default.html
+++ b/_layouts/default.html
@@ -26,46 +26,31 @@
   gtag('js', new Date());
 
   gtag('config', '{{ site.google_analytics }}');
-  var lastUpdated = new Date("{{ site.time | date: "%FT%T%z" }}");
-  var BlogAPI = "https://summary.mayx.eu.org";
-  function getSearchJSON(callback) {
-    var searchData = JSON.parse(localStorage.getItem("blog_" + lastUpdated.valueOf()));
-    if (!searchData) {
-      for (var i = 0; i < localStorage.length; i++) {
-          var key = localStorage.key(i);
-          if (key.startsWith('blog_')) {
-              localStorage.removeItem(key);
-          }
+  </script>
+  {% endif %}
+  <script>
+    var lastUpdated = new Date("{{ site.time | date: "%FT%T%z" }}");
+    var BlogAPI = "https://summary.mayx.eu.org";
+    function getSearchJSON(callback) {
+      var searchData = JSON.parse(localStorage.getItem("blog_" + lastUpdated.valueOf()));
+      if (!searchData) {
+        for (var i = 0; i < localStorage.length; i++) {
+            var key = localStorage.key(i);
+            if (key.startsWith('blog_')) {
+                localStorage.removeItem(key);
+            }
+        }
+        $.getJSON("/search.json", function (data) {
+            localStorage.setItem("blog_" + lastUpdated.valueOf(), JSON.stringify(data));
+            callback(data);
+        });
+      } else {
+        callback(searchData);
       }
-      $.getJSON("/search.json", function (data) {
-          localStorage.setItem("blog_" + lastUpdated.valueOf(), JSON.stringify(data));
-          callback(data);
-      });
-    } else {
-      callback(searchData);
     }
-  }
   </script>
-  {% endif %}
   <style>
-    .backToTop {
-      display: none;
-      width: 18px;
-      line-height: 1.2;
-      padding: 5px 0;
-      background-color: #000;
-      color: #fff;
-      font-size: 12px;
-      text-align: center;
-      position: fixed;
-      _position: absolute;
-      right: 10px;
-      bottom: 100px;
-      _bottom: "auto";
-      cursor: pointer;
-      opacity: .6;
-      filter: Alpha(opacity=60);
-    }
+    .backToTop{display:none;width:18px;line-height:1.2;padding:5px 0;background-color:#000;color:#fff;font-size:12px;text-align:center;position:fixed;_position:absolute;right:10px;bottom:100px;_bottom:"auto";cursor:pointer;opacity:.6;filter:Alpha(opacity=60);}
   </style>
 </head>
 
@@ -145,7 +130,7 @@
     <!-- <![endif]-->
     <footer>
       <p>
-        <small>Made with ❤ by Mayx<br />Last updated at <script>document.write(lastUpdated.toLocaleString());</script><br /> 总字数:{% assign count = 0 %}{% for post in site.posts %}{% assign single_count = post.content | strip_html | strip_newlines | remove: " " | size %}{% assign count = count | plus: single_count %}{% endfor %}{% if count > 10000 %}{{ count | divided_by: 10000 }} 万 {{ count | modulo: 10000 }}{% else %}{{ count }}{% endif %} - 文章数:{% for post in site.posts %}{% assign co = co | plus: 1 %}{% endfor %}{{ co }} - <a href="{{ "/atom.xml" | relative_url }}" >Atom</a> - <a href="{{ "/README.html" | relative_url }}" >About</a></small>
+        <small>Made with ❤ by Mayx<br />Last updated at <script>document.write(lastUpdated.toLocaleString());</script><br /> 总字数:{% assign count = 0 %}{% for post in site.posts %}{% assign single_count = post.content | strip_html | strip_newlines | remove: " " | size %}{% assign count = count | plus: single_count %}{% endfor %}{{ count }} - 文章数:{{ site.posts.size }} - <a href="{{ site.feed.path | relative_url }}" >Atom</a> - <a href="{{ "/README.html" | relative_url }}" >About</a></small>
       </p>
     </footer>
   </div>
diff --git a/_layouts/post.html b/_layouts/post.html
index 43ecde8..04a2a4c 100644
--- a/_layouts/post.html
+++ b/_layouts/post.html
@@ -75,7 +75,7 @@ layout: default
 
 {% include toc.html html=content sanitize=true h_max=3 %}
 
-{% if post.layout == "encrypt" %} {{content}} {% else %} <style>.post-content h1{text-indent:-12px;border-bottom: 1px solid;}.post-content h2{text-indent:-10px;border-bottom: 1px solid;}.post-content h3{text-indent:-8px;}.post-content h4{text-indent:-6px;}.post-content h5{text-indent:-4px;}.post-content h6{text-indent:-2px;}h1 .octicon,h2 .octicon,h3 .octicon,h4 .octicon,h5 .octicon,h6 .octicon{visibility:hidden;}h1:hover .octicon,h2:hover .octicon,h3:hover .octicon,h4:hover .octicon,h5:hover .octicon,h6:hover .octicon{visibility:visible;}.octicon{fill:currentColor;padding:0;margin-left:-16px;vertical-align:middle;}</style> <main class="post-content" role="main">{% include anchor_headings.html html=content beforeHeading=true anchorBody="<svg class='octicon' viewBox='0 0 16 16' version='1.1' width='16' height='32' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg>" %}</main> {% endif %}
+{% if post.layout == "encrypt" %} {{content}} {% else %} <style>.post-content h1{text-indent:-8px;border-bottom: 1px solid #e5e5e5;}.post-content h2{text-indent:-6px;border-bottom: 1px solid #e5e5e5;}.post-content h3{text-indent:-5px;}.post-content h4{text-indent:-4px;}.post-content h5{text-indent:-3px;}.post-content h6{text-indent:-2px;}h1 .octicon,h2 .octicon,h3 .octicon,h4 .octicon,h5 .octicon,h6 .octicon{visibility:hidden;}h1:hover .octicon,h2:hover .octicon,h3:hover .octicon,h4:hover .octicon,h5:hover .octicon,h6:hover .octicon{visibility:visible;}.octicon{fill:currentColor;padding:0;margin-left:-16px;vertical-align:middle;}</style> <main class="post-content" role="main">{% include anchor_headings.html html=content beforeHeading=true anchorBody="<svg class='octicon' viewBox='0 0 16 16' version='1.1' width='16' height='32' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg>" %}</main> {% endif %}
 
 {% if page.tags %}
 <small style="display: block">tags: {% for tag in page.tags %}<a href="/search.html?keyword={{ tag | url_encode }}"><em>{{ tag }}</em></a>{% unless forloop.last %} - {% endunless %}{% endfor %} <span style="float: right;"><a href="{% if site.github %}{{ site.github.repository_url }}{% else %}https://gitlab.com/mayx/mayx.gitlab.io{% endif %}/tree/master/{{ page.path }}">查看原始文件</a></span></small>
diff --git a/_posts/2022-01-04-banned.md b/_posts/2022-01-04-banned.md
index 1eca6f1..2653221 100644
--- a/_posts/2022-01-04-banned.md
+++ b/_posts/2022-01-04-banned.md
@@ -38,7 +38,7 @@ tags: [Github, 封禁, 博客]
 > The repository has been deleted per your request.   
 > Kindly note further instances that hosts a script that leverages git.io URL shortener to redirect to a malicious site may lead to further action, such as permanent suspension.
 
-  🌿,原来是我3年前写的[让Git.io无限制](/2019/03/23/gitio.html)所提供的服务被人利用做坏事了,麻了,这Github是真的不长嘴吗?提前说一声我又不是不会删,而且我的服务被利用,上来就先干我是吧?这和某政府对付ISP有什么区别。
+  🌿,原来是我3年前写的[让Git.io无限制](/2019/03/23/gitio.html)所提供的服务被人利用做坏事了,麻了,这Github是真的不长嘴吗?提前说一声我又不是不会删,而且我的服务被利用,上来就先干我是吧?这和某政府对付ICP有什么区别。
   
 # 造成的损失
   1. 我的博客所有Star、Fork和评论全部消失   
diff --git a/_posts/2022-02-14-move.md b/_posts/2022-02-14-move.md
index 16b6eee..44c4fea 100644
--- a/_posts/2022-02-14-move.md
+++ b/_posts/2022-02-14-move.md
@@ -13,7 +13,7 @@ tags: [Mayx, Github, Gitlab, 分发]
   去年我在[研究博客平台的时候](/2021/08/15/blog.html)已经调查过很多放静态站的平台了,所以这次进行分发的时候有了之前的经验,也简单了不少。   
 ## 源代码托管平台的选择
   因为Github不可信,于是我自然想到了用Gitlab来存放博客源代码。虽然吧Gitlab曾经也发生过用户数据丢失的问题,不过反正目标也是同时放在Github和Gitlab上,总不至于两个一起炸吧。其实最开始我的计划是用Github Actions进行同步,不过在我进行调查之后我发现Gitlab功能还是挺强大的,它支持对一个Git仓库进行自动的推送和拉取,也不需要做过多的配置,就只需要配置个地址和令牌就可以,还是挺方便的。   
-  在我做完Github与Gitlab双向同步之后,我发现Gitlab还挺好用的,首先,Gitlab有个很棒的地方就是没被墙,我有时候写文章的时候不挂梯子用Github真的是非常难受,目前依我所感受,防火长城会对Github先进行一下TCP RST,然后刷新一下让你连上,连上之后如果长连接断开或者大概5分钟的样子就再阻断,然后再RST一波,非常的挑战心态。有时候我写了半天然后点预览结果就阻断,等半天还是连不上,还要挂梯子,能预览的时候就得赶紧提交,万一提交的时候再阻断要是没备份就炸了。像Gitlab我就从来没遇到过类似的情况,这一点还是很不错的,大概是因为Gitlab不是社区,而且滥用的人也少,所以政府也不太关系吧。   
+  在我做完Github与Gitlab双向同步之后,我发现Gitlab还挺好用的,首先,Gitlab有个很棒的地方就是没被墙,我有时候写文章的时候不挂梯子用Github真的是非常难受,目前依我所感受,防火长城会对Github先进行一下TCP RST,然后刷新一下让你连上,连上之后如果长连接断开或者大概5分钟的样子就再阻断,然后再RST一波,非常的挑战心态。有时候我写了半天然后点预览结果就阻断,等半天还是连不上,还要挂梯子,能预览的时候就得赶紧提交,万一提交的时候再阻断要是没备份就炸了。像Gitlab我就从来没遇到过类似的情况,这一点还是很不错的,大概是因为Gitlab不是社区,而且滥用的人也少,所以政府也不太关心吧。   
   另外就是Web IDE,相比Github的VSCode Web IDE,Gitlab的要轻量很多了,也不容易发生卡的情况,而且其实Github的VSCode Web IDE也装不了几个插件,功能上也没强到哪去。   
   还有就是翻译,明明用Github的中国人/华人挺多的,官方就是不出中文界面,明明文档都有中文了……Gitlab可能是因为作为一个开源产品,i18n做的很好,虽然吧英文也不影响我使用,但是毕竟作为用户体验的一项,Gitlab做的确实更好。   
   不过其实我觉得Gitlab也许只是表面没那么出名,毕竟不是做社区的,大多数公司都用的是自建Gitlab托管代码,而且很多时候Github其实是在抄Gitlab的(虽然最早是Gitlab抄Github),比如Actions抄CI/CD,还有最近又出的一堆什么代码扫描和检查,Gitlab出现的都更早。不过这说着也跑题了这个文章又不是为了专门夸Gitlab的😂。   
diff --git a/_posts/2024-07-03-ai-summary.md b/_posts/2024-07-03-ai-summary.md
index 62b85dd..a5a0d3c 100644
--- a/_posts/2024-07-03-ai-summary.md
+++ b/_posts/2024-07-03-ai-summary.md
@@ -235,8 +235,8 @@ export default {
 }
 ```
   另外也写了配套的前端代码(用的jQuery,其实应该用Fetch的😂):   
-```html
 {% raw %}
+```html
 <b>AI摘要</b>
 <p id="ai-output">正在生成中……</p>
 <script>
@@ -279,8 +279,8 @@ export default {
   }
   ai_gen();
 </script>
-{% endraw %} 
 ```
+{% endraw %} 
   本来文章内容应该从html里读更好一些,但是标签啥的还得用正则去掉,感觉不如Liquid方便😂。另外博客计数器不应该用MD5的,但懒得改之前的数据了,还好Cloudflare Workers为了兼容是支持MD5的,免得我还得想办法改数据库里的数据。   
 
 # 使用方法
diff --git a/proxylist.md b/proxylist.md
index 2780ab9..2a1d2f8 100644
--- a/proxylist.md
+++ b/proxylist.md
@@ -75,7 +75,7 @@ graph LR;
     GF
     end
     
-    GH <--Sync--> GL
+    GH <-- Sync --> GL
     GH -- Sync --> GE
     GH -- Deploy --> GHP & SH & Netlify & FELH & DA
     GL -- Deploy --> CFP & Vercel & GLP