A set of standards for GitHub repos, README.md files, and README.md assets.
When creating GitHub repos, follow these guidelines:
-
Repository names are all lowercase and use the kebab-case naming convention. For example
php-contact-form,html-forms, orpersonal-portfolio. -
Repository descriptions are one short sentence using sentence case.
For repositories using GitHub Pages and Markdown, the description should be short and without a period as the description is placed into the home page title. For example
_readme | Formatting standards for GitHub repos and README. files. -
Repository should be assigned all relevant topics in the repo settings.
-
Prefix forked repositories with
forked-. For exampleforked-brickmmo-core. These repos do not need to follow _readme guidelines, this would cause future conflicts when pulling forked updates. -
Always include a
.gitignorefile. The file should at least ignore.DS_Storefiles.
Use level one and two headings. Include a description of that the repo contents is for, a list of technology used, and a list of related resources. BrickMMO and CodeAdam README.md files end with a logo and link.
When creating README.md files for your GitHub repositories, follow these guidelines:
-
Use one tic (`) for inline code and three tics (```) for coding blocks. Provide the language when using coding blocks (```php).
-
Each README.md should use a main title using # and sub-titles when appropriate using ##.
-
Do not include usernames or passwords in README.md files (or coding samples). Using the following format to block out sensitive information:
define('API_KEY', '<API_KEY>'); define('API_SECRET', '<API_SECRET>');
Or:
DB_HOST=<DB_HOST> DB_DATABASE=<DB_DATABASE> DB_USERNAME=<DB_USERNAME> DB_PASSWORD=<DB_PASSWORD>
When adding images to a README.md file, place the files inside a folder named _readme. Images should follow these guidelines:
- Images names are all lowercase and use the kebab-case naming convention. For example
terminal-nom-start.jpg. - Images should have a maximum width of 624 pixels.
- Most screenshots are 624 pixels wide. Terminal screenshots are 400 pixels wide.
- Screenshot files are prefixed with
screenshot. For examplescreenshot-codeadam-ca.png.
Citations placed in a README.md or Markdown file should use APA guidelines, a >, and wrapped in the <small> tag. For example:
> <small>LEGO (n.d.). LEGO 12 Grimmauld Place. Retrieved August 7, 2023, from [https://www.lego.com/en-ca/product/12-grimmauld-place-7640](https://www.lego.com/en-ca/product/12-grimmauld-place-7640)</small>Once rendered, it will appear as:
LEGO (n.d.). LEGO 12 Grimmauld Place. Retrieved August 7, 2023, from https://www.lego.com/en-ca/product/12-grimmauld-place-7640
The _readme guidelines also include some basic CSS rules to the GitHub default styles for Markdown conversion. To apply these CSS rules just import the readme.css file at the top of the markdown file (or directly after the # title if you have one). You can embed the css from this repo:
<style>@import url("//readme.codeadam.ca/readme.css");</style>Or the BrickMMO CDN:
<style>@import url("https://cdn.brickmmo.com/readm@1.0.0/readme.css");</style>CDN is available at https://cdn.brickmmo.com/
Currently this CSS file adds the following styles:
- Tables are 100% width
- All table content ls left aligned
You can view the raw CSS file at
https://readme.codeadam.ca/readme.css