blog/atom.xml

88 lines
8.6 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<id>https://blog.jingxiyuan.cn</id>
<title>Hito的公告栏</title>
<subtitle>天下事有难易乎?为之,则难者亦易矣</subtitle>
<icon>https://blog.jingxiyuan.cn/images/favicon.ico</icon>
<link href="https://blog.jingxiyuan.cn" />
<author>
<name>Hito li</name>
</author>
<updated>2022-09-14T04:23:55.000Z</updated>
<category term="hito" />
<category term="無言" />
<category term="博客" />
<category term="公告栏" />
<entry>
<id>https://blog.jingxiyuan.cn/2022/09/14/Hexo%E5%AE%89%E8%A3%85%E6%91%B8%E7%B4%A2/</id>
<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">&lt;h1 id=&#34;hexo博客安装&#34;&gt;&lt;a class=&#34;anchor&#34; href=&#34;#hexo博客安装&#34;&gt;#&lt;/a&gt; hexo 博客安装&lt;/h1&gt;
&lt;p&gt;&lt;a href=&#34;&#34;&gt;安装 nodejs&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;&#34;&gt;安装 git&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;安装 hexowindows 需进入 git bash&lt;/p&gt;
&lt;p&gt;&lt;code&gt;npm install -g hexo-cli&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;初始化博客目录&lt;/p&gt;
&lt;p&gt;&lt;code&gt;hexo init blog&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;进入博客目录&lt;/p&gt;
&lt;p&gt;&lt;code&gt;cd blog&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;初始化 hexo 到博客目录&lt;/p&gt;
&lt;p&gt;&lt;code&gt;npm install&lt;/code&gt;&lt;/p&gt;
&lt;h1 id=&#34;shoka主题安装&#34;&gt;&lt;a class=&#34;anchor&#34; href=&#34;#shoka主题安装&#34;&gt;#&lt;/a&gt; shoka 主题安装&lt;/h1&gt;
&lt;p&gt;下载主题 &lt;/p&gt;
&lt;p&gt;&lt;code&gt;git clone &lt;/code&gt; &lt;a href=&#34;https://github.com/amehime/hexo-theme-shoka.git&#34;&gt; &lt;code&gt;https://github.com/amehime/hexo-theme-shoka.git&lt;/code&gt; &lt;/a&gt; &lt;code&gt; ./themes/shoka&lt;/code&gt; &lt;/p&gt;
&lt;p&gt;卸载 hexo-renderer-marked 以及别的 markdown 文件渲染器 &lt;/p&gt;
&lt;p&gt;&lt;code&gt;npm un hexo-renderer-marked --save&lt;/code&gt; &lt;/p&gt;
&lt;p&gt;安装md 文件渲染器,压缩 css/js/html&lt;/p&gt;
&lt;p&gt;&lt;code&gt;npm i hexo-renderer-multi-markdown-it --save&lt;/code&gt; &lt;/p&gt;
&lt;p&gt;安装(给生成的 css 文件们添加浏览器前缀) &lt;/p&gt;
&lt;p&gt;&lt;code&gt;npm i hexo-autoprefixer --save&lt;/code&gt; &lt;/p&gt;
&lt;p&gt;安装(站内搜索功能) &lt;/p&gt;
&lt;p&gt;&lt;code&gt;npm i hexo-algoliasearch --save&lt;/code&gt; &lt;/p&gt;
&lt;p&gt;安装(文章或站点字数及阅读时间统计) &lt;/p&gt;
&lt;p&gt;&lt;code&gt;npm i hexo-symbols-count-time --save&lt;/code&gt; &lt;/p&gt;
&lt;p&gt;安装(生成 Feed 文件) &lt;/p&gt;
&lt;p&gt;&lt;code&gt;npm i hexo-feed --save&lt;/code&gt;&lt;/p&gt;
&lt;h1 id=&#34;hexo部分常用命令&#34;&gt;&lt;a class=&#34;anchor&#34; href=&#34;#hexo部分常用命令&#34;&gt;#&lt;/a&gt; Hexo 部分常用命令&lt;/h1&gt;
&lt;p&gt;清除静态文件&lt;/p&gt;
&lt;p&gt;&lt;code&gt;hexo clean&lt;/code&gt; &lt;/p&gt;
&lt;p&gt;生成静态文件 &lt;/p&gt;
&lt;p&gt;&lt;code&gt;hexo g&lt;/code&gt; &lt;/p&gt;
&lt;p&gt;安装 git 推送插件 &lt;/p&gt;
&lt;p&gt;&lt;code&gt;npm install hexo-deployer-git --save&lt;/code&gt; &lt;/p&gt;
&lt;p&gt;推送静态文件到 git &lt;/p&gt;
&lt;p&gt;&lt;code&gt;hexo d&lt;/code&gt;&lt;/p&gt;
&lt;h1 id=&#34;安装hexo-admin编写博客插件&#34;&gt;&lt;a class=&#34;anchor&#34; href=&#34;#安装hexo-admin编写博客插件&#34;&gt;#&lt;/a&gt; 安装 hexo-admin编写博客插件&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;npm install hexo-admin --save&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;hexo-admin 编辑 url&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;http://localhost:4000/admin&#34;&gt; &lt;code&gt;http://localhost:4000/admin&lt;/code&gt; &lt;/a&gt;&lt;/p&gt;
&lt;p&gt;settings 设置用户名、密码、Secret&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;http://localhost:4000/admin/#/settings&#34;&gt; &lt;code&gt;http://localhost:4000/admin/#/settings&lt;/code&gt; &lt;/a&gt; &lt;/p&gt;
&lt;p&gt;把底部生成的配置拷入 hexo 配合文件中 (_config.yml)&lt;br /&gt;
&lt;code&gt;admin: username: username password_hash: ````10$L.XAIqIWgTc5S1zpvV3MEu7/rH34p4Is/nq824smv8EZ3lIPCp1su secret: &#39;my super secret phrase&#39; #用单引号包裹 deployCommand: &#39;hexo-publish.sh&#39; #windows用hexo-publish.batlinux用hexo-publish.sh&lt;/code&gt;&lt;/p&gt;
&lt;h2 id=&#34;hexo-publishsh&#34;&gt;&lt;a class=&#34;anchor&#34; href=&#34;#hexo-publishsh&#34;&gt;#&lt;/a&gt; &lt;span class=&#34;exturl&#34; data-url=&#34;aHR0cDovL2hleG8tcHVibGlzaC5zaA==&#34;&gt;hexo-publish.sh&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;#!/usr/bin/env sh hexo clean hexo g hexo d&lt;/code&gt;&lt;/p&gt;
&lt;h2 id=&#34;hexo-publishbat&#34;&gt;&lt;a class=&#34;anchor&#34; href=&#34;#hexo-publishbat&#34;&gt;#&lt;/a&gt; hexo-publish.bat&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;@echo off cd D:\blog d: @cmd /c &amp;quot;hexo clean&amp;amp;&amp;amp; hexo g&amp;amp;&amp;amp;hexo d&amp;amp;&amp;amp;echo success&amp;quot;&lt;/code&gt;&lt;/p&gt;
</content>
<updated>2022-09-14T04:23:55.000Z</updated>
</entry>
<entry>
<id>https://blog.jingxiyuan.cn/2022/09/13/hello-world/</id>
<title>Hello World</title>
<link rel="alternate" href="https://blog.jingxiyuan.cn/2022/09/13/hello-world/"/>
<content type="html">&lt;p&gt;Welcome to &lt;span class=&#34;exturl&#34; data-url=&#34;aHR0cHM6Ly9oZXhvLmlvLw==&#34;&gt;Hexo&lt;/span&gt;! This is your very first post. Check &lt;span class=&#34;exturl&#34; data-url=&#34;aHR0cHM6Ly9oZXhvLmlvL2RvY3Mv&#34;&gt;documentation&lt;/span&gt; for more info. If you get any problems when using Hexo, you can find the answer in &lt;span class=&#34;exturl&#34; data-url=&#34;aHR0cHM6Ly9oZXhvLmlvL2RvY3MvdHJvdWJsZXNob290aW5nLmh0bWw=&#34;&gt;troubleshooting&lt;/span&gt; or you can ask me on &lt;span class=&#34;exturl&#34; data-url=&#34;aHR0cHM6Ly9naXRodWIuY29tL2hleG9qcy9oZXhvL2lzc3Vlcw==&#34;&gt;GitHub&lt;/span&gt;.&lt;/p&gt;
&lt;h2 id=&#34;quick-start&#34;&gt;&lt;a class=&#34;anchor&#34; href=&#34;#quick-start&#34;&gt;#&lt;/a&gt; Quick Start&lt;/h2&gt;
&lt;h3 id=&#34;create-a-new-post&#34;&gt;&lt;a class=&#34;anchor&#34; href=&#34;#create-a-new-post&#34;&gt;#&lt;/a&gt; Create a new post&lt;/h3&gt;
&lt;figure class=&#34;highlight bash&#34;&gt;&lt;figcaption data-lang=&#34;bash&#34;&gt;&lt;span&gt;h&lt;/span&gt;&lt;/figcaption&gt;&lt;table&gt;&lt;tr&gt;&lt;td data-num=&#34;1&#34;&gt;&lt;/td&gt;&lt;td&gt;&lt;pre&gt;$ hexo new &lt;span class=&#34;token string&#34;&gt;&#34;My New Post&#34;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/figure&gt;&lt;p&gt;More info: &lt;span class=&#34;exturl&#34; data-url=&#34;aHR0cHM6Ly9oZXhvLmlvL2RvY3Mvd3JpdGluZy5odG1s&#34;&gt;Writing&lt;/span&gt;&lt;/p&gt;
&lt;h3 id=&#34;run-server&#34;&gt;&lt;a class=&#34;anchor&#34; href=&#34;#run-server&#34;&gt;#&lt;/a&gt; Run server&lt;/h3&gt;
&lt;figure class=&#34;highlight bash&#34;&gt;&lt;figcaption data-lang=&#34;bash&#34;&gt;&lt;span&gt;h&lt;/span&gt;&lt;/figcaption&gt;&lt;table&gt;&lt;tr&gt;&lt;td data-num=&#34;1&#34;&gt;&lt;/td&gt;&lt;td&gt;&lt;pre&gt;$ hexo server&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/figure&gt;&lt;p&gt;More info: &lt;span class=&#34;exturl&#34; data-url=&#34;aHR0cHM6Ly9oZXhvLmlvL2RvY3Mvc2VydmVyLmh0bWw=&#34;&gt;Server&lt;/span&gt;&lt;/p&gt;
&lt;h3 id=&#34;generate-static-files&#34;&gt;&lt;a class=&#34;anchor&#34; href=&#34;#generate-static-files&#34;&gt;#&lt;/a&gt; Generate static files&lt;/h3&gt;
&lt;figure class=&#34;highlight bash&#34;&gt;&lt;figcaption data-lang=&#34;bash&#34;&gt;&lt;span&gt;h&lt;/span&gt;&lt;/figcaption&gt;&lt;table&gt;&lt;tr&gt;&lt;td data-num=&#34;1&#34;&gt;&lt;/td&gt;&lt;td&gt;&lt;pre&gt;$ hexo generate&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/figure&gt;&lt;p&gt;More info: &lt;span class=&#34;exturl&#34; data-url=&#34;aHR0cHM6Ly9oZXhvLmlvL2RvY3MvZ2VuZXJhdGluZy5odG1s&#34;&gt;Generating&lt;/span&gt;&lt;/p&gt;
&lt;h3 id=&#34;deploy-to-remote-sites&#34;&gt;&lt;a class=&#34;anchor&#34; href=&#34;#deploy-to-remote-sites&#34;&gt;#&lt;/a&gt; Deploy to remote sites&lt;/h3&gt;
&lt;figure class=&#34;highlight bash&#34;&gt;&lt;figcaption data-lang=&#34;bash&#34;&gt;&lt;span&gt;h&lt;/span&gt;&lt;/figcaption&gt;&lt;table&gt;&lt;tr&gt;&lt;td data-num=&#34;1&#34;&gt;&lt;/td&gt;&lt;td&gt;&lt;pre&gt;$ hexo deploy&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/figure&gt;&lt;p&gt;More info: &lt;span class=&#34;exturl&#34; data-url=&#34;aHR0cHM6Ly9oZXhvLmlvL2RvY3Mvb25lLWNvbW1hbmQtZGVwbG95bWVudC5odG1s&#34;&gt;Deployment&lt;/span&gt;&lt;/p&gt;
</content>
<updated>2022-09-13T00:03:19.511Z</updated>
</entry>
</feed>