first commits
This commit is contained in:
833
public/2018/06/02/istio08/index.html
Normal file
833
public/2018/06/02/istio08/index.html
Normal file
@@ -0,0 +1,833 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en-us">
|
||||
<head><script src="/livereload.js?mindelay=10&v=2&port=1313&path=livereload" data-no-instant defer></script>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
|
||||
<script>
|
||||
(function() {
|
||||
|
||||
|
||||
const autoTheme = false;
|
||||
if (autoTheme) {
|
||||
document.documentElement.setAttribute('data-auto-theme', 'true');
|
||||
}
|
||||
|
||||
const theme = localStorage.getItem('cleanwhite-theme') ||
|
||||
(window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light');
|
||||
document.documentElement.setAttribute('data-theme', theme);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
<meta property="og:site_name" content="David Young">
|
||||
<meta property="og:type" content="article">
|
||||
|
||||
|
||||
<meta property="og:image" content="http://localhost:1313//img/2018-06-02-istio08/background.jpg">
|
||||
<meta property="twitter:image" content="http://localhost:1313//img/2018-06-02-istio08/background.jpg" />
|
||||
|
||||
|
||||
|
||||
<meta name="title" content="Istio 0.8 Release发布" />
|
||||
<meta property="og:title" content="Istio 0.8 Release发布" />
|
||||
<meta property="twitter:title" content="Istio 0.8 Release发布" />
|
||||
|
||||
|
||||
|
||||
<meta name="description" content="在6月1日这一天的早上,Istio社区宣布发布0.8 Release,除了常规的故障修复和性能改进外,这个儿童节礼物里面还有什么值得期待内容呢?让我们来看一看:">
|
||||
<meta property="og:description" content="在6月1日这一天的早上,Istio社区宣布发布0.8 Release,除了常规的故障修复和性能改进外,这个儿童节礼物里面还有什么值得期待内容呢?让我们来看一看:" />
|
||||
<meta property="twitter:description" content="在6月1日这一天的早上,Istio社区宣布发布0.8 Release,除了常规的故障修复和性能改进外,这个儿童节礼物里面还有什么值得期待内容呢?让我们来看一看:" />
|
||||
|
||||
|
||||
<meta property="og:url" content="http://localhost:1313/2018/06/02/istio08/" />
|
||||
|
||||
|
||||
<meta property="twitter:card" content="summary" />
|
||||
|
||||
|
||||
|
||||
<meta name="keyword" content="Von Balthasar, Scripture, Gravel Riding, Ham Radio, Divine Office, Open Source">
|
||||
<link rel="shortcut icon" href="/img/favicon.ico">
|
||||
|
||||
<title>Istio 0.8 Release发布 | David Young Blog</title>
|
||||
|
||||
<link rel="canonical" href="/2018/06/02/istio08/">
|
||||
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="/css/bootstrap.min.css">
|
||||
|
||||
|
||||
<link rel="stylesheet" href="/css/hugo-theme-cleanwhite.css">
|
||||
|
||||
|
||||
<link rel="stylesheet" href="/css/theme-variables.css">
|
||||
|
||||
|
||||
<link rel="stylesheet" href="/css/zanshang.min.css">
|
||||
|
||||
|
||||
<link rel="stylesheet" href="/css/font-awesome.all.min.css">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<script src="/js/jquery.min.js"></script>
|
||||
|
||||
|
||||
<script src="/js/bootstrap.min.js"></script>
|
||||
|
||||
|
||||
<script src="/js/hux-blog.min.js"></script>
|
||||
|
||||
|
||||
<script src="/js/lazysizes.min.js"></script>
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<nav class="navbar navbar-default navbar-custom navbar-fixed-top">
|
||||
|
||||
<div class="container-fluid">
|
||||
|
||||
<div class="navbar-header page-scroll">
|
||||
<button type="button" class="navbar-toggle">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="/">David Young</a>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div id="huxblog_navbar">
|
||||
<div class="navbar-collapse">
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
<a href="/">All Posts</a>
|
||||
</li>
|
||||
|
||||
|
||||
<li>
|
||||
<a href="/categories/life/">life</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="/categories/tech/">tech</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="/categories/tips/">tips</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
<li><a href="/archive//">ARCHIVE</a></li>
|
||||
|
||||
<li><a href="/notes//">NOTES</a></li>
|
||||
|
||||
<li><a href="/about//">ABOUT</a></li>
|
||||
|
||||
<li>
|
||||
<a href="/search"><i class="fa fa-search"></i></a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="#" id="theme-toggle" title="Toggle dark mode" style="opacity: 0;">
|
||||
<i class="fa fa-moon"></i>
|
||||
<i class="fa fa-sun" style="display: none;"></i>
|
||||
</a>
|
||||
</li>
|
||||
<script>
|
||||
(function() {
|
||||
|
||||
var theme = localStorage.getItem('cleanwhite-theme') ||
|
||||
(window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light');
|
||||
var toggleBtn = document.getElementById('theme-toggle');
|
||||
if (toggleBtn) {
|
||||
var moonIcon = toggleBtn.querySelector('.fa-moon');
|
||||
var sunIcon = toggleBtn.querySelector('.fa-sun');
|
||||
|
||||
if (theme === 'dark') {
|
||||
if (moonIcon) moonIcon.style.display = 'none';
|
||||
if (sunIcon) sunIcon.style.display = 'inline';
|
||||
toggleBtn.setAttribute('title', 'Switch to light mode');
|
||||
} else {
|
||||
if (moonIcon) moonIcon.style.display = 'inline';
|
||||
if (sunIcon) sunIcon.style.display = 'none';
|
||||
toggleBtn.setAttribute('title', 'Switch to dark mode');
|
||||
}
|
||||
|
||||
|
||||
requestAnimationFrame(function() {
|
||||
toggleBtn.style.transition = 'opacity 0.2s ease';
|
||||
toggleBtn.style.opacity = '1';
|
||||
});
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</nav>
|
||||
<script>
|
||||
|
||||
|
||||
|
||||
var $body = document.body;
|
||||
var $toggle = document.querySelector('.navbar-toggle');
|
||||
var $navbar = document.querySelector('#huxblog_navbar');
|
||||
var $collapse = document.querySelector('.navbar-collapse');
|
||||
|
||||
$toggle.addEventListener('click', handleMagic)
|
||||
function handleMagic(e){
|
||||
if ($navbar.className.indexOf('in') > 0) {
|
||||
|
||||
$navbar.className = " ";
|
||||
|
||||
setTimeout(function(){
|
||||
|
||||
if($navbar.className.indexOf('in') < 0) {
|
||||
$collapse.style.height = "0px"
|
||||
}
|
||||
},400)
|
||||
}else{
|
||||
|
||||
$collapse.style.height = "auto"
|
||||
$navbar.className += " in";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
var navLinks = document.querySelectorAll('.navbar-collapse a');
|
||||
navLinks.forEach(function(link) {
|
||||
link.addEventListener('click', function() {
|
||||
if ($navbar.className.indexOf('in') > 0) {
|
||||
|
||||
$navbar.className = " ";
|
||||
setTimeout(function(){
|
||||
if($navbar.className.indexOf('in') < 0) {
|
||||
$collapse.style.height = "0px"
|
||||
}
|
||||
},400)
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
<style type="text/css">
|
||||
header.intro-header {
|
||||
background-image: url('/img/2018-06-02-istio08/background.jpg')
|
||||
}
|
||||
</style>
|
||||
|
||||
<header class="intro-header" >
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
|
||||
<div class="post-heading">
|
||||
<div class="tags">
|
||||
|
||||
<a class="tag" href="/tags/istio" title="Istio">
|
||||
Istio
|
||||
</a>
|
||||
|
||||
</div>
|
||||
<h1>Istio 0.8 Release发布</h1>
|
||||
<h2 class="subheading">来自Istio的儿童节礼物</h2>
|
||||
<span class="meta">
|
||||
|
||||
Posted by
|
||||
|
||||
"赵化冰"
|
||||
|
||||
on
|
||||
Saturday, June 2, 2018
|
||||
|
||||
|
||||
|
||||
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
|
||||
|
||||
|
||||
<article>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
|
||||
|
||||
<div class="
|
||||
col-lg-8 col-lg-offset-2
|
||||
col-md-10 col-md-offset-1
|
||||
post-container">
|
||||
|
||||
|
||||
<blockquote>
|
||||
<p>在6月1日这一天的早上,Istio社区宣布发布0.8 Release,除了常规的故障修复和性能改进外,这个儿童节礼物里面还有什么值得期待内容呢?让我们来看一看:</p>
|
||||
</blockquote>
|
||||
<h2 id="networking">Networking</h2>
|
||||
<h3 id="改进的流量管理模型">改进的流量管理模型</h3>
|
||||
<p>0.8版本采用了新的流量管理配置模型<a href="https://istio.io/blog/2018/v1alpha3-routing/">v1alpha3 Route API</a>。新版本的模型添加了一些新的特性,并改善了之前版本模型中的可用性问题。主要的改动包括:</p>
|
||||
<h4 id="gateway">Gateway</h4>
|
||||
<p>新版本中不再使用K8s中的Ingress,转而采用Gateway来统一配置Service Mesh中的各个HTTP/TCP负载均衡器。Gateway可以是处理入口流量的Ingress Gateway,负责Service Mesh内部各个服务间通信的Sidecar Proxy,也可以是负责出口流量的Egress Gateway。</p>
|
||||
<p>Mesh中涉及到的三类Gateway: <br>
|
||||
|
||||
<img src="/img/2018-06-02-istio08/gateways.svg" alt="Gateway">
|
||||
|
||||
</p>
|
||||
<p>该变化的原因是K8s中的Ingress对象功能过于简单,不能满足Istio灵活的路由规则需求。在0.8版本中,L4-L6的配置和L7的配置被分别处理,Gateway中只配置L4-L6的功能,例如暴露的端口,TLS设置。然后用户可以采用VirtualService来配置标准的Istio规则,并和Gateway进行绑定。</p>
|
||||
<h4 id="virtualservice">VirtualService</h4>
|
||||
<p>采用VirtualService代替了alpha2模型中的RouteRule。采用VirtualService有两个优势:</p>
|
||||
<p><strong>可以把一个服务相关的规则放在一起管理</strong></p>
|
||||
<p>例如下面的路由规则,发向reviews的请求流量缺省destination为v1,如果user为jason则路由到v2。在v1模型中需要采用两条规则来实现,采用VirtualService后放到一个规则下就可以实现。</p>
|
||||
<pre tabindex="0"><code>apiVersion: networking.istio.io/v1alpha3
|
||||
kind: VirtualService
|
||||
metadata:
|
||||
name: reviews
|
||||
spec:
|
||||
hosts:
|
||||
- reviews
|
||||
http:
|
||||
- match:
|
||||
- headers:
|
||||
cookie:
|
||||
regex: "^(.*?;)?(user=jason)(;.*)?$"
|
||||
route:
|
||||
- destination:
|
||||
host: reviews
|
||||
subset: v2
|
||||
- route:
|
||||
- destination:
|
||||
host: reviews
|
||||
subset: v1
|
||||
</code></pre><p><strong>可以对外暴露一个并不存在的“虚拟服务”,然后将该“虚拟服务”映射到Istio中的Service上</strong></p>
|
||||
<p>下面规则中的bookinfo.com是对外暴露的“虚拟服务”,bookinfo.com/reviews被映射到了reviews服务,bookinfo.com/ratings被映射到了ratings服务。通过采用VirtualService,极大地增强了Istio路由规则的灵活性,有利于Legacy系统和Istio的集成。</p>
|
||||
<pre tabindex="0"><code>apiVersion: networking.istio.io/v1alpha3
|
||||
kind: VirtualService
|
||||
metadata:
|
||||
name: bookinfo
|
||||
spec:
|
||||
hosts:
|
||||
- bookinfo.com
|
||||
http:
|
||||
- match:
|
||||
- uri:
|
||||
prefix: /reviews
|
||||
route:
|
||||
- destination:
|
||||
host: reviews
|
||||
- match:
|
||||
- uri:
|
||||
prefix: /ratings
|
||||
route:
|
||||
- destination:
|
||||
host: ratings
|
||||
...
|
||||
</code></pre><h3 id="envoy-v2">Envoy V2</h3>
|
||||
<p>控制面和数据面标准接口支持Envoy</p>
|
||||
<h3 id="用gateway代替-ingressengress">用Gateway代替 Ingress/Engress</h3>
|
||||
<p>前面已经介绍到,新的版本中不再支持将Kubernetes的Ingress和Istio路由规则一起使用。Istio 0.8支持平台无关的 Ingress/Egress Gateway,可以在Kubernetes,Cloud Foundry中和Istio路由规则无缝集成。</p>
|
||||
<h3 id="对入站端口进行限制">对入站端口进行限制</h3>
|
||||
<p>0.8版本只允许访问Pod内已声明端口的入站流量。</p>
|
||||
<h2 id="security">Security</h2>
|
||||
<h3 id="安全组件citadel">安全组件Citadel</h3>
|
||||
<p>将Istio的安全组件Istio-Auth/Istio-CA正式命名为Citadel(堡垒)。</p>
|
||||
<h3 id="跨集群支持">跨集群支持</h3>
|
||||
<p>部署在多个Cluster中的Citadel可以共享同一Root Certificate,以支持不同Cluster内的服务可以跨Cluster进行认证。</p>
|
||||
<h3 id="认证策略">认证策略</h3>
|
||||
<p>认证策略既支持Service-to-Service认证,也支持对终端用户进行认证。</p>
|
||||
<h2 id="遥测">遥测</h2>
|
||||
<p>Mixer和Pilot将上报自身的遥测数据,其上报的流程和Mesh中的普通服务相同。</p>
|
||||
<h2 id="安装">安装</h2>
|
||||
<p>按需安装部分组件:支持只安装所需的组件,如果只需要使用Istio的路由规则,可以选择只安装Pilot,而不安装Mixer和Citadel。</p>
|
||||
<h2 id="mixer">Mixer</h2>
|
||||
<p>CloudWatch:增加了一个CloudWatch插件,可以向AWS CloudWatch上报度量数据。</p>
|
||||
<h2 id="已知故障">已知故障:</h2>
|
||||
<ul>
|
||||
<li>如果Gateway绑定的VirtualService指向的是headless service,则该规则不能正常工作。</li>
|
||||
<li>0.8版本和Kubernetes1.10.2存在兼容问题,目前建议采用1.9版本。</li>
|
||||
<li>convert-networking-config工具存在故障,一个其它的namespace可能会被修改为istio-system namespace。可以在允许转换工具后手动修改文件来避免。</li>
|
||||
</ul>
|
||||
<h2 id="总结">总结</h2>
|
||||
<p>0.8版本带来的最大变化是流量配置模型的重构,重构后的模型整合了外部Gateway和内部Sidecar Proxy的路由配置。同时VirtualService的引入使路由规则的配置更为集中和灵活。</p>
|
||||
|
||||
|
||||
|
||||
<div class="entry-shang text-center">
|
||||
|
||||
<p>「真诚赞赏,手留余香」</p>
|
||||
|
||||
<button class="zs show-zs btn btn-bred">赞赏支持</button>
|
||||
</div>
|
||||
<div class="zs-modal-bg"></div>
|
||||
<div class="zs-modal-box">
|
||||
<div class="zs-modal-head">
|
||||
<button type="button" class="close">×</button>
|
||||
<span class="author"><a href="http://localhost:1313/"><img src="/img/favicon.png" />David Young</a></span>
|
||||
|
||||
<p class="tip"><i></i><span>真诚赞赏,手留余香</span></p>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="zs-modal-body">
|
||||
<div class="zs-modal-btns">
|
||||
<button class="btn btn-blink" data-num="2">2元</button>
|
||||
<button class="btn btn-blink" data-num="5">5元</button>
|
||||
<button class="btn btn-blink" data-num="10">10元</button>
|
||||
<button class="btn btn-blink" data-num="50">50元</button>
|
||||
<button class="btn btn-blink" data-num="100">100元</button>
|
||||
<button class="btn btn-blink" data-num="1">任意金额</button>
|
||||
</div>
|
||||
<div class="zs-modal-pay">
|
||||
<button class="btn btn-bred" id="pay-text">2元</button>
|
||||
<p>使用<span id="pay-type">微信</span>扫描二维码完成支付</p>
|
||||
<img src="/img/reward/wechat-2.png" id="pay-image"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="zs-modal-footer">
|
||||
<label><input type="radio" name="zs-type" value="wechat" class="zs-type" checked="checked"><span ><span class="zs-wechat"><img src="/img/reward/wechat-btn.png"/></span></label>
|
||||
<label><input type="radio" name="zs-type" value="alipay" class="zs-type" class="zs-alipay"><img src="/img/reward/alipay-btn.png"/></span></label>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript" src="/js/reward.js"></script>
|
||||
|
||||
|
||||
|
||||
|
||||
<hr>
|
||||
<ul class="pager">
|
||||
|
||||
<li class="previous">
|
||||
<a href="/2018/05/24/set_up_my_ubuntu_desktop/" data-toggle="tooltip" data-placement="top" title="Everything about Setting Up My Ubuntu Desktop">←
|
||||
Previous Post</a>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="next">
|
||||
<a href="/2018/06/04/introducing-the-istio-v1alpha3-routing-api/" data-toggle="tooltip" data-placement="top" title="Istio v1aplha3 routing API介绍(译文)">Next
|
||||
Post →</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<link href="https://xxx.xxx.com/dist/Artalk.css" rel="stylesheet" />
|
||||
<script src="https://xxx.xxx.com/dist/Artalk.js"></script>
|
||||
|
||||
|
||||
<div id="Comments"></div>
|
||||
|
||||
<script>
|
||||
Artalk.init({
|
||||
el: '#Comments',
|
||||
pageKey: 'http:\/\/localhost:1313\/2018\/06\/02\/istio08\/',
|
||||
pageTitle: 'Istio 0.8 Release发布',
|
||||
server: 'https:\/\/xxx.xxx.com',
|
||||
site: 'xxx blog',
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="
|
||||
col-lg-2 col-lg-offset-0
|
||||
visible-lg-block
|
||||
sidebar-container
|
||||
catalog-container">
|
||||
<div class="side-catalog">
|
||||
<hr class="hidden-sm hidden-xs">
|
||||
<h5>
|
||||
<a class="catalog-toggle" href="#">CATALOG</a>
|
||||
</h5>
|
||||
<ul class="catalog-body"></ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="
|
||||
col-lg-8 col-lg-offset-2
|
||||
col-md-10 col-md-offset-1
|
||||
sidebar-container">
|
||||
|
||||
|
||||
|
||||
<section>
|
||||
<hr class="hidden-sm hidden-xs">
|
||||
<h5><a href="/tags/">FEATURED TAGS</a></h5>
|
||||
<div class="tags">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="/tags/docker" title="docker">
|
||||
docker
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="/tags/istio" title="istio">
|
||||
istio
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="/tags/kubernetes" title="kubernetes">
|
||||
kubernetes
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="/tags/microservice" title="microservice">
|
||||
microservice
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="/tags/security" title="security">
|
||||
security
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
<a href="/tags/service-mesh" title="service mesh">
|
||||
service mesh
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
<a href="/tags/tips" title="tips">
|
||||
tips
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
<section>
|
||||
<hr>
|
||||
<h5>FRIENDS</h5>
|
||||
<ul class="list-inline">
|
||||
|
||||
<li><a target="_blank" href="https://zhaozhihan.com">Linda的博客</a></li>
|
||||
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
|
||||
|
||||
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
|
||||
<ul class="list-inline text-center">
|
||||
|
||||
<li>
|
||||
<a href="mailto:youremail@gmail.com">
|
||||
<span class="fa-stack fa-lg">
|
||||
<i class="fas fa-circle fa-stack-2x"></i>
|
||||
<i class="fas fa-envelope fa-stack-1x fa-inverse"></i>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li>
|
||||
<a target="_blank" href="/your%20wechat%20qr%20code%20image">
|
||||
<span class="fa-stack fa-lg">
|
||||
<i class="fas fa-circle fa-stack-2x"></i>
|
||||
<i class="fab fa-weixin fa-stack-1x fa-inverse"></i>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
<li>
|
||||
<a target="_blank" href="https://github.com/yourgithub">
|
||||
<span class="fa-stack fa-lg">
|
||||
<i class="fas fa-circle fa-stack-2x"></i>
|
||||
<i class="fab fa-github fa-stack-1x fa-inverse"></i>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
<li>
|
||||
<a target="_blank" href="https://www.linkedin.com/in/yourlinkedinid">
|
||||
<span class="fa-stack fa-lg">
|
||||
<i class="fas fa-circle fa-stack-2x"></i>
|
||||
<i class="fab fa-linkedin fa-stack-1x fa-inverse"></i>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
<li>
|
||||
<a target="_blank" href="https://stackoverflow.com/users/yourstackoverflowid">
|
||||
<span class="fa-stack fa-lg">
|
||||
<i class="fas fa-circle fa-stack-2x"></i>
|
||||
<i class="fab fa-stack-overflow fa-stack-1x fa-inverse"></i>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li>
|
||||
<a href='' rel="alternate" type="application/rss+xml" title="David Young" >
|
||||
<span class="fa-stack fa-lg">
|
||||
<i class="fas fa-circle fa-stack-2x"></i>
|
||||
<i class="fas fa-rss fa-stack-1x fa-inverse"></i>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
<p class="copyright text-muted">
|
||||
Copyright © David Young 2026
|
||||
|
||||
<br>
|
||||
<a href="https://themes.gohugo.io/hugo-theme-cleanwhite">CleanWhite Hugo Theme</a> by <a href="https://zhaohuabing.com">Huabing</a> |
|
||||
<iframe
|
||||
style="margin-left: 2px; margin-bottom:-5px;"
|
||||
frameborder="0" scrolling="0" width="100px" height="20px"
|
||||
src="https://ghbtns.com/github-btn.html?user=zhaohuabing&repo=hugo-theme-cleanwhite&type=star&count=true" >
|
||||
</iframe>
|
||||
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
function loadAsync(u, c) {
|
||||
var d = document, t = 'script',
|
||||
o = d.createElement(t),
|
||||
s = d.getElementsByTagName(t)[0];
|
||||
o.src = u;
|
||||
if (c) { o.addEventListener('load', function (e) { c(null, e); }, false); }
|
||||
s.parentNode.insertBefore(o, s);
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
if($('#tag_cloud').length !== 0){
|
||||
loadAsync("/js/jquery.tagcloud.js",function(){
|
||||
$.fn.tagcloud.defaults = {
|
||||
|
||||
color: {start: '#bbbbee', end: '#0085a1'},
|
||||
};
|
||||
$('#tag_cloud a').tagcloud();
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
<script>
|
||||
(function() {
|
||||
function updateTagcloudColors() {
|
||||
const isDark = document.documentElement.getAttribute('data-theme') === 'dark';
|
||||
const startColor = isDark ? '#808080' : '#bbbbee';
|
||||
if($('#tag_cloud').length !== 0 && $.fn.tagcloud) {
|
||||
$.fn.tagcloud.defaults = {
|
||||
color: {start: startColor, end: '#0085a1'},
|
||||
};
|
||||
$('#tag_cloud a').tagcloud();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$(document).ready(function() {
|
||||
updateTagcloudColors();
|
||||
});
|
||||
|
||||
|
||||
const observer = new MutationObserver(function(mutations) {
|
||||
mutations.forEach(function(mutation) {
|
||||
if (mutation.attributeName === 'data-theme') {
|
||||
updateTagcloudColors();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
observer.observe(document.documentElement, {
|
||||
attributes: true,
|
||||
attributeFilter: ['data-theme']
|
||||
});
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
<script>
|
||||
loadAsync("https://cdn.jsdelivr.net/npm/fastclick@1.0.6/lib/fastclick.min.js", function(){
|
||||
var $nav = document.querySelector("nav");
|
||||
if($nav) FastClick.attach($nav);
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<script src="/js/theme-toggle.js"></script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
function generateCatalog(selector) {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
_containerSelector = 'div.post-container'
|
||||
|
||||
|
||||
|
||||
var P = $(_containerSelector), a, n, t, l, i, c;
|
||||
a = P.find('h1,h2,h3,h4,h5,h6');
|
||||
|
||||
|
||||
$(selector).html('')
|
||||
|
||||
|
||||
a.each(function () {
|
||||
n = $(this).prop('tagName').toLowerCase();
|
||||
i = "#" + $(this).prop('id');
|
||||
t = $(this).text();
|
||||
c = $('<a href="' + i + '" rel="nofollow" title="' + t + '">' + t + '</a>');
|
||||
l = $('<li class="' + n + '_nav"></li>').append(c);
|
||||
$(selector).append(l);
|
||||
});
|
||||
return true;
|
||||
}
|
||||
|
||||
generateCatalog(".catalog-body");
|
||||
|
||||
|
||||
$(".catalog-toggle").click((function (e) {
|
||||
e.preventDefault();
|
||||
$('.side-catalog').toggleClass("fold")
|
||||
}))
|
||||
|
||||
|
||||
|
||||
|
||||
loadAsync("\/js\/jquery.nav.js", function () {
|
||||
$('.catalog-body').onePageNav({
|
||||
currentClass: "active",
|
||||
changeHash: !1,
|
||||
easing: "swing",
|
||||
filter: "",
|
||||
scrollSpeed: 700,
|
||||
scrollOffset: 0,
|
||||
scrollThreshold: .2,
|
||||
begin: null,
|
||||
end: null,
|
||||
scrollChange: null,
|
||||
padding: 80
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user