๐ Getting Started: What Templates Can Do
Last updated๏ผ2026-11-25
๐ Product Introduction
Gitl.cn CMS is independently developed by Gitl.cn โ an enterprise-grade site-building system built for the AI era. It doesn’t just “make a website”: it ensures your site is both indexed by search engines and cited directly by AI engines such as ChatGPT, Doubao, and Kimi โ delivering in one go a site that’s easy to maintain for life and reaches the world in multiple languages. This manual is aimed at template developers and explains how to write front-end HTML templates that consume the data the system provides.
One-line positioning: a single-file-deployment enterprise CMS with built-in SEO + GEO (Generative Engine Optimization) + full-site static export + one-click multi-channel publishing, native multi-language support, and instant effect after editing templates/content in the admin panel โ no restart needed.
๐ก Why Choose Gitl.cn CMS (Customer Value)
- Searchable and AI-citable โ Full SEO suite built in: sitemap / robots / hreflang / JSON-LD. It goes further with GEO (llms.txt / llms-full.txt), letting AI assistants cite your products and cases directly when answering users.
- Delivered once, maintained for life โ Single-binary deployment with zero external dependencies by default (SQLite; switchable to MySQL / PostgreSQL). Switching templates in the admin panel takes effect instantly, redesigns never require a service restart, and customers can maintain it themselves with ease.
- Multi-language, global reach โ One admin panel manages multiple sites; path prefixes (e.g. /en, /zh-TW) are handled automatically, and hreflang cross-links help search engines in different regions recommend the right language version.
- Generate-and-publish, secure and fast โ The whole site can be exported to static HTML (SSG) in one click and pushed directly to FTP / Tencent Cloud COS / EdgeOne / Git; static assets ship with long browser cache headers for faster repeat visits.
๐ข About Gitl.cn
Gitl.cn (Tiantian Technology) is a “digital growth lab” in Zhanjiang and an SEO / GEO growth partner, using verifiable SEO and GEO to win real inquiries for SMBs. The Gitl.cn CMS documented in this manual is the content engine behind gitl.cn and hundreds of delivered projects โ indexed by search engines and cited directly by AI engines such as ChatGPT, Doubao, and Kimi. It has served 50+ Zhanjiang enterprises, 500+ trusted customers, and 636 real delivered projects.
โ๏ธ Technical Architecture
| Layer | Choice | Notes |
|---|---|---|
| Language | Go (Golang) | Single-binary deployment, no external dependencies; high concurrency, low memory footprint |
| Data storage | SQLite / MySQL / PostgreSQL (switchable) | Selected via CMS_DB_TYPE (default sqlite); SQLite is file-based with zero ops, mysql/postgres suit high concurrency and centralized management โ the vast majority of business SQL needs no dialect rewriting |
| Template engine | html/template | Go standard template syntax with automatic HTML escaping against XSS; supports free data fetching via list/one |
| Static export | Full-site SSG | One-click generation of all sites into static HTML under htm/, with incremental (by date/scope) generation |
| Publish channels | FTP / COS / EdgeOne / Git | One-click push from the admin panel, no extra SDK needed |
| Deployment form | Single executable + static assets | Copy and run โ ideal for customer self-hosting or pure static hosting |
โจ Core Capabilities (Implemented in the Go Source)
All of the following are implemented by the Go backend, directly callable from templates; each maps to a later chapter of this manual.
| Capability | Description |
|---|---|
| ๐ GEO (Generative Engine Optimization) | Automatically generates /llms.txt and /llms-full.txt (auto-sharded into llms-full-N.txt when content is large) for AI engines such as ChatGPT / Gemini / DeepSeek / Doubao / Kimi to read directly; multi-sites each get their own GEO files by path prefix. |
| ๐ Full SEO suite | sitemap.xml (auto-sharding + hreflang cross-links), robots.txt (allows AI crawlers and points to sitemap / llms), absolute canonical, hreflang language cross-links, absolute og:image, og:locale, structured data JSON-LD (Organization / WebSite / Article / Product / BreadcrumbList). |
| ๐ฆ Full-site static export (SSG) | One click in the admin panel generates all enabled sites into static HTML under htm/ with real-time progress; supports incremental generation by scope (home page / protocol files / lists / sections / details) and by date of change. |
| ๐ One-click multi-channel publishing | After generation, push to FTP / Tencent Cloud COS (simple PUT, no SDK) / EdgeOne / Git repositories in one click; no restart needed after changing templates or content. |
| โก Static asset caching | Built-in StaticCache middleware sets long browser cache headers for assets under /static, significantly speeding up repeat visits. |
| ๐ง Free data-fetching tags | Template tag functions like list / one query any content by condition, making complex layouts and aggregation pages easy. |
| ๐ Multi-site / multi-language | One admin panel manages multiple sites isolated by site_id; sub-site path prefixes (e.g. /en) are automatically stripped and handled by SiteResolver, with hreflang generated automatically. |
| ๐จ Hot template switching | Changing tpl_path in the admin panel takes effect instantly, no restart; template packages can be self-contained with static assets, simplifying delivery and version management. |
| ๐ Five system models + custom models | Built-in posts / products / cases / single pages / jobs, all supporting multi-image, video, attachments, tags, and independent SEO fields; the admin panel can also create custom content models (tables like model_xxx), with front-end generic lists and /m/code/id detail pages. |
| โ๏ธ Inquiries / messages | Built-in contact page and message submission handling (ContactPage) for collecting customer inquiries. |
| ๐ Structured data | Detail pages automatically output Article / Product JSON-LD and BreadcrumbList, strengthening search engine and AI crawl understanding. |
| ๐ Single file, zero ops | Go compiles to a single executable; default SQLite file database โ copy and run, no database service needed. Also supports MySQL / PostgreSQL (set CMS_DB_TYPE) for high-concurrency or existing database environments. |
| ๐ Licensing and versions | Four site versions (Basic / Professional / Enterprise / Site Network); license codes use Ed25519 asymmetric signing โ only the public key is embedded, so customers can’t forge them. On expiry, the service only reminds, never locks the panel. Multi-language requires Professional or above. โ ๏ธ This model applies only to the standalone delivery edition; SaaS platform tenants use subscriptions with no license code (expiry locks only the panel). See the applicability note at the start of License & Mail Services. |
| ๐ง Mail services | Once SMTP is configured in the admin panel, enables “forgot password” self-service reset (link valid 30 minutes) and “new user email verification” (valid 24 hours); supports SSL(465) / STARTTLS(587). Passwords never echoed, anti-enumeration, one-time tokens. |
๐ฏ Typical Use Cases
- Manufacturing / tech / foreign-trade corporate sites: Unified management of products, cases, and news, with SEO and GEO working together for exposure.
- Multi-language for going global: One admin panel maintains Chinese / English / Japanese / Korean / French / German and more, with automatic hreflang cross-links avoiding duplicate-content penalties.
- Being recommended by AI: Via llms.txt / llms-full.txt, AI assistants cite your content and links directly when answering industry questions.
- Fast delivery and hosting: Export the whole site as static files and drop them onto any static hosting / CDN, or publish to COS / EdgeOne in one click โ secure, cheap, and high-concurrency-proof.
๐จ Template System Overview
Front-end rendering consists of two layers: “base template + site template overlay”:
| Directory | Role |
|---|---|
templates/index/ |
Base template, providing the minimal structure shared by all pages |
templates// |
Site template layer; can override same-named files in the base template, with unoverridden files falling back to the base |
Inside templates, {{.FieldName}} reads admin data; free tag functions like list / one fetch data flexibly. Later chapters of this manual enumerate the actual available fields of each data object.
๐ Reading Guide
- New to template development: Read “Company Info”, “Site Info”, “Content Lists”, and “Content Detail” first to master the most-used fields.
- Building complex layouts: See “Navigation Menus”, “Current Section”, “Pagination Bar”, and “Common Tags”.
- Doing SEO / GEO: See “Multi-Language Sites” and “Common Tags (SEO Head)” for practical use of hreflang, canonical, OG, and JSON-LD.
- Delivering to customers: See “Template Packaging Specification” for building self-contained template packages and full-site export.
- Licensing or mail involved: See “๐ License & Mail Services” for the four-version differences, the version threshold for multi-language, and SMTP mail configuration.
CloudSite SaaS