Hexo theme structure¶
The structure of a Hexo theme is organized into specific directories that manage the visual presentation, layout logic, and static assets of the site. A standard theme directory, such as the default landscape theme, typically contains a configuration file, language files, layout templates, scripts, and source assets^[600-developer-blog-hexo-blog-hexo-command.md].
Directory layout¶
A Hexo theme directory is generally organized with the following components^[600-developer-blog-hexo-blog-hexo-command.md]:
_config.yml: The configuration file specific to the theme.languages: Contains language files for internationalization.layout: Stores the template files used to render the site's pages.scripts: Holds scripts or plugins that extend the theme's functionality.source: Contains static assets such as images, CSS, and JavaScript files.
Layout templates¶
The layout folder is critical for defining the site's structure. It typically contains an layout.ejs file, which serves as the master template^[600-developer-blog-hexo-blog-hexo-command.md].
layout.ejs: Acts as the primary layout file.index.ejs: Typically represents the content injected into the layout (e.g., the<%- body %>section).
Sources¶
^[600-developer-blog-hexo-blog-hexo-command.md]