2025-06-02 12:22:47 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								---
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								layout: post
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								title: 近期对博客的修改与优化记录
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								tags: [博客, 优化, IndieWeb]
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								---
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								  在修改博客的时候也能学到不少新知识啊~<!-- more -->     
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								# 起因
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
										 
							
							
								  在两个月前,我写了一篇[针对博客搜索功能优化的记录 ](/2025/04/04/search.html )。在写完之后没几天,有位名叫[@xymoryn ](https://github.com/xymoryn )的大佬看到了我的博客并且进行了[吐槽 ](https://github.com/Mabbs/mabbs.github.io/issues/167 ),内容很值得参考。不过我自从用[minimal ](https://github.com/pages-themes/minimal )主题以来从来没有改过样式的原因主要还是写不来CSS😂, , , , ~ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								# 对博客样式的优化
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
										 
							
							
								  虽然大佬给出了参考的CSS, , , hacker ](https://pages-themes.github.io/hacker/ )这个主题, , , , , , , , , ? , , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
										 
							
							
								  最后AI给出的答复是使用`font-weight: inherit;` , , , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
										 
							
							
								  除此之外就是字号、行高和布局, , , , , , , , , , , , , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
										 
							
							
								  还有一点就是分段, , , , , ? , , , ? , , , `text-indent: 2em;` 就可以了。   
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
										 
							
							
								  最后就是评论授权的问题, 这个问题 ](https://github.com/gitalk/gitalk/issues/95 ), OAuth可以授权的作用域 ](https://docs.github.com/zh/apps/oauth-apps/building-oauth-apps/scopes-for-oauth-apps )发现确实是没办法限制只写Issues😥, , , , , ( ) , , , , ? , : 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								```css
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								.gt-btn-login::after {
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
										 
							
							
								  content: "如果不想登录, 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								  position: absolute;
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								  top: 100%;
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								  left: 50%;
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								  transform: translateX(-50%);
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								  background: #333 ;
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								  color: #fff ;
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								  padding: 8px 12px;
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								  border-radius: 4px;
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								  font-size: 12px;
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								  white-space: nowrap;
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								  opacity: 0;
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								  visibility: hidden;
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								  transition: opacity 0.2s, visibility 0.2s;
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								  z-index: 10;
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								.gt-btn-login:hover::after {
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								  opacity: 1;
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								  visibility: visible;
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								.gt-btn-login::after {
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								  margin-top: 8px;
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								.gt-btn-login::after {
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								  至此,关于博客样式的部分我觉得已经提高不少读者的用户体验了,也感谢大佬提出的建议。   
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								# 对博客兼容性的优化
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
										 
							
							
								  最近由于某些原因我又用起Windows 7了。其实我觉得Windows 7是一个很不错的操作系统, , , , Windows Live Essentials ](https://archive.org/details/wlsetup-all_201802 )等等, , ? 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
										 
							
							
								  其实GitHub给的那些Jekyll主题本身都是兼容IE8的, , , , , , , Live2D看板娘 ](/Live2dHistoire/ )就没有任何可能性被支持了, , ( ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								## 对文章点击计数器的兼容性优化
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
										 
							
							
								  其实我的文章点击计数器从[之前 ](/2019/06/22/counter.html )改成用jQuery调用自己的接口以后就没有什么兼容性的问题了, , , ( ) 现成的库 ](https://github.com/MoonScript/jQuery-ajaxTransport-XDomainRequest )能让jQuery在遇到这种情况时使用XDR请求, , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								## 关于响应式布局的兼容性优化
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
										 
							
							
								  在IE8中的CSS是不支持媒体查询的, , : Respond.js ](https://github.com/scottjehl/Respond ),所以就直接拿来用了😝。   
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								## 关于全文搜索的兼容性优化
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
										 
							
							
								  其实从功能的角度来说这种东西肯定是在IE8下可以实现的, 那个库 ](https://github.com/christian-fei/Simple-Jekyll-Search )有点迷, 判断XHR ](https://github.com/christian-fei/Simple-Jekyll-Search/blob/master/src/JSONLoader.js#L29 )搞的好像是在兼容旧浏览器? , , , , , ( ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								## 对于订阅软件的兼容性支持
  
						 
					
						
							
								
									
										
										
										
											2025-06-02 15:55:05 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
										 
							
							
								  之前我的博客对订阅的支持是使用的官方的[jekyll-feed ](https://github.com/jekyll/jekyll-feed )插件, , ( ) , 对RSS格式的支持 ](https://github.com/Mabbs/mabbs.github.io/blob/master/rss.xml ), XSLT模板 ](https://github.com/Mabbs/mabbs.github.io/blob/master/feed.xslt.xml )来预览。既然RSS也支持了, JSONFeed ](https://github.com/Mabbs/mabbs.github.io/blob/master/feed.json )也一起做了吧😆,虽然意义不是很大……   
							 
						 
					
						
							
								
									
										
										
										
											2025-06-02 12:22:47 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								## 给博客添加网页快讯
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
										 
							
							
								  既然要兼容IE8, , , ‘ ’ , hAtom Microformat ](http://microformats.org/wiki/hatom )的规范, , , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
										 
							
							
								  这个功能其实非常简单, , , , , 微软官方文档 ](https://learn.microsoft.com/en-us/previous-versions/windows/desktop/cc304073(v=vs.85 ))中看到。
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								# 让网站增加对IndieWeb的支持
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
										 
							
							
								  既然说到Microformat, IndieWeb ](https://indieweb.org/IndieWeb )了。虽然这个东西网络上也没几个人搞,但看起来有点意思就整下玩玩呗。   
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								## 第零级:域名
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
										 
							
							
								  根据他们的[入门教程 ](https://indieweb.org/Getting_Started )来看, ? , , ? ? , ? , , , , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								## 第一级:识别身份
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
										 
							
							
								  没有域名也不影响接下来的步骤, ( ) , , `rel=me` 的link标签, , , , IndieWebify.Me ](https://indiewebify.me/validate-rel-me/ )来验证。   
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								## 第二级:发布内容
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
										 
							
							
								  在发布前, , , , 这个教程 ](https://microformats.org/wiki/h-entry )按照上面所说的东西用class名去标注对应的元素, IndieWebify.Me ](https://indiewebify.me/validate-h-entry/?url=https%3A%2F%2Fmabbs.github.io%2F2025%2F06%2F02%2Foptimize.html )验证了。   
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								  除此之外还需要用[h-card ](https://microformats.org/wiki/h-card )标注网站的身份,解析完之后可以当网站名片用,具体可以看[这里 ](https://indiewebify.me/validate-h-card/?url=https%3A%2F%2Fmabbs.github.io )
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
										 
							
							
								  另外还有一点就是Webmentions, , , , 插件 ](https://github.com/aarongustafson/jekyll-webmention_io )可以支持, , , , ( ) , , , 这里 ](https://webmention.io/api/mentions.html?token=Dan9NrE8CLsFJ1qdRq2hjg )查看(不过绝大多数都是我自己手动发的🤣)   
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
										 
							
							
								  如果谁有兴趣给自己的网站添加完整的Webmention, Webmention Rocks! ](https://webmention.rocks/ )进行测试( , ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								## 第三级:进行交流
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
										 
							
							
								  在IndieWeb中有一个很重要的事情就是相互交流, , , , , POSSE ](https://indieweb.org/POSSE )。对我来说, , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
										 
							
							
								  除此之外似乎还要把别人的评论同步到自己网站? , ~ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								## 额外的内容
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
										 
							
							
								  既然已经支持了IndieWeb, IndieWeb Webring 🕸💍 ](https://xn--sr8hvo.ws )中的大多数网站都是适配了IndieWeb的, 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								# 对博客可靠性的优化
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
										 
							
							
								  以前为了应对[GitHub ](/2022/01/04/banned.html )的不可靠, , , , , ~ , , , 这里 ](/proxylist.html#git列表 )查看。
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								# 感想
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
										 
							
							
								  在这次的博客优化中, , , , , ,