Hexo站点配置文件 # Site 站点配置 title: Hexo Blog #网站标题 subtitle: My blog for technical life #网站副标题 description: I don't know how to describe #网站描述 author: GuoXiaoyang #网站作者 language: zh-Hans #网站使用的语言 timezone: Asia/Shanghai #网站时区 # URL ## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/' url: http://your_ip_address #网址 root: / #网站根目录 permalink: :year/:month/:day/:title/ #永久链接格式 permalink_defaults: #永久链接中各部分的默认值 # Directory source_dir: source #资源文件夹,用来存放内容 public_dir: public #公共文件夹,用于存放生成的站点文件 tag_dir: tags #标签文件夹 archive_dir: archives #归档文件夹 category_dir: categories #分类文件夹 code_dir: downloads/code #Include code 文件夹 i18n_dir: :lang #国际化文件夹 skip_render: #跳过指定文件的渲染 # Writing new_post_name: :title.md # File name of new posts default_layout: draft #默认布局 titlecase: false # Transform title into titlecase external_link: true # Open external links in new tab filename_case: 0 #把文件名称转换为 (1) 小写或 (2) 大写 render_drafts: false #显示草稿 post_asset_folder: false #是否启动资源文件夹 relative_link: false #把链接改为与根目录的相对位址 future: true highlight: #代码块的设置 enable: true line_number: true auto_detect: false tab_replace: # Category & Tag default_category: uncategorized #默认分类 category_map: #分类别名 tag_map: #标签别名 # Date / Time format ## Hexo uses Moment.js to parse and display date ## You can customize the date format as defined in ## http://momentjs.com/docs/#/displaying/format/ date_format: YYYY-MM-DD time_format: HH:mm:ss # Pagination 分页 ## Set per_page to 0 to disable pagination per_page: 10 #每页显示的文章量 (0 = 关闭分页功能) pagination_dir: page #分页目录 # Extensions 扩展 ## Plugins: https://hexo.io/plugins/ 插件 ## Themes: https://hexo.io/themes/ 主题 theme: landscape #当前主题名称 # Deployment #部署到github ## Docs: https://hexo.io/docs/deployment.html deploy: type:
创建并编辑文章 hexo new first-post 在source/draft中生成first-post.md,vi first-post.md编辑模板:
1 2 3 4 5 6 7 8 9 10 11
title: First Post tags: - Test - Blog categories: - Hexo comments: true date: 2015-12-31 00:00:00 ---- ## Markdown goes here. **This is our first post!**
#!/usr/bin/env bash # Example of a deployment script # You should probably replace this with your very own! cd /home/gxy/hexo_static git pull echo "pull success" rm -rf /var/www/hexo/* cp -r * /var/www/hexo/ exit 0