Syntax Highlighting
Hexo has two built-in syntax highlight libraries, highlight.js and prismjs. This tutorial shows you how to integrate Hexo’s built-in syntax highlight into your template. How to use code block in postsHexo supports two ways to write code block: Tag Plugin - Code Block and Tag Plugin - Backtick Code Block: {% codeblock [title] [lang:language] [url] [link tex..
Read moreTemplates
Templates define the presentation of your website by describing what each page should look like. The table below shows the corresponding template for every available page. At the very least, a theme should contain an index template. Template Page Fallback index Home page post Posts index page Pages index archive Archives index category Cat..
Read moreThemes
It’s easy to build a Hexo theme - you just have to create a new folder. To start using your theme, modify the theme setting in your site’s _config.yml. A theme should have the following structure: . ├── _config.yml ├── languages ├── layout ├── scripts └── source _config.ymlTheme configuration file. Unlike the site’s primary configuration file, modifying..
Read moreTroubleshooting
In case you’re experiencing problems with using Hexo, here is a list of solutions to some frequently encountered issues. If this page doesn’t help you solve your problem, try doing a search on GitHub or our Google Group. YAML Parsing ErrorJS-YAML: incomplete explicit mapping pair; a key node is missed at line 18, column 29: last_updated: Last updated..
Read moreVariables
Global Variables Variable Description Type site Sitewide information. object; see Site Variables page Page specific information and custom variables set in front-matter. object; see Page Variables config Site configuration. object (your site’s _config file) theme Theme configuration. Inherits from site configuration. object (your theme’s _conf..
Read more