0%

GitHub搭建博客 hexo+NexT

Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.

Quick Start

使用git连接github

常用命令
1
2
3
4
5
6
7
8
9
10
11
$ ssh-keygen -t rsa -C "123@163.com" //163 是你自己注册GitHub的邮箱 生成自己key码添加到github的设置中 id_ras id_ras.pub
$ ssh -T git@github.com
$ git config --global user.name "name"//你的GitHub登陆名
$ git config --global user.email "123@126.com"//你的GitHub注册邮箱
$ git remote add origin git@github.com:flora0103/example.git //关联一个远程库命令, git@github.com:flora0103/example.git 这个是自己远程库
$ git push -u origin master //关联后,第一次推送master分支的所有内容命令,此后,每次本地提交后,就可以使用命令git push origin master推送最新修改
$ git init
$ git add .
$ git commit -m "操作"
$ git push origin master
$ git push origin master -f

使用hexo

文件设置以及常用命令
文件修改
1
2
3
4
5
6
7
8
9
10
/root/_config.yml
# 更换hexo主题
theme: next
# 连接hexo到github 使用hexo命令代替git命令上传github
theme: next
deploy:
type: git
repository: git@github.com:liuxianan/liuxianan.github.io.git
branch: master
# 更换字体修改_config.yml中的language: zh-CN themes\next\languages

使用来控制hexo NexT主页文章预览

Hexo使用攻略-添加新文章分类及标签

1
2
3
4
# 创建文章tags,categories
$ hexo new title
$ hexo new page categories
$ hexo new md_name

Next官方教程

Error: Spawn failed

rm -rf .deploy_git
git config –global core.autocrlf false
hexo clean && hexo g && hexo d

常用命令
1
2
3
4
5
$ hexo init
$ hexo clean
$ hexo generate 或者 hexo g
$ hexo server 或者 hexo s
$ hexo deploy 或者 hexo d

hexo博客加密

文章参考hexo-blog-encrypt

markdown使用笔记

markdown+OmniMarkupPreviewer+LiveReload

安装过程:
  • Markdown Editing
    1
    2
    3
    4
    5
    6
    7
    8
    9
    {
    "color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme",
    // "color_scheme": "Packages/MarkdownEditing/MarkdownEditor-Dark.tmTheme",
    // Layout
    "draw_centered": false,
    "word_wrap": true,
    "wrap_width": 120,
    "rulers": [],
    }
  • OmniMarkupPreviwer

Preferences → Package Settings → OmniMarkupPreviewer →Setting——User

1
2
3
4
5
6
7
8
{
"renderer_options-MarkdownRenderer":
{
"extensions": ["tables", "fenced_code", "codehilite"],
"parser": "markdown",
"enabled_parsers": ["markdown"]
}
}

Preferences → Package Settings → OmniMarkupPreviewer → Setting——Default

1
2
3
4
5
6
[
{
"keys": ["ctrl+r"], "command": "omni_markup_preview",
"context": [{"key": "omnimarkup_is_enabled", "operator": "equal", "operand": ""}]
}
]
  • LiveReload

python自动补全功能

sublimecodeIntel

python jupyter

pc /usr/bin/python3.6 -m pip install pyzmqc

helium
hermes

jupyter notebook中运行获取jupyter连接信息

1
%connect_info

在 Sublime 中打开 Shift+Ctrl+P,然后输入 Helium 进行安装
jupyterlab

在 Jupyter 里面执行 magic 方法

%connect_info
{
“shell_port”: 51835,
“iopub_port”: 43591,
“stdin_port”: 37817,
“control_port”: 39041,
“hb_port”: 50915,
“ip”: “127.0.0.1”,
“key”: “f4739d3c-a1e6462527617877ebf90e25”,
“transport”: “tcp”,
“signature_scheme”: “hmac-sha256”,
“kernel_name”: “”
}
Paste the above JSON into a file, and connect with:
$> jupyter –existing
or, if you are local, you can connect with just:
$> jupyter –existing kernel-7826a41d-5ed1-4014-b421-a9205a712668.json
or even just:
$> jupyter –existing
if this is the most recent Jupyter kernel you have started.

主题配置

参考文献

坚持原创技术分享,您的支持将鼓励我继续创作!