Site updated: 2022-09-14 13:04:45
This commit is contained in:
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
93
atom.xml
93
atom.xml
@@ -18,53 +18,100 @@
|
||||
<title>Hexo安装摸索</title>
|
||||
<link rel="alternate" href="https://blog.jingxiyuan.cn/2022/09/14/Hexo%E5%AE%89%E8%A3%85%E6%91%B8%E7%B4%A2/"/>
|
||||
<content type="html"><h1 id="hexo博客安装"><a class="anchor" href="#hexo博客安装">#</a> hexo 博客安装</h1>
|
||||
<p><a href="">安装 nodejs</a></p>
|
||||
<p><a href="">安装 git</a> </p>
|
||||
<ol>
|
||||
<li>
|
||||
<p><span class="exturl" data-url="aHR0cHM6Ly9ub2RlanMub3JnL2VuLw==">安装 nodejs</span></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><span class="exturl" data-url="aHR0cHM6Ly9naXQtc2NtLmNvbS8=">安装 git</span></p>
|
||||
</li>
|
||||
<li>
|
||||
<p>安装 hexo(windows 需进入 git bash)</p>
|
||||
<p><code>npm install -g hexo-cli</code></p>
|
||||
</li>
|
||||
<li>
|
||||
<p>初始化博客目录</p>
|
||||
<p><code>hexo init blog</code></p>
|
||||
</li>
|
||||
<li>
|
||||
<p>进入博客目录</p>
|
||||
<p><code>cd blog</code></p>
|
||||
</li>
|
||||
<li>
|
||||
<p>初始化 hexo 到博客目录</p>
|
||||
<p><code>npm install</code></p>
|
||||
</li>
|
||||
</ol>
|
||||
<h1 id="shoka主题安装"><a class="anchor" href="#shoka主题安装">#</a> shoka 主题安装</h1>
|
||||
<ol>
|
||||
<li>
|
||||
<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><code>git clone </code> <span class="exturl" data-url="aHR0cHM6Ly9naXRodWIuY29tL2FtZWhpbWUvaGV4by10aGVtZS1zaG9rYS5naXQ=">https://github.com/amehime/hexo-theme-shoka.git</span> <code> ./themes/shoka</code></p>
|
||||
</li>
|
||||
<li>
|
||||
<p>卸载 hexo-renderer-marked 以及别的 markdown 文件渲染器 </p>
|
||||
<p><code>npm un hexo-renderer-marked --save</code> </p>
|
||||
<p><code>npm un hexo-renderer-marked --save</code></p>
|
||||
</li>
|
||||
<li>
|
||||
<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><code>npm i hexo-renderer-multi-markdown-it --save</code></p>
|
||||
</li>
|
||||
<li>
|
||||
<p>安装(给生成的 css 文件们添加浏览器前缀)</p>
|
||||
<p><code>npm i hexo-autoprefixer --save</code></p>
|
||||
</li>
|
||||
<li>
|
||||
<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-algoliasearch --save</code></p>
|
||||
</li>
|
||||
<li>
|
||||
<p>安装(文章或站点字数及阅读时间统计)</p>
|
||||
<p><code>npm i hexo-symbols-count-time --save</code></p>
|
||||
</li>
|
||||
<li>
|
||||
<p>安装(生成 Feed 文件)</p>
|
||||
<p><code>npm i hexo-feed --save</code></p>
|
||||
</li>
|
||||
</ol>
|
||||
<h1 id="hexo部分常用命令"><a class="anchor" href="#hexo部分常用命令">#</a> Hexo 部分常用命令</h1>
|
||||
<ul>
|
||||
<li>
|
||||
<p>清除静态文件</p>
|
||||
<p><code>hexo clean</code> </p>
|
||||
<p>生成静态文件 </p>
|
||||
<p><code>hexo g</code> </p>
|
||||
<p><code>hexo clean</code></p>
|
||||
</li>
|
||||
<li>
|
||||
<p>生成静态文件</p>
|
||||
<p><code>hexo g</code></p>
|
||||
</li>
|
||||
<li>
|
||||
<p>安装 git 推送插件 </p>
|
||||
<p><code>npm install hexo-deployer-git --save</code> </p>
|
||||
<p><code>npm install hexo-deployer-git --save</code></p>
|
||||
</li>
|
||||
<li>
|
||||
<p>推送静态文件到 git </p>
|
||||
<p><code>hexo d</code></p>
|
||||
</li>
|
||||
</ul>
|
||||
<h1 id="安装hexo-admin编写博客插件"><a class="anchor" href="#安装hexo-admin编写博客插件">#</a> 安装 hexo-admin(编写博客插件)</h1>
|
||||
<ul>
|
||||
<li>
|
||||
<p><code>npm install hexo-admin --save</code></p>
|
||||
</li>
|
||||
<li>
|
||||
<p>hexo-admin 编辑 url</p>
|
||||
<p><a href="http://localhost:4000/admin"> <code>http://localhost:4000/admin</code> </a></p>
|
||||
</li>
|
||||
<li>
|
||||
<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>
|
||||
</content>
|
||||
<p><a href="http://localhost:4000/admin/#/settings"> <code>http://localhost:4000/admin/#/settings</code> </a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p>把底部生成的配置拷入 hexo 配合文件中 (_config.yml)</p>
|
||||
</li>
|
||||
</ul>
|
||||
<figure class="highlight yml"><figcaption data-lang="YAML"></figcaption><table><tr><td data-num="1"></td><td><pre><span class="token key atrule">admin</span><span class="token punctuation">:</span></pre></td></tr><tr><td data-num="2"></td><td><pre><span class="token key atrule">username</span><span class="token punctuation">:</span> username</pre></td></tr><tr><td data-num="3"></td><td><pre><span class="token key atrule">password_hash</span><span class="token punctuation">:</span> xxxxxx</pre></td></tr><tr><td data-num="4"></td><td><pre><span class="token key atrule">secret</span><span class="token punctuation">:</span> <span class="token string">'my super secret phrase'</span> <span class="token comment">#用单引号包裹</span></pre></td></tr><tr><td data-num="5"></td><td><pre><span class="token key atrule">deployCommand</span><span class="token punctuation">:</span> <span class="token string">'hexo-publish.sh'</span> <span class="token comment">#windows 用 hexo-publish.bat,linux 用 hexo-publish.sh</span></pre></td></tr></table></figure><h4 id="hexo-publishsh"><a class="anchor" href="#hexo-publishsh">#</a> <span class="exturl" data-url="aHR0cDovL2hleG8tcHVibGlzaC5zaA==">hexo-publish.sh</span></h4>
|
||||
<figure class="highlight bash"><figcaption data-lang="bash"></figcaption><table><tr><td data-num="1"></td><td><pre><span class="token shebang important">#!/usr/bin/env sh</span></pre></td></tr><tr><td data-num="2"></td><td><pre>hexo clean</pre></td></tr><tr><td data-num="3"></td><td><pre>hexo g</pre></td></tr><tr><td data-num="4"></td><td><pre>hexo d</pre></td></tr></table></figure><h4 id="hexo-publishbat"><a class="anchor" href="#hexo-publishbat">#</a> hexo-publish.bat</h4>
|
||||
<figure class="highlight bash"><figcaption data-lang="bash"></figcaption><table><tr><td data-num="1"></td><td><pre>@echo off</pre></td></tr><tr><td data-num="2"></td><td><pre><span class="token builtin class-name">cd</span> D:<span class="token punctuation">\</span>blog</pre></td></tr><tr><td data-num="3"></td><td><pre>d:</pre></td></tr><tr><td data-num="4"></td><td><pre>@cmd /c <span class="token string">"hexo clean&amp;&amp; hexo g&amp;&amp;hexo d&amp;&amp;echo success"</span></pre></td></tr></table></figure></content>
|
||||
<updated>2022-09-14T04:23:55.000Z</updated>
|
||||
</entry>
|
||||
<entry>
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
93
rss.xml
93
rss.xml
@@ -22,53 +22,100 @@
|
||||
<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>
|
||||
<ol>
|
||||
<li>
|
||||
<p><span class="exturl" data-url="aHR0cHM6Ly9ub2RlanMub3JnL2VuLw==">安装 nodejs</span></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><span class="exturl" data-url="aHR0cHM6Ly9naXQtc2NtLmNvbS8=">安装 git</span></p>
|
||||
</li>
|
||||
<li>
|
||||
<p>安装 hexo(windows 需进入 git bash)</p>
|
||||
<p><code>npm install -g hexo-cli</code></p>
|
||||
</li>
|
||||
<li>
|
||||
<p>初始化博客目录</p>
|
||||
<p><code>hexo init blog</code></p>
|
||||
</li>
|
||||
<li>
|
||||
<p>进入博客目录</p>
|
||||
<p><code>cd blog</code></p>
|
||||
</li>
|
||||
<li>
|
||||
<p>初始化 hexo 到博客目录</p>
|
||||
<p><code>npm install</code></p>
|
||||
</li>
|
||||
</ol>
|
||||
<h1 id="shoka主题安装"><a class="anchor" href="#shoka主题安装">#</a> shoka 主题安装</h1>
|
||||
<ol>
|
||||
<li>
|
||||
<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><code>git clone </code> <span class="exturl" data-url="aHR0cHM6Ly9naXRodWIuY29tL2FtZWhpbWUvaGV4by10aGVtZS1zaG9rYS5naXQ=">https://github.com/amehime/hexo-theme-shoka.git</span> <code> ./themes/shoka</code></p>
|
||||
</li>
|
||||
<li>
|
||||
<p>卸载 hexo-renderer-marked 以及别的 markdown 文件渲染器 </p>
|
||||
<p><code>npm un hexo-renderer-marked --save</code> </p>
|
||||
<p><code>npm un hexo-renderer-marked --save</code></p>
|
||||
</li>
|
||||
<li>
|
||||
<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><code>npm i hexo-renderer-multi-markdown-it --save</code></p>
|
||||
</li>
|
||||
<li>
|
||||
<p>安装(给生成的 css 文件们添加浏览器前缀)</p>
|
||||
<p><code>npm i hexo-autoprefixer --save</code></p>
|
||||
</li>
|
||||
<li>
|
||||
<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-algoliasearch --save</code></p>
|
||||
</li>
|
||||
<li>
|
||||
<p>安装(文章或站点字数及阅读时间统计)</p>
|
||||
<p><code>npm i hexo-symbols-count-time --save</code></p>
|
||||
</li>
|
||||
<li>
|
||||
<p>安装(生成 Feed 文件)</p>
|
||||
<p><code>npm i hexo-feed --save</code></p>
|
||||
</li>
|
||||
</ol>
|
||||
<h1 id="hexo部分常用命令"><a class="anchor" href="#hexo部分常用命令">#</a> Hexo 部分常用命令</h1>
|
||||
<ul>
|
||||
<li>
|
||||
<p>清除静态文件</p>
|
||||
<p><code>hexo clean</code> </p>
|
||||
<p>生成静态文件 </p>
|
||||
<p><code>hexo g</code> </p>
|
||||
<p><code>hexo clean</code></p>
|
||||
</li>
|
||||
<li>
|
||||
<p>生成静态文件</p>
|
||||
<p><code>hexo g</code></p>
|
||||
</li>
|
||||
<li>
|
||||
<p>安装 git 推送插件 </p>
|
||||
<p><code>npm install hexo-deployer-git --save</code> </p>
|
||||
<p><code>npm install hexo-deployer-git --save</code></p>
|
||||
</li>
|
||||
<li>
|
||||
<p>推送静态文件到 git </p>
|
||||
<p><code>hexo d</code></p>
|
||||
</li>
|
||||
</ul>
|
||||
<h1 id="安装hexo-admin编写博客插件"><a class="anchor" href="#安装hexo-admin编写博客插件">#</a> 安装 hexo-admin(编写博客插件)</h1>
|
||||
<ul>
|
||||
<li>
|
||||
<p><code>npm install hexo-admin --save</code></p>
|
||||
</li>
|
||||
<li>
|
||||
<p>hexo-admin 编辑 url</p>
|
||||
<p><a href="http://localhost:4000/admin"> <code>http://localhost:4000/admin</code> </a></p>
|
||||
</li>
|
||||
<li>
|
||||
<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>
|
||||
<p><a href="http://localhost:4000/admin/#/settings"> <code>http://localhost:4000/admin/#/settings</code> </a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p>把底部生成的配置拷入 hexo 配合文件中 (_config.yml)</p>
|
||||
</li>
|
||||
</ul>
|
||||
<figure class="highlight yml"><figcaption data-lang="YAML"></figcaption><table><tr><td data-num="1"></td><td><pre><span class="token key atrule">admin</span><span class="token punctuation">:</span></pre></td></tr><tr><td data-num="2"></td><td><pre><span class="token key atrule">username</span><span class="token punctuation">:</span> username</pre></td></tr><tr><td data-num="3"></td><td><pre><span class="token key atrule">password_hash</span><span class="token punctuation">:</span> xxxxxx</pre></td></tr><tr><td data-num="4"></td><td><pre><span class="token key atrule">secret</span><span class="token punctuation">:</span> <span class="token string">'my super secret phrase'</span> <span class="token comment">#用单引号包裹</span></pre></td></tr><tr><td data-num="5"></td><td><pre><span class="token key atrule">deployCommand</span><span class="token punctuation">:</span> <span class="token string">'hexo-publish.sh'</span> <span class="token comment">#windows 用 hexo-publish.bat,linux 用 hexo-publish.sh</span></pre></td></tr></table></figure><h4 id="hexo-publishsh"><a class="anchor" href="#hexo-publishsh">#</a> <span class="exturl" data-url="aHR0cDovL2hleG8tcHVibGlzaC5zaA==">hexo-publish.sh</span></h4>
|
||||
<figure class="highlight bash"><figcaption data-lang="bash"></figcaption><table><tr><td data-num="1"></td><td><pre><span class="token shebang important">#!/usr/bin/env sh</span></pre></td></tr><tr><td data-num="2"></td><td><pre>hexo clean</pre></td></tr><tr><td data-num="3"></td><td><pre>hexo g</pre></td></tr><tr><td data-num="4"></td><td><pre>hexo d</pre></td></tr></table></figure><h4 id="hexo-publishbat"><a class="anchor" href="#hexo-publishbat">#</a> hexo-publish.bat</h4>
|
||||
<figure class="highlight bash"><figcaption data-lang="bash"></figcaption><table><tr><td data-num="1"></td><td><pre>@echo off</pre></td></tr><tr><td data-num="2"></td><td><pre><span class="token builtin class-name">cd</span> D:<span class="token punctuation">\</span>blog</pre></td></tr><tr><td data-num="3"></td><td><pre>d:</pre></td></tr><tr><td data-num="4"></td><td><pre>@cmd /c <span class="token string">"hexo clean&amp;&amp; hexo g&amp;&amp;hexo d&amp;&amp;echo success"</span></pre></td></tr></table></figure> ]]></description>
|
||||
</item>
|
||||
<item>
|
||||
<guid isPermalink="true">https://blog.jingxiyuan.cn/2022/09/13/hello-world/</guid>
|
||||
|
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user