笔记
命令
hexo new "postName" hexo new page "pageName" hexo generate hexo server hexo deploy hexo help hexo version
按文章更新时间排序
index_generator: path: '' per_page: 10 order_by: -updated
背景设置
把你挑选的背景图片命名为:background.jpg,放在blog\themes\next\source\images里,在blog\themes\next\source\css_custom文件的custom.styl首部添加
body { background :url (/images/background.jpg ); background-attachment : fixed; }
# Windows,有些文件需要文件名相同才能打开 # -d 目录符号链接 mklink /d C:\file\path \Target C:\file\path \Source
安装主题
npm安装在modules下
cd hexo-sitenpm install hexo-theme-next
git clone安装
cd hexo-sitegit clone https://github.com/next-theme/hexo-theme-next themes/next cd themes/nextgit pull origin master cp themes/next/_config.yml _config.next.yml
Hexo
我的配置
global: family: Source Serif Pro {{ next_font() }} {{ next_vendors('fontawesome') }} <link href="https://fonts.googleapis.com/css?family=Noto+Serif+SC&display=swap" rel="stylesheet"> $font-family-chinese = "Noto Serif SC" codes: family: IBM Plex Mono codeblock: theme: light: stackoverflow-light
Quick Start
npm install hexo-cli -g hexo init blogFolderName cd blognpm install hexo server
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 .
Create a new post
More info: Writing
Run server
More info: Server
Generate static files
More info: Generating
Deploy to remote sites
More info: Deployment