commit 7483f8114f595e0f1e3be5d04151fb1df6535a2a
parent 3d90dd4e28eb52f740f805ed396309d5f602ab9c
Author: markseu <mark2011@mayberg.se>
Date: Sat, 13 Dec 2025 00:25:35 +0100
Updated style guide, marzipan edition
Diffstat:
1 file changed, 15 insertions(+), 6 deletions(-)
diff --git a/STYLEGUIDE.md b/STYLEGUIDE.md
@@ -7,7 +7,7 @@ Here's how to format code:
* Use consistent indentation with 4 spaces, no tabs.
* Use double quotes for strings, no single quotes, e.g. `"Coffee is good for you"`.
-* Classe names should use PascalCase, e.g. `YellowCore`, `YellowExampleFeature`.
+* Classe names should use PascalCase, e.g. `YellowCore`, `YellowFika`, `YellowMarkdown`.
* Method/function names should use camelCase, e.g. `getRequestInformation`, `onLoad`.
* Property/variable names should use camelCase, e.g. `$yellow`, `$statusCode`, `$fileName`.
* HTML/CSS related names should use kebab-case, e.g. `yellow-toolbar`, `company-logo`.
@@ -25,7 +25,7 @@ Here's how to format code:
Here's how to format repositories:
-* Repository names should be short and singular, e.g. `yellow-fika`, `yellow-image`.
+* Repository names should be short and singular, e.g. `yellow-core`, `yellow-fika`.
* Version numbers should begin with the release number, e.g. `0.9.1`, `0.9.2`, `0.9.3`.
* Copy the PHP file into the repository, use a flat folder structure, e.g. `fika.php`.
* Copy optional supporting files, file names should use the same prefix everywhere,
@@ -38,10 +38,19 @@ Here's how to format repositories:
Here's how to format documentation:
* Use Markdown for documentation
-* Add a screenshot when possible
-* Include multiple examples for users to copy/paste, if unsure add more examples.
-* Don't use the words "simple, fast, user-friendly, flexible", anyone can claim that.
-
+* The title should include name and version, e.g. `Core 0.9.1`.
+* The description should be one line, e.g. `Core functionality of your website`.
+* Images should be in PNG format, e.g. `SCREENSHOT.png`
+* Headings should be arranged in the following order:
+ `How to install an extension`
+ `How to...`
+ `Examples` - optional
+ `Settings` - optional
+ `Acknowledgements` - optional
+ `Developer`, `Designer`, `Translator`
+* Give multiple examples for users to copy/paste, if unsure add more examples.
+* Don't use the words "easy, fast, user-friendly, flexible", anyone can claim that.
+
A few more tips for developers. It's best to have a look at the code of some extensions in your `system/workers` folder. Make yourself familiar with our coding style as well, for example with file `system/workers/core.php`. Then you can dive into any extension and find a well-known structure in which you can quickly find your way around. The style is not that important, but that we all use the same one.
Do you have questions? [Get help](https://datenstrom.se/yellow/help/).