Skip to content

Commit

Permalink
Site updated: 2021-04-02 18:18:11
Browse files Browse the repository at this point in the history
  • Loading branch information
祁耀博 committed Apr 2, 2021
1 parent 0c25150 commit 7f208c6
Show file tree
Hide file tree
Showing 10 changed files with 454 additions and 843 deletions.
173 changes: 68 additions & 105 deletions 2021/04/01/blog搭建/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<meta property="og:description" content="1、Node.js安装 https:&#x2F;&#x2F;nodejs.org&#x2F;zh-cn&#x2F;2、Git安装 https:&#x2F;&#x2F;git-scm.com&#x2F;3、hexo安装 https:&#x2F;&#x2F;hexo.io&#x2F;zh-cn&#x2F;4、主题-next https:&#x2F;&#x2F;hexo.io&#x2F;themes&#x2F; 常用命令新建网站1$ hexo init 新建文章1$ hexo new &quot;post title with whitespace">
<meta property="og:locale" content="zh_CN">
<meta property="article:published_time" content="2021-04-01T09:48:08.000Z">
<meta property="article:modified_time" content="2021-04-01T10:53:50.917Z">
<meta property="article:modified_time" content="2021-04-02T10:16:29.307Z">
<meta property="article:author" content="Yao Bo">
<meta property="article:tag" content="php,mysql,nginx">
<meta name="twitter:card" content="summary">
Expand Down Expand Up @@ -174,32 +174,45 @@ <h1 class="post-title" itemprop="name headline">
<i class="far fa-calendar"></i>
</span>
<span class="post-meta-item-text">发表于</span>


<time title="创建时间:2021-04-01 17:48:08 / 修改时间:18:53:50" itemprop="dateCreated datePublished" datetime="2021-04-01T17:48:08+08:00">2021-04-01</time>
<time title="创建时间:2021-04-01 17:48:08" itemprop="dateCreated datePublished" datetime="2021-04-01T17:48:08+08:00">2021-04-01</time>
</span>
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-calendar-check"></i>
</span>
<span class="post-meta-item-text">更新于</span>
<time title="修改时间:2021-04-02 18:16:29" itemprop="dateModified" datetime="2021-04-02T18:16:29+08:00">2021-04-02</time>
</span>


<span id="/2021/04/01/blog%E6%90%AD%E5%BB%BA/" class="post-meta-item leancloud_visitors" data-flag-title="环境搭建" title="阅读次数">
<span class="post-meta-item-icon">
<i class="fa fa-eye"></i>
</span>
<span class="post-meta-item-text">阅读次数:</span>
<span class="leancloud-visitors-count"></span>
</span><br>

<span class="post-meta-item">

<span class="post-meta-item-icon">
<i class="far fa-comment"></i>
</span>
<span class="post-meta-item-text">Valine:</span>

<a title="valine" href="/2021/04/01/blog%E6%90%AD%E5%BB%BA/#valine-comments" itemprop="discussionUrl">
<span class="post-comments-count valine-comment-count" data-xid="/2021/04/01/blog%E6%90%AD%E5%BB%BA/" itemprop="commentCount"></span>
</a>
</span>

<br>
<span class="post-meta-item" title="本文字数">
<span class="post-meta-item-icon">
<i class="far fa-file-word"></i>
</span>
<span class="post-meta-item-text">本文字数:</span>
<span></span>
<span>505</span>
</span>
<span class="post-meta-item" title="阅读时长">
<span class="post-meta-item-icon">
<i class="far fa-clock"></i>
</span>
<span class="post-meta-item-text">阅读时长 &asymp;</span>
<span>NaN:aN</span>
<span>1 分钟</span>
</span>

</div>
Expand All @@ -219,6 +232,8 @@ <h2 id="生成静态文件"><a href="#生成静态文件" class="headerlink" tit

<h2 id="启动服务"><a href="#启动服务" class="headerlink" title="启动服务"></a>启动服务</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo s</span><br></pre></td></tr></table></figure>

<span id="more"></span>

<h2 id="部署网站"><a href="#部署网站" class="headerlink" title="部署网站"></a>部署网站</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo d</span><br></pre></td></tr></table></figure>

<h2 id="清除缓存文件"><a href="#清除缓存文件" class="headerlink" title="清除缓存文件"></a>清除缓存文件</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo clean</span><br></pre></td></tr></table></figure>
Expand All @@ -240,6 +255,14 @@ <h2 id="部署插件"><a href="#部署插件" class="headerlink" title="部署




<!--添加版权信息-->
<div>




</div>


<div>
Expand All @@ -259,7 +282,7 @@ <h2 id="部署插件"><a href="#部署插件" class="headerlink" title="部署


<footer class="post-footer">




Expand All @@ -282,6 +305,7 @@ <h2 id="部署插件"><a href="#部署插件" class="headerlink" title="部署

</div>

<div class="comments" id="valine-comments"></div>

<script>
window.addEventListener('tabs:register', () => {
Expand Down Expand Up @@ -381,17 +405,13 @@ <h2 id="部署插件"><a href="#部署插件" class="headerlink" title="部署
<span class="post-meta-item-icon">
<i class="fa fa-chart-area"></i>
</span>
<span class="post-meta-item-text">站点总字数:</span>
<span title="站点总字数">NaNm</span>
<span title="站点总字数">1k</span>
<span class="post-meta-divider">|</span>
<span class="post-meta-item-icon">
<i class="fa fa-coffee"></i>
</span>
<span class="post-meta-item-text">站点阅读时长 &asymp;</span>
<span title="站点阅读时长">NaN:aN</span>
<span title="站点阅读时长">1 分钟</span>
</div>
<div class="powered-by"><a href="https://hexo.io/" class="theme-link" rel="noopener" target="_blank">Hexo</a> & <a href="https://theme-next.org/" class="theme-link" rel="noopener" target="_blank">NexT.Gemini</a> 强力驱动
</div>



Expand All @@ -400,92 +420,6 @@ <h2 id="部署插件"><a href="#部署插件" class="headerlink" title="部署



<script>
(function() {
function leancloudSelector(url) {
url = encodeURI(url);
return document.getElementById(url).querySelector('.leancloud-visitors-count');
}

function addCount(Counter) {
var visitors = document.querySelector('.leancloud_visitors');
var url = decodeURI(visitors.id);
var title = visitors.dataset.flagTitle;

Counter('get', '/classes/Counter?where=' + encodeURIComponent(JSON.stringify({ url })))
.then(response => response.json())
.then(({ results }) => {
if (results.length > 0) {
var counter = results[0];
leancloudSelector(url).innerText = counter.time + 1;
Counter('put', '/classes/Counter/' + counter.objectId, { time: { '__op': 'Increment', 'amount': 1 } })
.catch(error => {
console.error('Failed to save visitor count', error);
});
} else {
leancloudSelector(url).innerText = 'Counter not initialized! More info at console err msg.';
console.error('ATTENTION! LeanCloud counter has security bug, see how to solve it here: https://github.com/theme-next/hexo-leancloud-counter-security. \n However, you can still use LeanCloud without security, by setting `security` option to `false`.');

}
})
.catch(error => {
console.error('LeanCloud Counter Error', error);
});
}

function showTime(Counter) {
var visitors = document.querySelectorAll('.leancloud_visitors');
var entries = [...visitors].map(element => {
return decodeURI(element.id);
});

Counter('get', '/classes/Counter?where=' + encodeURIComponent(JSON.stringify({ url: { '$in': entries } })))
.then(response => response.json())
.then(({ results }) => {
for (let url of entries) {
let target = results.find(item => item.url === url);
leancloudSelector(url).innerText = target ? target.time : 0;
}
})
.catch(error => {
console.error('LeanCloud Counter Error', error);
});
}

let { app_id, app_key, server_url } = {"enable":true,"app_id":"OJvfMmDUwuGB7kg6AHi9MTpK-MdYXbMMI","app_key":"GxfLNM81lu9bXyVcdM28hBd9","server_url":null,"security":true,"betterPerformance":true};
function fetchData(api_server) {
var Counter = (method, url, data) => {
return fetch(`${api_server}/1.1${url}`, {
method,
headers: {
'X-LC-Id' : app_id,
'X-LC-Key' : app_key,
'Content-Type': 'application/json',
},
body: JSON.stringify(data)
});
};
if (CONFIG.page.isPost) {
if (CONFIG.hostname !== location.hostname) return;
addCount(Counter);
} else if (document.querySelectorAll('.post-title-link').length >= 1) {
showTime(Counter);
}
}

let api_server = app_id.slice(-9) !== '-MdYXbMMI' ? server_url : `https://${app_id.slice(0, 8).toLowerCase()}.api.lncldglobal.com`;

if (api_server) {
fetchData(api_server);
} else {
fetch('https://app-router.leancloud.cn/2/route?appId=' + app_id)
.then(response => response.json())
.then(({ api_server }) => {
fetchData('https://' + api_server);
});
}
})();
</script>


</div>
Expand Down Expand Up @@ -529,6 +463,35 @@ <h2 id="部署插件"><a href="#部署插件" class="headerlink" title="部署





<script>
NexT.utils.loadComments(document.querySelector('#valine-comments'), () => {
NexT.utils.getScript('//unpkg.com/valine/dist/Valine.min.js', () => {
var GUEST = ['nick', 'mail', 'link'];
var guest = 'nick,mail,link';
guest = guest.split(',').filter(item => {
return GUEST.includes(item);
});
new Valine({
el : '#valine-comments',
verify : false,
notify : false,
appId : 'OJvfMmDUwuGB7kg6AHi9MTpK-MdYXbMMI',
appKey : 'GxfLNM81lu9bXyVcdM28hBd9',
placeholder: "Just go go",
avatar : 'mm',
meta : guest,
pageSize : '10' || 10,
visitor : false,
lang : '' || 'zh-cn',
path : location.pathname,
recordIP : false,
serverURLs : 'https://yaoboqi.github.io'
});
}, window.Valine);
});
</script>

<script src="/live2dw/lib/L2Dwidget.min.js?094cbace49a39548bed64abff5988b05"></script><script>L2Dwidget.init({"pluginRootPath":"live2dw/","pluginJsPath":"lib/","pluginModelPath":"assets/","model":{"jsonPath":"/live2dw/assets/tororo.model.json"},"display":{"position":"right","width":350,"height":350},"mobile":{"show":false},"react":{"opacityDefault":1,"opacityOnHover":1},"log":false,"tagMode":false});</script></body>
</html>
Expand Down
Loading

0 comments on commit 7f208c6

Please sign in to comment.