⌨ seCMS CLI Manual

Build static websites from the command line — site structure, YAML content, themes, and deployment.

📌 Overview

secms (Simply Efficient CMS) is a fast static site generator. It takes your content (written in simple YAML files) and a theme, and produces a complete website — HTML, CSS, JavaScript, and images — ready to upload to any web host.

If you use the seCMS GUI desktop app, the GUI handles running secms for you automatically. This manual covers using secms directly from the command line, which is useful for automation, scripting, or advanced workflows.

Your Content (YAML files)  +  Theme (templates + styles)  →  Website (HTML/CSS/JS)

Benefits:


📥 Installation

Download the Binary

Download the secms binary for your platform and place it somewhere in your PATH.

Build from Source

If you have Go installed:

cd secms/
go build -o bin/secms ./cmd/secms/

This produces the bin/secms binary.

Verify Installation

secms --help

🚀 Quick Start

Here's how to build a site in under 2 minutes:

1. Create your site directory

mkdir my-site
cd my-site

2. Create site.yaml

name: My Website
base_url: https://example.com
description: A simple website
theme: starter

menu:
  - label: Home
    path: /
  - label: About
    path: /about

pages:
  - index
  - about

3. Create your pages

Create a content/ directory and add your pages:

content/index.yaml:

id: index
title: Home
path: /
description: Welcome to my website
sections:
  - id: welcome
    title: Welcome
    content: |
      <p>Hello! This is my website. I'm glad you're here.</p>
  - id: about-me
    title: About Me
    content: |
      <p>I'm a web designer based in Seoul. I love creating
      beautiful, functional websites.</p>

content/about.yaml:

id: about
title: About
path: /about
description: Learn more about us
sections:
  - id: story
    title: Our Story
    content: |
      <p>We started this company in 2020 with a simple mission:
      make the web a more beautiful place.</p>

4. Build the site

secms --site . --themes /path/to/themes

5. View the result

secms --site . --themes /path/to/themes --serve

Open http://localhost:8080 in your browser.


⚙️ How It Works

When you run secms, it performs these steps:

  1. Reads your site configuration (site.yaml) to understand the site structure, menu, and theme choice.
  2. Loads each page from content/*.yaml files.
  3. Loads the theme — templates and styles from the themes directory.
  4. Renders each page by combining your content with the theme templates.
  5. Copies static files (images, CSS, JS, fonts) to the output directory.
  6. Generates extras like sitemap.xml and RSS feeds (if enabled).

The result is a dist/ folder containing your complete website.


📂 Site Structure

A site directory looks like this:

my-site/ ├── site.yaml # Site configuration ├── content/ # Page content files │ ├── index.yaml # Home page │ ├── about.yaml # About page │ ├── contact.yaml # Contact page │ └── services/ # Sub-pages (multi-level paths) │ ├── index.yaml # Services main page │ └── design.yaml # Services > Design page ├── includes/ # Reusable content snippets (optional) │ └── disclaimer.md ├── static/ # Your images, custom CSS/JS (optional) │ └── images/ │ ├── logo.png │ └── team.jpg └── dist/ # Generated website (output) ├── index.html ├── about/index.html ├── contact/index.html ├── images/ ├── css/ └── js/

📝 Site Configuration (site.yaml)

The site.yaml file is the heart of your site. It defines everything about your website.

Basic Configuration

name: My Website
base_url: https://example.com
description: A brief description of your website
theme: starter
copyright: "© 2026 My Website. All rights reserved."
FieldRequiredDescription
nameYesYour website's name
base_urlYesThe full URL where your site will be hosted
descriptionYesA short description (used in search results)
themeYesName of the theme to use
copyrightNoCopyright notice shown in the footer

Menu

menu:
  - label: Home
    path: /
  - label: About
    path: /about
  - label: Services
    path: /services
    children:
      - label: Web Design
        path: /services/design
      - label: Branding
        path: /services/branding
  - label: Blog
    url: https://blog.example.com
    external: true

Pages List

pages:
  - index
  - about
  - contact
  - services
  - services/design
  - services/branding

This lists the page IDs (matching filenames in content/). The order determines the build order.

Meta Tags

meta:
  author: Your Name
  lang: en
  charset: utf-8
  viewport: width=device-width, initial-scale=1.0

Optional Features

# Generate a sitemap.xml and robots.txt
sitemap:
  enabled: true
  changefreq: weekly

# Generate an RSS/Atom feed
feed:
  enabled: true
  title: My Blog Feed
  path: /feed.xml
  limit: 20

# Add analytics or custom scripts to the page head
head_scripts:
  - src: "https://www.googletagmanager.com/gtag/js?id=G-XXXXXXX"
    async: true
  - inline: |
      window.dataLayer = window.dataLayer || [];
      function gtag(){dataLayer.push(arguments);}
      gtag('js', new Date());
      gtag('config', 'G-XXXXXXX');

📄 Creating Pages

Each page is a YAML file in the content/ directory.

Basic Page

id: about
title: About Us
path: /about
description: Learn about our company and team
sections:
  - id: intro
    title: Who We Are
    content: |
      <p>We are a team of passionate creators.</p>

Required Page Fields

FieldDescription
idUnique identifier (must match the filename without .yaml)
titlePage title (shown in browser tab and on the page)
pathURL path (e.g., /about, /services/design)

Optional Page Fields

FieldDescription
descriptionSEO description (shown in search results)
bannerPath to a banner image (e.g., /images/banner.jpg)
fileOutput filename override (default: index.html)
sectionsList of content sections (see below)

📁 Sub-Pages (Multi-Level Paths)

You can organize pages in subdirectories:

content/ ├── services/ │ ├── index.yaml → /services/ │ ├── design.yaml → /services/design │ └── branding.yaml → /services/branding

In site.yaml, list these with their full path:

pages:
  - services
  - services/design
  - services/branding

✍️ Writing Content

Content is written inside sections. Each section has a title, content (HTML), and optional styling.

Section Structure

sections:
  - id: welcome
    title: Welcome
    content: |
      <p>This is a paragraph of text.</p>
      <p>This is another paragraph with <strong>bold</strong>
      and <em>italic</em> text.</p>

📚 Note: The | after content: means "multi-line text". Indent the content with spaces.

HTML You Can Use

ElementExampleResult
Paragraph<p>Text here</p>A paragraph of text
Bold<strong>bold</strong>bold
Italic<em>italic</em>italic
Link<a href="/about">About</a>A clickable link
Image<img src="/images/pic.jpg">An image
Heading<h2>Subtitle</h2>A sub-heading
List<ul><li>Item</li></ul>A bullet list
Numbered<ol><li>First</li></ol>A numbered list

🌄 Including Images in Content

content: |
  <img src="/images/team.jpg" class="float-left" alt="Our team">
  <p>Meet our amazing team of designers and developers who
  bring your ideas to life.</p>

Image positioning classes:

🔄 Reusable Content (Includes)

If you have text that appears on multiple pages (like a disclaimer or footer note), put it in the includes/ directory:

# includes/disclaimer.md
**Disclaimer:** The information on this website is for general
informational purposes only.

Then reference it in your page:

sections:
  - id: disclaimer
    title: ""
    content: !include includes/disclaimer.md

Files ending in .md are automatically converted from Markdown to HTML.


The menu is defined in site.yaml. It controls the navigation bar on your website.

Simple Menu

menu:
  - label: Home
    path: /
  - label: About
    path: /about
  - label: Contact
    path: /contact

Menu with Dropdowns

menu:
  - label: Home
    path: /
  - label: Services
    path: /services
    children:
      - label: Web Design
        path: /services/design
      - label: Branding
        path: /services/branding
      - label: Marketing
        path: /services/marketing
  - label: Contact
    path: /contact

🌐 External Links

menu:
  - label: Home
    path: /
  - label: Our Blog
    url: https://blog.example.com
    external: true

Setting external: true makes the link open in a new browser tab.

Menu Item Options

FieldDescription
labelThe text shown in the navigation (required)
pathInternal page path (e.g., /about)
urlExternal URL (use instead of path for outside links)
externaltrue to open in a new tab
childrenSub-menu items (creates a dropdown)
classCSS class for custom styling (e.g., cta-button)

🎨 Themes

Themes control the visual appearance of your site. secms comes with several built-in themes.

Available Themes

ThemeDescription
starterClean, minimal starting point
blueprintProfessional business design
bizcraftCorporate and business
boutiqueCreative portfolio and shop
cineplexEntertainment and media
docpressDocumentation and knowledge base
flavorRestaurant and food business
photofocusPhotography portfolio
runableModern app and startup
techcatalogTechnology product showcase

Switching Themes

Change the theme field in your site.yaml:

theme: blueprint

Then rebuild your site. Your content stays the same — only the design changes.

📂 Theme Structure (for reference)

themes/my-theme/ ├── theme.yaml # Theme name, description, features ├── thumbnail.png # Preview image ├── templates/ # HTML templates │ ├── base.html # Main page layout │ ├── page.html # Content area template │ └── partials/ # Reusable template pieces │ ├── top_menu.html │ └── footer.html └── static/ # CSS, JavaScript, fonts ├── css/style.css ├── js/ └── fonts/

🌄 Images and Static Files

Where to Put Files

Place your images and other static files in the static/ directory of your site:

my-site/ └── static/ ├── images/ │ ├── logo.png │ ├── hero.jpg │ └── team/ │ ├── alice.jpg │ └── bob.jpg ├── css/ │ └── custom.css └── js/ └── custom.js

Referencing Files

In your content, reference static files with a leading /:

<img src="/images/logo.png" alt="Logo">
<img src="/images/team/alice.jpg" alt="Alice">

Site Files Override Theme Files

If your site has a file with the same path as a theme file, your site's version wins. This lets you customize theme assets without modifying the theme itself.


🔨 Building Your Site

Basic Build

secms --site /path/to/my-site --themes /path/to/themes

This generates your website in my-site/dist/.

Build and Preview Locally

secms --site /path/to/my-site --themes /path/to/themes --serve

Opens a local server at http://localhost:8080 so you can preview the result in your browser.

Custom Output Directory

secms --site /path/to/my-site --themes /path/to/themes --out /path/to/output

All Build Options

FlagDefaultDescription
--site(required)Path to your site directory
--themesthemes/Path to the themes directory
--out{site}/dist/Output directory
--cleantrueRemove output directory before building
--servefalseStart local preview server after building
--port8080Port for the preview server

🌐 Deploying Your Site

After building, the dist/ folder contains your complete website. Upload it to any web host:

☁️ Static Hosting Services

💻 Traditional Web Hosting

Upload the contents of dist/ to your web server's public directory (often public_html/ or www/) using FTP or your hosting provider's file manager.

⚙️ Automation

Since secms is a single command, you can easily add it to CI/CD pipelines:

# Example: build and deploy to Netlify
secms --site . --themes themes/
netlify deploy --dir dist/

🔄 Theme Converter (Jekyll)

secms includes a tool to convert Jekyll themes into secms-compatible themes. This is useful if you find a Jekyll theme you like and want to use it with secms.

Usage

secms-tmplt-convert /path/to/jekyll-theme.zip /path/to/output-theme

Options

FlagDescription
--verboseShow detailed conversion progress
--skip-scssSkip SCSS compilation (copy raw files instead)

What It Does

  1. Extracts the Jekyll theme ZIP file
  2. Converts Liquid templates to Go templates
  3. Compiles SCSS to CSS (if Dart Sass is installed)
  4. Copies static assets (images, JavaScript, fonts)
  5. Generates a theme.yaml configuration
  6. Produces a conversion report

Requirements

Dart Sass (optional, for SCSS compilation): Install with npm install -g sass

After Conversion

The converted theme may need minor manual adjustments. Check the generated README.md in the output directory for details on what was converted and what may need attention.


💻 Reference: Command-Line Options

secms [flags]

Flags:
  --site string     Path to site directory (required)
  --themes string   Path to themes directory (default "themes/")
  --out string      Output directory (default "{site}/dist/")
  --clean           Remove output dir before building (default true)
  --serve           Start local server after building (default false)
  --port int        Server port (default 8080)

🔧 Reference: Template Functions

These functions are available in theme templates. You generally don't need to know these unless you're customizing a theme.

FunctionDescriptionExample
safeHTMLOutput raw HTML{{safeHTML .Content}}
markdownConvert Markdown to HTML{{markdown .Text}}
upperUppercase text{{upper "hello"}} → HELLO
lowerLowercase text{{lower "HELLO"}} → hello
truncateShorten text{{truncate 100 .Description}}
yearCurrent year{{year}} → 2026
defaultFallback value{{default "N/A" .Value}}
slugifyURL-safe string{{slugify "Hello World"}} → hello-world
dictCreate a data map{{dict "key" "value"}}
addAdd numbers{{add 1 2}} → 3
containsCheck if contains{{contains .List "item"}}

🧱 Reference: Section Options

Each section in a page's sections list supports these fields:

FieldRequiredDescription
idYesUnique section identifier
titleNoSection heading
contentNoHTML content (use | for multi-line)
widgetNoInteractive component name (e.g., contact-form)
styleNoCSS for the section container
content_styleNoCSS for the inner content
alignNoText alignment: left, center, right
borderNoCSS border (e.g., 2px solid #ccc)
animation.effectNoAnimation type: sun, moon, rain, snow, etc.
animation.imageNoImage for the animation
animation.speedNoSpeed 1-10 (default 5)
animation.directionNoleft or right
extraNoCustom key-value data for themes