代码拉取完成,页面将自动刷新
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Hexo</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta property="og:type" content="website">
<meta property="og:title" content="Hexo">
<meta property="og:url" content="https://bingling_ice-cream.gitee.io/hexo/index.html">
<meta property="og:site_name" content="Hexo">
<meta property="og:locale" content="zh_CN">
<meta property="article:author" content="XGL">
<meta name="twitter:card" content="summary">
<link rel="alternate" href="/hexo/atom.xml" title="Hexo" type="application/atom+xml">
<link rel="icon" href="/images/default-avatar.jpg">
<link href="//fonts.googleapis.com/css?family=Source+Code+Pro" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="/hexo/css/style.css">
<link rel="stylesheet" href="/hexo/css/highlight.css">
<meta name="generator" content="Hexo 7.0.0"></head>
<body>
<div id="fullpage" class="mobile-nav-right">
<div id="wrapper" title="图片来自网络">
<header id="header">
<div id="nav-toggle" class="nav-toggle"></div>
<div class="head-box global-width">
<nav class="nav-box nav-right">
<a class="nav-item" href="/hexo/" title
>首页</a>
<a class="nav-item" href="/hexo/archives" title
>归档</a>
</nav>
</div>
</header>
<div id="middlecontent" title class="global-width sidebar-right">
<section id="main">
<article id="post-03-部署" class="article global-container article-type-post" itemscope itemprop="blogPost">
<header class="article-header">
<h1 itemprop="name">
<a class="article-title" href="/hexo/2023/11/26/03-%E9%83%A8%E7%BD%B2/">03-部署</a>
</h1>
</header>
<div class="article-meta">
<a href="/hexo/2023/11/26/03-%E9%83%A8%E7%BD%B2/" class="article-date">
<time datetime="2023-11-26T06:06:02.000Z" itemprop="datePublished">2023-11-26</time>
</a>
<ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/hexo/tags/Hexo/" rel="tag">Hexo</a></li></ul>
</div>
<div class="article-inner">
<div class="article-content article-content-cloud" itemprop="articleBody">
<h3 id="生成公钥"><a href="#生成公钥" class="headerlink" title="生成公钥"></a>生成公钥</h3><p>使用命令<code>ssh-keygen -t rsa -C "你的邮箱"</code>生成公钥私钥</p>
<p>使用记事本打开上述命令执行后生成的文件<code>id_rsa.pub</code>,里边的内容就是公钥,复制其到粘贴板</p>
<h3 id="新建仓库"><a href="#新建仓库" class="headerlink" title="新建仓库"></a>新建仓库</h3><p>使用码云新建一个空的仓库,并跳转到<code>管理->部署公钥管理->添加公钥</code>,把粘贴板上的公钥添加上去</p>
<p>回到仓库的首页,复制我们的仓库远程地址到粘贴板。</p>
<h3 id="上传博客"><a href="#上传博客" class="headerlink" title="上传博客"></a>上传博客</h3><p>回到我们的博客文件夹,打开<code>_config.yml</code>,将末尾的<code>deploy</code>属性内<code>type</code>属性置为<code>git</code>,并新增一行缩进跟<code>type</code>一样的属性,命名为<code>repo</code>,内容就是我们剪切板上的仓库的远程地址。</p>
<p>修改属性<code>url</code>为我们之后开通的博客的地址,否则会没有样式。</p>
<p>接着我们打开命令行执行<code>npm install hexo-deployer-git --save</code>安装远程提交依赖库。</p>
<p>再依次执行以下命令,将我们的博客上传至码云的仓库中。</p>
<div class="highlight-box"autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" contenteditable="true"data-rel="CMD"><figure class="iseeu highlight /cmd"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">hexo c</span><br><span class="line">hexo g</span><br><span class="line">hexo d</span><br></pre></td></tr></table></figure></div>
<h3 id="开通网站"><a href="#开通网站" class="headerlink" title="开通网站"></a>开通网站</h3><p>博客上传完毕之后,我们回到码云仓库,进入<code>服务->Gitee Pages</code>网页,勾选上<code>强制使用HTTPS</code>后,点击启动按钮。稍等一段时间,我们的网站就完成开通,那个很显眼的链接就是我们这个博客网站的网址。</p>
</div>
</div>
</article>
<article id="post-02-主题" class="article global-container article-type-post" itemscope itemprop="blogPost">
<header class="article-header">
<h1 itemprop="name">
<a class="article-title" href="/hexo/2023/11/26/02-%E4%B8%BB%E9%A2%98/">02-主题</a>
</h1>
</header>
<div class="article-meta">
<a href="/hexo/2023/11/26/02-%E4%B8%BB%E9%A2%98/" class="article-date">
<time datetime="2023-11-26T05:42:23.000Z" itemprop="datePublished">2023-11-26</time>
</a>
<ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/hexo/tags/Hexo/" rel="tag">Hexo</a></li></ul>
</div>
<div class="article-inner">
<div class="article-content article-content-cloud" itemprop="articleBody">
<h3 id="安装主题"><a href="#安装主题" class="headerlink" title="安装主题"></a>安装主题</h3><p>默认的landspace主题相对于我来说不是很满意,这里给大家推荐一个古风的主题[Antiquity](<a target="_blank" rel="noopener" href="https://gitee.com/bingling_ice-cream/hexo-theme-antiquity">冰凌呀/hexo-theme-antiquity (gitee.com)</a>)</p>
<p>首先使用命令行打开我们博客文件夹下的themes文件夹,使用命令<code>git clone https://gitee.com/bingling_ice-cream/hexo-theme-antiquity.git</code>将主题下载到themes文件夹下</p>
<p>再打开博客文件夹下的_config.yml,将其中的theme属性修改为<code>hexo-theme-antiquity</code>,执行命令<code>hexo server</code>启动博客,再打开浏览器访问,可以发现,主题已经切换成古风了。</p>
<h3 id="修改图片"><a href="#修改图片" class="headerlink" title="修改图片"></a>修改图片</h3><p>我们可以到文件夹<code>hexo-theme-antiquity/source/images</code>下将我们的图片替换掉原来的图片,只需要修改成相同的名字,再重新启动博客,可以看到主题的背景和头像已经修改成我们自己的图片了。</p>
</div>
</div>
</article>
<article id="post-01-简介" class="article global-container article-type-post" itemscope itemprop="blogPost">
<header class="article-header">
<h1 itemprop="name">
<a class="article-title" href="/hexo/2023/11/26/01-%E7%AE%80%E4%BB%8B/">01-简介</a>
</h1>
</header>
<div class="article-meta">
<a href="/hexo/2023/11/26/01-%E7%AE%80%E4%BB%8B/" class="article-date">
<time datetime="2023-11-26T05:09:21.000Z" itemprop="datePublished">2023-11-26</time>
</a>
<ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/hexo/tags/Hexo/" rel="tag">Hexo</a></li></ul>
</div>
<div class="article-inner">
<div class="article-content article-content-cloud" itemprop="articleBody">
<h3 id="Hexo"><a href="#Hexo" class="headerlink" title="Hexo"></a>Hexo</h3><p>Hexo 是一个快速、简单、强大的博客框架。你用<code>Markdown</code>写文章,Hexo 会在几秒钟内生成一个主题漂亮的静态文件。</p>
<h3 id="安装环境"><a href="#安装环境" class="headerlink" title="安装环境"></a>安装环境</h3><ul>
<li>Node.js</li>
<li>Git</li>
</ul>
<h3 id="安装-Hexo"><a href="#安装-Hexo" class="headerlink" title="安装 Hexo"></a>安装 Hexo</h3><p>新建一个文件夹,并以命令行打开它,依次执行以下命令</p>
<div class="highlight-box"autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" contenteditable="true"data-rel="CMD"><figure class="iseeu highlight /cmd"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">npm install hexo-cli -g</span><br><span class="line">hexo init blog</span><br><span class="line"><span class="built_in">cd</span> blog</span><br><span class="line">npm install</span><br><span class="line">hexo server</span><br></pre></td></tr></table></figure></div>
<p>随后打开浏览器,访问网址<a target="_blank" rel="noopener" href="http://localhost:4000/">http://localhost:4000/</a></p>
<p>即可在本地访问生成的博客</p>
</div>
</div>
</article>
</section>
<aside id="sidebar">
<div class="widget-box">
<div class="avatar-box">
<img class="avatar" src="https://bingling_ice-cream.gitee.io/hexo/images/default-avatar.jpg" title="图片来自网络"></img>
<h3 class="avatar-name">
氷凌公子
</h3>
<p class="avatar-slogan">
英俊潇洒 玉树临风
</p>
</div>
</div>
<div class="widget-box">
<h3 class="widget-title">标签</h3>
<div class="widget">
<ul class="tag-list" itemprop="keywords"><li class="tag-list-item"><a class="tag-list-link" href="/hexo/tags/Hexo/" rel="tag">Hexo</a></li></ul>
</div>
</div>
<div class="widget-box">
<h3 class="widget-title">归档</h3>
<div class="widget">
<ul class="archive-list"><li class="archive-list-item"><a class="archive-list-link" href="/hexo/archives/2023/11/">十一月 2023</a></li></ul>
</div>
</div>
<div class="widget-box">
<h3 class="widget-title">最新文章</h3>
<div class="widget">
<ul>
<li>
<a href="/hexo/2023/11/26/03-%E9%83%A8%E7%BD%B2/">03-部署</a>
</li>
<li>
<a href="/hexo/2023/11/26/02-%E4%B8%BB%E9%A2%98/">02-主题</a>
</li>
<li>
<a href="/hexo/2023/11/26/01-%E7%AE%80%E4%BB%8B/">01-简介</a>
</li>
</ul>
</div>
</div>
<div class="widget-box">
<h3 class="widget-title">友链</h3>
<div class="widget">
<a style="display: block;" href="https://hexo.io/zh-cn/" title target='_blank'
>博客构建框架:Hexo</a>
<a style="display: block;" href="https://yiluyanxia.github.io/" title target='_blank'
>主题作者博客:一路烟霞</a>
</div>
</div>
</aside>
</div>
<footer id="footer">
<div class="foot-box global-width">
© 2023 XGL
驱动于 <a href="http://hexo.io/" target="_blank">Hexo</a>
| 主题 <a target="_blank" rel="noopener" href="https://github.com/yiluyanxia/hexo-theme-antiquity">antiquity</a>
<br>
<script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>
<span id="busuanzi_container_site_pv">不蒜子告之 阁下是第<span id="busuanzi_value_site_pv"></span>个访客</span>
</div>
</footer>
<script src="https://code.jquery.com/jquery-2.0.3.min.js"></script>
<script>
if (!window.jQuery) {
var script = document.createElement('script');
script.src = "/js/jquery-2.0.3.min.js";
document.body.write(script);
}
</script>
<link rel="stylesheet" href="/hexo/fancybox/jquery.fancybox.css">
<script src="/hexo/fancybox/jquery.fancybox.pack.js"></script>
<script src="/hexo/js/script.js"></script>
</div>
<nav id="mobile-nav" class="mobile-nav-box">
<div class="mobile-nav-img mobile-nav-top"></div>
<a href="/hexo/" class="mobile-nav-link">首页</a>
<a href="/hexo/archives" class="mobile-nav-link">归档</a>
<div class="mobile-nav-img mobile-nav-bottom"></div>
</nav>
</div>
</body>
</html>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。