Mecha CMS


File Naming Best Practices

Table of Content

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 __f2c__ function, the file name above (without the file extension) will be returned into this:



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



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