V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
爱意满满的作品展示区。
gowithwind
V2EX  ›  分享创造

我的又小又丑的博客程序,基于 github pages,只支持 markdown。不善美工,只能以极简示人,欢迎拍砖。

  •  
  •   gowithwind · 2014-10-08 16:00:46 +08:00 · 5781 次点击
    这是一个创建于 3488 天前的主题,其中的信息可能已经有所发展或是发生改变。
    博客搬了很多家,累了,也不想自己专门搞空间,搭个博客,之前考虑过Jekyll,但是太依赖本地了,不是很爽,自己折腾了下三十来行代码,感觉以后就github呆下去了。

    代码地址 <https://github.com/gowithwind/butterfly.log>;
    示例博客 <http://gowithwind.github.io/blog/>;
    第 1 条附言  ·  2014-10-08 16:31:51 +08:00
    不好意思,选错格式了。
    代码地址 https://github.com/gowithwind/butterfly.log
    示例博客 http://gowithwind.github.io/blog/
    30 条回复    2014-10-11 08:53:57 +08:00
    M31415927
        1
    M31415927  
       2014-10-08 16:03:29 +08:00   ❤️ 1
    404
    TrustyWolf
        2
    TrustyWolf  
       2014-10-08 16:04:04 +08:00
    404
    happywowwow
        3
    happywowwow  
       2014-10-08 16:05:05 +08:00   ❤️ 1
    both 404
    gowithwind
        4
    gowithwind  
    OP
       2014-10-08 16:05:40 +08:00   ❤️ 1
    不好意思,选错格式了。
    代码地址 https://github.com/gowithwind/butterfly.log
    示例博客 http://gowithwind.github.io/blog/
    sarices
        5
    sarices  
       2014-10-08 16:18:17 +08:00
    ajax方式实现seo比较麻烦,可以用nodejs或者php做个前端放在服务器上面
    juicy
        6
    juicy  
       2014-10-08 16:21:13 +08:00
    我就爱把博客搭在github上,就喜欢用markdown,多便捷啊~很多时候随便花个几分钟就写篇博客,算作自己的一种简短的记录和感悟,那种长篇大论的真的让人很累,不容易坚持下去~
    gowithwind
        7
    gowithwind  
    OP
       2014-10-08 16:21:59 +08:00
    @sarices 是有这个问题,依赖后端的话就不够简单了。不过可以让搜素引擎索引markdown文件。
    gowithwind
        8
    gowithwind  
    OP
       2014-10-08 16:25:44 +08:00
    @juicy 是这样的,搬家很糟心,备份也糟心。
    WKPlus
        9
    WKPlus  
       2014-10-08 16:44:02 +08:00
    看起来蛮清晰的,代码能高亮显示么?
    之前也折腾过博客搬家,写了个脚本专门用来搬家,还蛮方便的https://github.com/WKPlus/vps
    gowithwind
        10
    gowithwind  
    OP
       2014-10-08 16:56:24 +08:00
    @WKPlus 目前应该不能高亮显示,需要相应的css支持,markdown也需要转换代码
    gongyiyi
        11
    gongyiyi  
       2014-10-08 18:16:02 +08:00
    确实不好看,还不如 搞个tumblr绑定个域名凑合下!
    wsph123
        12
    wsph123  
       2014-10-08 18:39:25 +08:00 via iPhone
    就喜欢这样的!!
    loading
        13
    loading  
       2014-10-08 18:49:35 +08:00
    还是喜欢jekyll,一次部署,到处提交。
    gowithwind
        14
    gowithwind  
    OP
       2014-10-08 18:56:49 +08:00 via Android
    @loading 这个其实也可以到处提交。本质上还是github pages。
    gowithwind
        15
    gowithwind  
    OP
       2014-10-08 18:57:46 +08:00 via Android
    @gongyiyi 需要漂亮,可以自己移植主题,应该不难的
    timothyye
        16
    timothyye  
       2014-10-08 18:58:33 +08:00 via Android
    page not found
    gowithwind
        17
    gowithwind  
    OP
       2014-10-08 18:59:58 +08:00 via Android
    @timothyye 用附言里的地址
    loading
        18
    loading  
       2014-10-08 19:20:17 +08:00
    jekyll是github page原生支持的,我只需要添加文章就可以了,你这个还要修改 index.md
    其实你种形式的已经有人写了。

    你这个是js驱动的,建议url使用 /#!/ 格式,便于google识别。
    loading
        19
    loading  
       2014-10-08 19:21:58 +08:00
    tumutanzi
        20
    tumutanzi  
       2014-10-08 19:37:49 +08:00
    这年头都喜欢鼓捣鼓捣静态博客。
    s51431980
        21
    s51431980  
       2014-10-08 19:45:23 +08:00
    @loading

    即使是/#!/ 不做server端支持的话,google还是识别不了

    类似的东西我也搞过,并且用了一段时间,后来从搜索引擎、RSS等方面考虑还是转移到了Jekyll
    gowithwind
        22
    gowithwind  
    OP
       2014-10-08 20:02:42 +08:00
    @s51431980 的确是对于搜索不友好,不过google应该能索引到代码目录中md文件的内容。
    gowithwind
        23
    gowithwind  
    OP
       2014-10-08 20:07:17 +08:00
    @loading 的确Sneezry的实现更完整。我这个追求的是简单,可靠,高度可定制性,也算达到了目的。采用自己写index.md的方式,主要还是首页经常需要自定义些链接,内容。
    Owenjia
        24
    Owenjia  
       2014-10-08 22:25:36 +08:00
    我这里显示似乎不正常,左边被挡住了。
    http://susepaste.org/47137569
    xcv58
        25
    xcv58  
       2014-10-08 23:46:33 +08:00
    感觉没必要重复制造轮子。
    gowithwind
        26
    gowithwind  
    OP
       2014-10-09 15:08:54 +08:00
    @Owenjia 是什么浏览器呀?
    Owenjia
        27
    Owenjia  
       2014-10-09 15:47:40 +08:00
    @gowithwind 用的 Firefox,不过看了下好像在 Chrome 里左边那个也会挡到
    Firefox:Mozilla/5.0 (X11; Linux x86_64; rv:32.0) Gecko/20100101 Firefox/32.0
    Chrome:Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.13 Safari/537.36
    gowithwind
        28
    gowithwind  
    OP
       2014-10-09 16:12:36 +08:00
    @Owenjia 你截图上面的css好像都是基础的css,可能引用的一个bootstrap 的css文件没有获取到。
    Owenjia
        29
    Owenjia  
       2014-10-09 16:23:54 +08:00
    @gowithwind 恩,可能是我这里网络的问题~
    aping
        30
    aping  
       2014-10-11 08:53:57 +08:00
    谢谢楼主分享,学习了
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5213 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 35ms · UTC 09:29 · PVG 17:29 · LAX 02:29 · JFK 05:29
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.