用 node.js 的 hexo 框架搭建一个支持 markdown 的静态博客系统

1,Hexo如何在线可视化写博客:   可以试试这款插件 hexo-admin.

2,马克飞象:   一个非常好的 markdown 编辑器。

3,Hexo博客文章设置密码的方法:

  • 首先,在Hexo中Markdown语言和html是混用的,因此可以直接在Markdown中直接插入script。
  • 这里用到了windows对象的alert()方法和prompt()方法。prompt()方法的作用即是显示一个可提示用户输入的对话框(即“请输入密码”),而其本身的返回值就是你输入的那个字符串(即代码行里面的12345678)。因此只需要将其与你默认的密码比较一下就好,如果不正确,则直接将当前页面的loaction属性设为上一个页面即可。
  • 这代码输入到文章内部即可

代码

<script>
    if("12345678"==prompt("请输入密码"))
    {
        alert("正确");
    }
    else
    {
        alert("错误");
        location="http://blog.laphets.com"; #返回网站,请自定义
    }
</script>

4,实现category:  https://github.com/hexojs/hexo-generator-category

一定要实现 category

5,实现 tag

6,实现文档全文搜索

7,能实现评论或回复更好:

8,一定要实现图片的插入功能:

 

 

hexo 的一些资源列表:

https://github.com/hexojs/hexo-renderer-marked

https://github.com/hexojs/hexo-util

https://github.com/hexojs/awesome-hexo

https://github.com/hexojs/hexo

https://hexo.io/docs/plugins.html

https://github.com/datocms/hexo-example

https://github.com/hexojs/hexo-generator-category

 

posted @ 2017-08-16 10:50  微信公众号--共鸣圈  阅读(427)  评论(0编辑  收藏  举报