title: hexo站点文件详解
    author: HaoQi
    top: false
    cover: false
    toc: false
    mathjax: false
    reprintPolicy: cc_by
    tags:

    • hexo

    date: 2022-04-08 01:16:50
    coverlmg:
    img:
    keywords: hexo
    summary: hexo站点文件config详解
    password:
    categories: 博客篇


    hexo站点配置文件config详解

    1. # Site 站点配置
    2. title: #网站标题
    3. subtitle: #网站副标题
    4. description: #网站描述
    5. author: #作者名字
    6. language: zh-CN #网站使用的语言
    7. timezone: Asia/Shanghai #网站时区
    8. # URL #可以不用配置
    9. ## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/'
    10. url: #网址,搜索时会在搜索引擎中显示
    11. root: / #网站根目录,不用填写
    12. permalink: :year/:month/:day/:title/ #永久链接格式
    13. permalink_defaults: #永久链接中各部分的默认值
    14. # Directory 目录配置
    15. source_dir: source #资源文件夹,这个文件夹用来存放内容,文章也在
    16. public_dir: public #公共文件夹,这个文件夹用于存放生成的站点文件
    17. tag_dir: tags #标签文件夹
    18. archive_dir: archives #归档文件夹
    19. category_dir: categories #分类文件夹
    20. code_dir: downloads/code #Include code 文件夹
    21. i18n_dir: :lang #国际化文件夹
    22. skip_render: #跳过指定文件的渲染
    23. # Writing 写作配置
    24. new_post_name: :title.md # 新文章的文件名称
    25. default_layout: post #默认布局
    26. titlecase: false # Transform title into titlecase
    27. external_link: true # Open external links in new tab
    28. filename_case: 0 #把文件名称转换为 (1) 小写或 (2) 大写
    29. render_drafts: false #显示草稿
    30. post_asset_folder: false #是否启动资源文件夹
    31. relative_link: false #把链接改为与根目录的相对位址
    32. future: true
    33. highlight: #代码块的设置
    34. enable: true
    35. line_number: true
    36. auto_detect: true
    37. tab_replace:
    38. # Category & Tag 分类 & 标签
    39. default_category: uncategorized #默认分类
    40. category_map: #分类别名
    41. tag_map: #标签别名
    42. # Date / Time format 时间和日期
    43. ## Hexo uses Moment.js to parse and display date
    44. ## You can customize the date format as defined in
    45. ## http://momentjs.com/docs/#/displaying/format/
    46. date_format: YYYY-MM-DD
    47. time_format: HH:mm:ss
    48. # Pagination 分页
    49. ## Set per_page to 0 to disable pagination
    50. per_page: 10 #每页显示的文章量 (0 = 关闭分页功能)
    51. pagination_dir: page #分页目录
    52. # Extensions 扩展
    53. ## Plugins: http://hexo.io/plugins/ 插件
    54. ## Themes: http://hexo.io/themes/ 主题
    55. theme: matery #当前主题名称
    56. # Deployment #部署到github
    57. ## Docs: http://hexo.io/docs/deployment.html
    58. deploy:
    59. type: