Mecha CMS


File Naming Best Practices

Table of Contents
  1. General 
  2. Namespace 
  3. Partial 
  4. Hidden 

Mecha has some disciplines in naming their files.


In general, Mecha uses ^[a-z\d]+(?:-[a-z\d]+)*(?:\.[a-z\d]+)?$ pattern to name a file, which means:

  • All characters are in lower-case mode, including the file extension.
  • File name should only contains a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 and - characters.
  • Each word can be connected with a -, but you can’t repeat - character in a file name.


Mecha uses . character to represent a namespace in file name:

When converted by the f2c function, the file name above (without the file extension) will be returned as this:



Prefix a file name with a - to tell the engine that the file is part of another file:



Prefix a file name with a . or a _ character to represent a hidden file: