Site updated: 2022-09-14 12:31:27
This commit is contained in:
58
rss.xml
58
rss.xml
@ -10,12 +10,66 @@
|
||||
</author>
|
||||
<description>hito的博客</description>
|
||||
<language>zh-CN</language>
|
||||
<pubDate>Tue, 13 Sep 2022 08:03:19 +0800</pubDate>
|
||||
<lastBuildDate>Tue, 13 Sep 2022 08:03:19 +0800</lastBuildDate>
|
||||
<pubDate>Wed, 14 Sep 2022 12:23:55 +0800</pubDate>
|
||||
<lastBuildDate>Wed, 14 Sep 2022 12:23:55 +0800</lastBuildDate>
|
||||
<category term="hito" />
|
||||
<category term="無言" />
|
||||
<category term="博客" />
|
||||
<category term="公告栏" />
|
||||
<item>
|
||||
<guid isPermalink="true">https://blog.jingxiyuan.cn/2022/09/14/Hexo%E5%AE%89%E8%A3%85%E6%91%B8%E7%B4%A2/</guid>
|
||||
<title>Hexo安装摸索</title>
|
||||
<link>https://blog.jingxiyuan.cn/2022/09/14/Hexo%E5%AE%89%E8%A3%85%E6%91%B8%E7%B4%A2/</link>
|
||||
<pubDate>Wed, 14 Sep 2022 12:23:55 +0800</pubDate>
|
||||
<description><![CDATA[ <h1 id="hexo博客安装"><a class="anchor" href="#hexo博客安装">#</a> hexo 博客安装</h1>
|
||||
<p><a href="">安装 nodejs</a></p>
|
||||
<p><a href="">安装 git</a> </p>
|
||||
<p>安装 hexo(windows 需进入 git bash)</p>
|
||||
<p><code>npm install -g hexo-cli</code></p>
|
||||
<p>初始化博客目录</p>
|
||||
<p><code>hexo init blog</code></p>
|
||||
<p>进入博客目录</p>
|
||||
<p><code>cd blog</code></p>
|
||||
<p>初始化 hexo 到博客目录</p>
|
||||
<p><code>npm install</code></p>
|
||||
<h1 id="shoka主题安装"><a class="anchor" href="#shoka主题安装">#</a> shoka 主题安装</h1>
|
||||
<p>下载主题 </p>
|
||||
<p><code>git clone </code> <a href="https://github.com/amehime/hexo-theme-shoka.git"> <code>https://github.com/amehime/hexo-theme-shoka.git</code> </a> <code> ./themes/shoka</code> </p>
|
||||
<p>卸载 hexo-renderer-marked 以及别的 markdown 文件渲染器 </p>
|
||||
<p><code>npm un hexo-renderer-marked --save</code> </p>
|
||||
<p>安装(md 文件渲染器,压缩 css/js/html)</p>
|
||||
<p><code>npm i hexo-renderer-multi-markdown-it --save</code> </p>
|
||||
<p>安装(给生成的 css 文件们添加浏览器前缀) </p>
|
||||
<p><code>npm i hexo-autoprefixer --save</code> </p>
|
||||
<p>安装(站内搜索功能) </p>
|
||||
<p><code>npm i hexo-algoliasearch --save</code> </p>
|
||||
<p>安装(文章或站点字数及阅读时间统计) </p>
|
||||
<p><code>npm i hexo-symbols-count-time --save</code> </p>
|
||||
<p>安装(生成 Feed 文件) </p>
|
||||
<p><code>npm i hexo-feed --save</code></p>
|
||||
<h1 id="hexo部分常用命令"><a class="anchor" href="#hexo部分常用命令">#</a> Hexo 部分常用命令</h1>
|
||||
<p>清除静态文件</p>
|
||||
<p><code>hexo clean</code> </p>
|
||||
<p>生成静态文件 </p>
|
||||
<p><code>hexo g</code> </p>
|
||||
<p>安装 git 推送插件 </p>
|
||||
<p><code>npm install hexo-deployer-git --save</code> </p>
|
||||
<p>推送静态文件到 git </p>
|
||||
<p><code>hexo d</code></p>
|
||||
<h1 id="安装hexo-admin编写博客插件"><a class="anchor" href="#安装hexo-admin编写博客插件">#</a> 安装 hexo-admin(编写博客插件)</h1>
|
||||
<p><code>npm install hexo-admin --save</code></p>
|
||||
<p>hexo-admin 编辑 url</p>
|
||||
<p><a href="http://localhost:4000/admin"> <code>http://localhost:4000/admin</code> </a></p>
|
||||
<p>settings 设置用户名、密码、Secret</p>
|
||||
<p><a href="http://localhost:4000/admin/#/settings"> <code>http://localhost:4000/admin/#/settings</code> </a> </p>
|
||||
<p>把底部生成的配置拷入 hexo 配合文件中 (_config.yml)<br />
|
||||
<code>admin: username: username password_hash: ````10$L.XAIqIWgTc5S1zpvV3MEu7/rH34p4Is/nq824smv8EZ3lIPCp1su secret: 'my super secret phrase' #用单引号包裹 deployCommand: 'hexo-publish.sh' #windows用hexo-publish.bat,linux用hexo-publish.sh</code></p>
|
||||
<h2 id="hexo-publishsh"><a class="anchor" href="#hexo-publishsh">#</a> <span class="exturl" data-url="aHR0cDovL2hleG8tcHVibGlzaC5zaA==">hexo-publish.sh</span></h2>
|
||||
<p><code>#!/usr/bin/env sh hexo clean hexo g hexo d</code></p>
|
||||
<h2 id="hexo-publishbat"><a class="anchor" href="#hexo-publishbat">#</a> hexo-publish.bat</h2>
|
||||
<p><code>@echo off cd D:\blog d: @cmd /c &quot;hexo clean&amp;&amp; hexo g&amp;&amp;hexo d&amp;&amp;echo success&quot;</code></p>
|
||||
]]></description>
|
||||
</item>
|
||||
<item>
|
||||
<guid isPermalink="true">https://blog.jingxiyuan.cn/2022/09/13/hello-world/</guid>
|
||||
<title>Hello World</title>
|
||||
|
Reference in New Issue
Block a user