Skip to content

Hexo content types

Hexo provides a default template mechanism to generate different types of content within the blog structure. The scaffolds directory contains the templates used to initialize new files based on specific layouts.^[600-developer-blog-hexo-blog-hexo-command.md]

Content Layouts

The content generated can be categorized into different layouts, primarily posts and drafts, as well as standalone pages.

  • Post: A standard blog post or article^[600-developer-blog-hexo-blog-hexo-command.md]. Creating a post is done using hexo new post "title", which is functionally equivalent to the general hexo new "title" command^[600-developer-blog-hexo-blog-hexo-command.md].
  • Draft: Represents unfinished work^[600-developer-blog-hexo-blog-hexo-command.md]. Drafts are created using hexo new drafts "title" and can be moved to the published posts section using hexo publish "title"^[600-developer-blog-hexo-blog-hexo-command.md].
  • Page: Creates a new independent page (directory) within the site structure^[600-developer-blog-hexo-blog-hexo-command.md].

Technical Structure

The layouts and page rendering are managed by theme files located in the layout directory of the theme (e.g., layout.ejs, index.ejs)^[600-developer-blog-hexo-blog-hexo-command.md]. While standard posts generate at the root URL with a title-based slug, pages create a new folder structure and are accessed via an index.html within that directory^[600-developer-blog-hexo-blog-hexo-command.md].

[[Templates]] Documentation Workflow

Sources

  • 600-developer-blog-hexo-blog-hexo-command.md