zoukankan      html  css  js  c++  java
  • 从wordpress换hexo博客后

    之前用wordpress做blog, 为什么换为hexo呢?

    第一

    ​ wordpress的文章都保存在服务器的数据库, 维护不是很直观.

    ​ 而hexo是自己编写markdown文章,本地一份,而blog只是本地的映射.

    ​ 这样文章更好维护和查看.因为做笔记更重要的是自己也能查看.

    第二

    ​ hexo用的github pages服务, 服务器器是git, 自己剩下服务器不说,

    ​ 还能用到git的强大版本控制功能,真是一举多得.

    如果大家发下同步命令复杂,完全可以做个成脚本就像我这这个样,点击脚本就可

    把文章同步了. 真的很方便, 以下为同步步骤.

    hexo同步脚本

    1. 执行hexo_new.sh 生成new.md
    2. 编辑new.md为你要写的blog内容
    3. 把new.md放到你要的分类目录
    4. 执行update.sh同步blog.
    5. 呵呵,完成了

    hexo_new.md

    1
    2
    3
    4
    5
    !/bin/bash
    set -x
    export PATH="/usr/local/bin:/usr/bin:/bin:/opt/bin:/c/Windows/System32:/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0/:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/opt/toolchain/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf/bin:/opt/FriendlyARM/toolschain/4.4.3/bin 大专栏  从wordpress换hexo博客后:/c/Users/jimmy/AppData/Roaming/npm:/c/Program Files/nodejs"
    cd /e/hexo/
    hexo new "new"

    update.sh

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    !/bin/bash
    set -x
    export PATH="/usr/local/bin:/usr/bin:/bin:/opt/bin:/c/Windows/System32:/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0/:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/opt/toolchain/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf/bin:/opt/FriendlyARM/toolschain/4.4.3/bin:/c/Users/jimmy/AppData/Roaming/npm:/c/Program Files/nodejs"
    cd /e/demonelf.github.io/
    git pull
    cd /e/hexo/
    hexo g
    rsync -Pv --size-only /e/hexo/public/* /e/demonelf.github.io/ -ar
    rsync -Pv --size-only /e/hexo/source/_posts/* /e/demonelf.github.io/ -ar
    cd /e/demonelf.github.io/
    git add -A
    git commit -m "1.自动更新"
    git push
  • 相关阅读:
    前端常用js库地址
    react简介
    es6 decorator
    es6 之 class
    es6之对象扩展
    vs code 默认浏览器
    不同环境查看是否可访问外网、访问网址、ip地址、外网ip地址
    httprunner2简单了解,httprunner可实现的功能,jmeter均可实现,所以,未深入学习
    结构化问答
    《大数的认识》
  • 原文地址:https://www.cnblogs.com/lijianming180/p/12251369.html
Copyright © 2011-2022 走看看