Hexo

fontawesome cdn修改
node_modules\hexo-component-inferno\lib\hexo\helper\cdn.js
把fontawesome cdn链接改为https://cdn.bootcdn.net/ajax/libs/font-awesome/6.0.0/css/all.css

图片居中
默认情况下在文章中插入图片,会发现图片的标题居中了,但是图片却是左对齐。
尝试在img的style属性中加入margin控制边距,发现无效。这是因为img元素属于内联元素,无法设置边距。
为了实现图片居中,在.article中继续添加:

1
2
3
4
5
6
.article {
.content a img {
margin: auto;
display: block;
}
}

文章启用目录,在md文件开头加入:

1
toc: true

调整文字大小
include/style/base.styl
article.styl


Mac提示App已损坏

  1. 启用任何来源
1
sudo spctl --master-disable

输入密码后显示

Globally disabling the assessment system needs to be confirmed in System Settings.

Markdown 语法

Markdown 是一种轻量级标记语言,因简洁、高效、易读、易写被大量使用,如 Github、Wikipedia、简书等。


Git命令

Git可以pull和push远程仓库
常用的Git命令

基础配置

1
2
git config --global user.name "你的名字或昵称"
git config --global user.email "你的邮箱"

VSCode预览md文件自动换行

VSCode编辑Markdown文件预览时不会自动换行。
在VSCode按下Ctrl+Shift+P,搜索Settings,打开用户设置,在括号内添加:

1
"markdown.preview.breaks":true

问题解决。


ssh登录与退出

ssh登录

1
ssh 用户名@IP地址

会要求输入远程主机的密码

ssh退出

1
exit