... # URL ## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/' -url: http://yoursite.com +url: https://blog.xxx.xx root: / -permalink: :year/:month/:day/:title/ +permalink: :year/:month/:day/:trans/ permalink_defaults: pretty_urls: trailing_index: true # Set to false to remove trailing 'index.html' from permalinks trailing_html: true # Set to false to remove trailing '.html' from permalinks ...
... footer: # Specify the date when the site was setup. If not defined, current year will be used. - #since: 2015 + since: 2020 ...
效果展示(从设定的起始年份到当前年份):
在页脚添加备案信息
编辑 NexT 的配置文件:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
... # Beian ICP and gongan information for Chinese users. See: http://www.beian.miit.gov.cn, http://www.beian.gov.cn beian: - enable: false + enable: true - icp: + icp: 京ICP备20031573号-2 # The digit in the num of gongan beian. gongan_id: # The full num of gongan beian. gongan_num: # The icon for gongan beian. See: http://www.beian.gov.cn/portal/download gongan_icon_url: ...
... # Usage: `Key: /link/ || icon` # Key is the name of menu item. If the translation for this item is available, the translated text will be loaded, otherwise the Key name will be used. Key is case-senstive. # Value before `||` delimiter is the target link, value after `||` delimiter is the name of Font Awesome icon. # When running the site in a subdirectory (e.g. yoursite.com/blog), remove the leading slash from link value (/archives -> archives). # External url should start with http:// or https:// menu: home: / || fa fa-home #about: /about/ || fa fa-user - #tags: /tags/ || fa fa-tags + tags: /tags/ || fa fa-tags - #categories: /categories/ || fa fa-th + categories: /categories/ || fa fa-th archives: /archives/ || fa fa-archive #schedule: /schedule/ || fa fa-calendar #sitemap: /sitemap.xml || fa fa-sitemap #commonweal: /404/ || fa fa-heartbeat ...
--- title: {{ title }} date: {{ date }} tags: +categories: ---
以后想写文章(执行hexo new post <自定义名>,编辑相应生成的<自定义名>.md)时,只需自定义 tags 和 categories 的值(注意键值之间有空格),该文章就会在标签页面和分类页面被标记和分类起来。
设置侧边栏总是显示(只适合风格 Muse 或 Mist)
编辑 NexT 的配置文件:
1 2 3 4 5 6 7 8 9
... # Sidebar Display (only for Muse | Mist), available values: # - post expand on posts automatically. Default. # - always expand for all pages automatically. # - hide expand only when click on the sidebar toggle icon. # - remove totally remove sidebar including sidebar toggle. - display: post + display: always ...
头像
编辑 NexT 的配置文件:
1 2 3 4 5 6 7 8 9 10 11 12 13
... # Sidebar Avatar avatar: # Replace the default image and set the url here. - url: #/images/avatar.gif + url: <自己图床的地址或者本地地址> # If true, the avatar will be dispalyed in circle. - rounded: false + rounded: true # If true, the avatar will be rotated with the cursor. - rotated: false + rotated: true ...
添加社交链接
编辑 NexT 的配置文件,个性化添加自己的社交链接:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
... # Usage: `Key: permalink || icon` # Key is the link label showing to end users. # Value before `||` delimiter is the target permalink, value after `||` delimiter is the name of Font Awesome icon. social: + blog: https://blog.imql.life/ || fas fa-blog + www: https://www.imql.life/ || fas fa-house-user + nav: https://nav.imql.life/ || fas fa-location-arrow + space: https://space.imql.life/ || fas fa-cube - #GitHub: https://github.com/yourname || fab fa-github + Github: https://github.com/ql-isaac || fab fa-github - #E-Mail: mailto:yourname@gmail.com || fa fa-envelope + E-Mail: mailto:834471527@qq.com || fa fa-envelope ...
... # Use icon instead of the symbol # to indicate the tag at the bottom of the post -tag_icon: false +tag_icon: true ...
效果展示:
集成在线编辑
编辑 NexT 的配置文件:
1 2 3 4 5 6 7 8
... # Post edit # Easily browse and edit blog source code online. post_edit: - enable: false - url: https://github.com/user-name/repo-name/tree/branch-name/subdirectory-name # Link for view source - #url: https://github.com/user-name/repo-name/edit/branch-name/subdirectory-name # Link for fork & edit ...
1 2 3 4 5 6 7
... # Post edit # Easily browse and edit blog source code online. post_edit: + enable: true + url: https://github.dev/<自己的GitHub用戶名>/# # Link for view & edit ...
设置文本对齐方式为左对齐
编辑 NexT 的配置文件:
1 2 3 4 5 6 7 8 9
... # Set the text alignment in posts / pages. text_align: # Available values: start | end | left | right | center | justify | justify-all | match-parent - desktop: justify + desktop: left - mobile: justify + mobile: left ...
代码块设置
编辑 NexT 的配置文件:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
... codeblock: # Code Highlight theme # All available themes: https://theme-next.js.org/highlight/ theme: light: default dark: stackoverflow-dark prism: light: prism dark: prism-dark # Add copy button on codeblock copy_button: - enable: false + enable: true # Available values: default | flat | mac style: ...
以上设置为个人偏好,请查看注释,通过本地部署的方式查看确定自己的偏好。
回到顶部按钮设置
编辑 NexT 的配置文件:
1 2 3 4 5 6 7 8 9
... back2top: enable: true # Back to top in sidebar. sidebar: false # Scroll percent label in b2t button. - scrollpercent: false + scrollpercent: true ...
... # `Follow me on GitHub` banner in the top-right corner. github_banner: - enable: false + enable: true - permalink: https://github.com/yourname + permalink: https://github.com/<自己的GitHub用戶名> title: Follow me on GitHub ...
字体
编辑 NexT 的配置文件:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
... font: - enable: false + enable: true ... # Global font settings used for all elements inside <body>. global: external: true - family: Lato + family: size: ... # Font settings for posts (.post-body). posts: external: true - family: + family: Noto Serif SC ...
优雅地查看图片
编辑 NexT 的配置文件:
1 2 3 4 5 6
... # FancyBox is a tool that offers a nice and elegant way to add zooming functionality for images. # For more information: https://fancyapps.com/fancybox -fancybox: false +fancybox: true ...
开启图片懒加载
编辑 NexT 的配置文件:
1 2 3 4 5 6
... # Vanilla JavaScript plugin for lazyloading images. # For more information: https://github.com/ApoorvSaxena/lozad.js -lazyload: false +lazyload: true ...
开启 busuanzi 统计
编辑 NexT 的配置文件:
1 2 3 4 5 6 7
... # Show Views / Visitors of the website / page with busuanzi. # Get more information on http://ibruce.info/2015/04/04/busuanzi busuanzi_count: - enable: false + enable: true ...