|
| 1 | +--- |
| 2 | +layout: post |
| 3 | +title: 如何使用LessOrMore这个Jekyll模版 |
| 4 | +date: 2016-08-27 01:08:00 +0800 |
| 5 | +categories: document |
| 6 | +tag: 教程 |
| 7 | +--- |
| 8 | + |
| 9 | +* content |
| 10 | +{:toc} |
| 11 | + |
| 12 | + |
| 13 | +致谢 |
| 14 | +==================================== |
| 15 | ++ 感谢[Less官网]()的样式,本Jekyll框架的样式都是基于Less官网的样式直接拷贝过来的。只是重构了JS,并且加入了Jekyll语法而已。 |
| 16 | ++ 感谢[Github](https://github.com/)提供的代码维护和发布平台 |
| 17 | ++ 感谢[Jekyll](https://jekyllrb.com/)团队做出如此优秀的产品 |
| 18 | ++ 感谢[Solar](https://github.com/mattvh/solar-theme-jekyll)的原作者[Matt Harzewski](http://www.webmaster-source.com/),在`2014.11`-`2016.09`的两年间,我的博客选用了此样式模版 |
| 19 | + |
| 20 | + |
| 21 | +使用 |
| 22 | +==================================== |
| 23 | + |
| 24 | +下载 |
| 25 | +------------------------------------ |
| 26 | + |
| 27 | +使用git从[LessOrMore](https://github.com/luoyan35714/LessOrMore.git)主页下载项目 |
| 28 | + |
| 29 | +{% highlight bash %} |
| 30 | +git clone https://github.com/luoyan35714/LessOrMore.git |
| 31 | +{% endhighlight %} |
| 32 | + |
| 33 | +配置 |
| 34 | +------------------------------------ |
| 35 | + |
| 36 | +`LessOrMore`项目需要配置的只有一个文件`_config.xml`,打开之后按照如下进行配置。 |
| 37 | + |
| 38 | +{% highlight bash %} |
| 39 | +name: 博客名称 |
| 40 | +email: 邮箱地址 |
| 41 | +author: 作者名 |
| 42 | +url: 个人网站 |
| 43 | +resume_site: 个人简历网站 |
| 44 | +github: github地址 |
| 45 | +github_username: github用户名称 |
| 46 | +FB: |
| 47 | + comments : |
| 48 | + provider : duoshuo |
| 49 | + duoshuo: |
| 50 | + short_name : 多说账户 |
| 51 | + disqus : |
| 52 | + short_name : Disqus账户 |
| 53 | +{% endhighlight %} |
| 54 | + |
| 55 | +如何写文章 |
| 56 | +------------------------------------ |
| 57 | + |
| 58 | +在`LessOrMore/_posts`目录下新建一个文件,可以创建文件夹并在文件夹中添加文件,方便维护。在新建文件中粘贴如下信息,并修改以下的`titile`,`date`,`categories`,`tag`的相关信息,添加`* content {:toc}`为目录相关信息,在进行正文书写前需要在目录和正文之间输入至少2行空行。然后按照正常的Markdown语法书写正文。 |
| 59 | + |
| 60 | +{% highlight bash %} |
| 61 | +--- |
| 62 | +layout: post |
| 63 | +#标题配置 |
| 64 | +title: 标题 |
| 65 | +#时间配置 |
| 66 | +date: 2016-08-27 01:08:00 +0800 |
| 67 | +#大类配置 |
| 68 | +categories: document |
| 69 | +#小类配置 |
| 70 | +tag: 教程 |
| 71 | +--- |
| 72 | + |
| 73 | +* content |
| 74 | +{:toc} |
| 75 | + |
| 76 | + |
| 77 | +我是正文。我是正文。我是正文。我是正文。我是正文。我是正文。 |
| 78 | +{% endhighlight %} |
| 79 | + |
| 80 | +执行 |
| 81 | +------------------------------------ |
| 82 | + |
| 83 | +{% highlight bash %} |
| 84 | +jekyll server |
| 85 | +{% endhighlight %} |
| 86 | + |
| 87 | +效果 |
| 88 | +------------------------------------ |
| 89 | +打开浏览器并输入URL`http://localhost:4000/`,回车。 |
| 90 | + |
| 91 | + |
| 92 | +为什么重复造轮子 |
| 93 | +==================================== |
| 94 | + |
| 95 | +很明显,我在重复造轮子。在13年接触到GIT,14年末接触到Jekyll,然后搭建了自己的博客,当时是选用了[JekyllThemes](http://jekyllthemes.org/)上的[Solar](https://github.com/mattvh/solar-theme-jekyll)主题,一直到现在。不过中间一直感觉页面风格还是偏暗,阅读不方便。并且有一些小的细节做的不是很好。在页面的跨平台浏览上有一些瑕疵。并且不区分一级标题和二级标题,导致没有重点强调。诸如此类,用了2年,用的越多,越发吃力,中间就一直在寻找新的能够让我一眼认定的主题。 |
| 96 | + |
| 97 | +虽然设计好看的主题很多。但是真正适合拿来做博客的却不多。中间一直没有找到合适的主题。直到有一天看到Less官网的主题之后,豁然觉得这就是我的博客想要的样子。简单而又不平凡。所以就决定了要把博客迁移到这个主题,然后拿了两天晚上来把这个主题做出来。 |
| 98 | + |
| 99 | +重复造了轮子,但是这个是迄今为止自己觉得最适合我的博客的轮子,所以是值得的! |
| 100 | + |
| 101 | +关于作者 |
| 102 | +==================================== |
| 103 | + |
| 104 | +只是个抱着开源心态,爱折腾的Java程序猿。更多个人信息和联系方式可以参照[我的简介](http://www.hifreud.com/Resume.io/)。 |
| 105 | + |
| 106 | +关于打赏 |
| 107 | +==================================== |
| 108 | + |
| 109 | +如果你也像我一样在寻觅一个简洁的博客主题。不妨试下LessOrMore。 |
| 110 | + |
| 111 | +当然你也可以为了我的工作打赏!以激励我做出更好的东西。 |
| 112 | + |
| 113 | +支付宝 |
| 114 | +---------------- |
| 115 | + |
| 116 | +<img src="/styles/images/zhifubao.PNG" alt="支付宝二维码付款给Freud" width="310" /> |
| 117 | + |
| 118 | +微信 |
| 119 | +---------------- |
| 120 | + |
0 commit comments