AnQiCMS template development is based on Go Template syntax, easy to learn.

Template structure

The template file is located in the template directory, categorized by module. There are corresponding template files for the home page, list page, detail page, and single page.

Template Tag

The system provides a rich set of template tags, such as archiveList (article list), categoryList (category list), and so on.The label manual has detailed usage instructions.

Template inheritance

Using extends to implement template inheritance, extract common parts (header, footer) to the base template. Reduces code repetition.

Static resources

CSS, JS, images, and other static resources are placed in the public directory, and templates reference them via relative paths.

Development tools

It is recommended to use VS Code or GoLand for development, with the Go Template plugin providing syntax highlighting and auto-completion.