rougail/docs/naming_convention.rst

47 lines
1.5 KiB
ReStructuredText
Raw Normal View History

2025-11-30 18:22:56 +01:00
.. _namingconvention:
File naming convention
==========================
The structure files in a given folder
---------------------------------------
For the sake of clarity, we put the structure definitions in separate files.
It's a good way to organize your rougail structures this way,
in the real world we need separate files for different topics.
For example some files like this:
A file named :file:`firefox/00-proxy.yml` structure file and file named :file:`firefox/10-manual.yml`
::
.
└── firefox
├── 00-proxy.yml
└── 10-manual.yml
2025-12-04 18:26:08 +01:00
.. note:: We of course could have put everything in one file.
2025-11-30 18:22:56 +01:00
Again, it is better to separate the structures in different files
for reasons of ordering and clarity.
Ordering your structure files
--------------------------------
The order in which files are loaded is important in Rougail.
In a given folder, files are loaded in alphabetical order.
Furthermore, for better readability of the order in which files are
loaded into a folder, we have adopted a convention.
To facilitate classification, we have defined a standard notation for structure file names:
::
XX-<name>.yml
2025-12-03 21:13:38 +01:00
Where `XX` is a two digits integer followed by an hyphen, and `<name>` is a name that describes
2025-11-30 18:22:56 +01:00
the structure that is in this file. We advise you to adopt this convention as well.
2025-12-03 21:13:38 +01:00
Moreover, it is preferable to only use lowercase ASCII letters, numbers and the `"_"` (undescore) character.
The snake case typographic convention is therefore used.