<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title>云淡风轻</title>
  
  <link href="/atom.xml" rel="self"/>
  
  <link href="https://cloudlessa.github.io/"/>
  <updated>2016-09-02T01:14:27.730Z</updated>
  <id>https://cloudlessa.github.io/</id>
  
  <author>
    <name>cloudlessa</name>
    
  </author>
  
  <generator uri="http://hexo.io/">Hexo</generator>
  
  <entry>
    <title>不蒜子统计</title>
    <link href="https://cloudlessa.github.io/2016/09/01/%E4%B8%8D%E8%92%9C%E5%AD%90%E7%BB%9F%E8%AE%A1/"/>
    <id>https://cloudlessa.github.io/2016/09/01/不蒜子统计/</id>
    <published>2016-09-01T08:09:57.000Z</published>
    <updated>2016-09-02T01:14:27.730Z</updated>
    
    <content type="html"><![CDATA[<h2 id="使用不蒜子添加访客统计"><a href="#使用不蒜子添加访客统计" class="headerlink" title="使用不蒜子添加访客统计"></a>使用不蒜子添加访客统计</h2><ul>
<li>“不蒜子”与百度统计谷歌分析等有区别：<br>“不蒜子”可直接将访问次数显示在您在网页上（也可不显示）；对于已经上线一段时间的网站，“不蒜子”允许您初始化首次数据。。</li>
</ul>
<p>普通用户只需两步走：<code>一行脚本+一行标签</code>，搞定一切。追求极致的用户可以进行任意DIY。</p>
<h3 id="1-引入脚本（必选）"><a href="#1-引入脚本（必选）" class="headerlink" title="1.引入脚本（必选）"></a>1.引入脚本（必选）</h3><p>要使用不蒜子必须在页面中引入busuanzi.js，目前最新版如下。</p>
<pre><code>&lt;script async src=&quot;//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js&quot;&gt;&lt;/script&gt;
</code></pre><p>不蒜子可以给任何类型的个人站点使用，如果你是用的hexo，打开themes/你的主题/layout/_partial/footer.ejs添加上述脚本即可，当然你也可以添加到 header 中。</p>
<h3 id="2-安装标签"><a href="#2-安装标签" class="headerlink" title="2.安装标签"></a>2.安装标签</h3><h4 id="1-要显示站点总访问量，复制以下代码添加到你需要显示的位置。有两种算法可选："><a href="#1-要显示站点总访问量，复制以下代码添加到你需要显示的位置。有两种算法可选：" class="headerlink" title="1.要显示站点总访问量，复制以下代码添加到你需要显示的位置。有两种算法可选："></a>1.要显示站点总访问量，复制以下代码添加到你需要显示的位置。有两种算法可选：</h4><p>①算法a：pv的方式，单个用户连续点击n篇文章，记录n次访问量。</p>
<pre><code>&lt;span id=&quot;busuanzi_container_site_pv&quot;&gt;本站总访问量&lt;span id=&quot;busuanzi_value_site_pv&quot;&gt;&lt;/span&gt;次&lt;/span&gt;
</code></pre><p>②算法b：uv的方式，单个用户连续点击n篇文章，只记录1次访客数。</p>
<pre><code>&lt;span id=&quot;busuanzi_container_site_uv&quot;&gt;本站访客数&lt;span id=&quot;busuanzi_value_site_uv&quot;&gt;&lt;/span&gt;人次&lt;/span&gt;
</code></pre><p>如果你是用的hexo，打开themes/你的主题/layout/_partial/footer.ejs添加即可。</p>
<h4 id="2-显示单页面访问量"><a href="#2-显示单页面访问量" class="headerlink" title="2.显示单页面访问量"></a>2.显示单页面访问量</h4><p>要显示每篇文章的访问量，复制以下代码添加到你需要显示的位置。</p>
<p>算法：pv的方式，单个用户点击1篇文章，本篇文章记录1次阅读量。</p>
<pre><code>&lt;span id=&quot;busuanzi_container_page_pv&quot;&gt;本文总阅读量&lt;span id=&quot;busuanzi_value_page_pv&quot;&gt;&lt;/span&gt;次&lt;/span&gt;
</code></pre><p>其中span标签中的中文可以修改，<code>id</code>保持不变。</p>
]]></content>
    
    <summary type="html">
    
      &lt;h2 id=&quot;使用不蒜子添加访客统计&quot;&gt;&lt;a href=&quot;#使用不蒜子添加访客统计&quot; class=&quot;headerlink&quot; title=&quot;使用不蒜子添加访客统计&quot;&gt;&lt;/a&gt;使用不蒜子添加访客统计&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;“不蒜子”与百度统计谷歌分析等有区别：&lt;br&gt;“不蒜子”
    
    </summary>
    
      <category term="不蒜子统计" scheme="https://cloudlessa.github.io/categories/%E4%B8%8D%E8%92%9C%E5%AD%90%E7%BB%9F%E8%AE%A1/"/>
    
    
      <category term="不蒜子统计" scheme="https://cloudlessa.github.io/tags/%E4%B8%8D%E8%92%9C%E5%AD%90%E7%BB%9F%E8%AE%A1/"/>
    
  </entry>
  
  <entry>
    <title>Hello World</title>
    <link href="https://cloudlessa.github.io/2016/08/26/hello-world/"/>
    <id>https://cloudlessa.github.io/2016/08/26/hello-world/</id>
    <published>2016-08-26T09:02:19.098Z</published>
    <updated>2016-08-26T09:02:19.098Z</updated>
    
    <content type="html"><![CDATA[<p>Welcome to <a href="https://hexo.io/" target="_blank" rel="external">Hexo</a>! This is your very first post. Check <a href="https://hexo.io/docs/" target="_blank" rel="external">documentation</a> for more info. If you get any problems when using Hexo, you can find the answer in <a href="https://hexo.io/docs/troubleshooting.html" target="_blank" rel="external">troubleshooting</a> or you can ask me on <a href="https://github.com/hexojs/hexo/issues" target="_blank" rel="external">GitHub</a>.</p>
<h2 id="Quick-Start"><a href="#Quick-Start" class="headerlink" title="Quick Start"></a>Quick Start</h2><h3 id="Create-a-new-post"><a href="#Create-a-new-post" class="headerlink" title="Create a new post"></a>Create a new post</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">$ hexo new <span class="string">"My New Post"</span></div></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/writing.html" target="_blank" rel="external">Writing</a></p>
<h3 id="Run-server"><a href="#Run-server" class="headerlink" title="Run server"></a>Run server</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">$ hexo server</div></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/server.html" target="_blank" rel="external">Server</a></p>
<h3 id="Generate-static-files"><a href="#Generate-static-files" class="headerlink" title="Generate static files"></a>Generate static files</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">$ hexo generate</div></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/generating.html" target="_blank" rel="external">Generating</a></p>
<h3 id="Deploy-to-remote-sites"><a href="#Deploy-to-remote-sites" class="headerlink" title="Deploy to remote sites"></a>Deploy to remote sites</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">$ hexo deploy</div></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/deployment.html" target="_blank" rel="external">Deployment</a></p>
]]></content>
    
    <summary type="html">
    
      &lt;p&gt;Welcome to &lt;a href=&quot;https://hexo.io/&quot; target=&quot;_blank&quot; rel=&quot;external&quot;&gt;Hexo&lt;/a&gt;! This is your very first post. Check &lt;a href=&quot;https://hexo.
    
    </summary>
    
    
  </entry>
  
</feed>
