Contributing
Firstly, a big thank you for considering to contribute to this notes repository project.
This contribution guide (for the most part) assumes that you are an NP CSF student, and are familiar with Git/GitHub
and Markdown
.
The ways to contribute to this project are:
- Writing notes.
- Improving/Fixing notes.
- Adding new features.
The following sections will guide you on how to create new notes, format the notes, and contribute to the repository.
Table of Contents:
Getting Started
- Fork the repository from GitHub.
- Clone your forked repository to your local machine.
- Install Ruby and Jekyll. Refer to the Jekyll Docs for installation instructions.
- Install the dependencies by running
bundle install
. - Run the local server by running
bundle exec jekyll s
.
Creating a File
- Notes are written in Markdown format, and follow the naming convention
YYYY-MM-DD-title.md
.title
should be the content’s (e.g. chapter) name. - The file should be placed in the
_posts
directory. - Alternatively, you could use the Jekyll Compose plugin to create a new post easily.
1
jekyll compose "post-title"
Front Matter
- The front matter of the file should contain the following:
title
: The title of the note. Start with the module code in square brackets, followed by the title.author
: Your name. If this is your first time contributing, add your details in_data/authors.yml
.categories
: The category of the note. This should be the module name in its full form.
- Additional fields can be added if necessary. Some examples include:
authors: [author1, author2]
: A list of authors, if there are multiple authors.img_path: /img/path/
: Path to the image file’s folder.math: true
: Enables LaTeX math rendering.mermaid: true
: Enables Mermaid diagram rendering. (Addmermaid
tags to use Mermaid syntax)
Formatting
- The notes should be formatted in Markdown. Refer to the Markdown Guide for more information.
- The notes should be well-structured, with headings, subheadings, and bullet points where necessary.
- There are additional formatting styles available with this website’s theme (Referenced from Chirpy’s docs):
Checkbox List:
- Task
- Step 1
- Step 2
- Step 3
1
2
3
4
- [ ] Task
- [x] Step 1
- [x] Step 2
- [ ] Step 3
Description List:
- Name
- Some sort of definition, for instance.
1
2
Name
: Some sort of definition, for instance.
Block Quotes:
This line shows the block quote.
1
> This line shows the block quote.
Prompts:
An example showing the
tip
type prompt.
An example showing the
info
type prompt.
An example showing the
warning
type prompt.
An example showing the
danger
type prompt.
1
2
3
4
5
6
7
8
9
10
11
> An example showing the `tip` type prompt.
{: .prompt-tip }
> An example showing the `info` type prompt.
{: .prompt-info }
> An example showing the `warning` type prompt.
{: .prompt-warning }
> An example showing the `danger` type prompt.
{: .prompt-danger }
Tables (Hint: Use a Markdown Table Generator for this) (Additional note: The colon on each column of the second row determines the alignment of the text in the column)
Company | Contact | Country |
---|---|---|
Alfreds Futterkiste | Maria Anders | Germany |
Island Trading | Helen Bennett | UK |
Magazzini Alimentari Riuniti | Giovanni Rovelli | Italy |
1
2
3
4
5
| Company | Contact | Country |
| :--------------------------- | :--------------- | ------: |
| Alfreds Futterkiste | Maria Anders | Germany |
| Island Trading | Helen Bennett | UK |
| Magazzini Alimentari Riuniti | Giovanni Rovelli | Italy |
Contributing to the repository
- After making the changes, add and commit them to your own repository (the forked one). It is highly recommended that you follow the Conventional Commits format for commit messages.
-
Go to the forked GitHub repository and click
Contribute > Open Pull Request
- Check through the changes and create the pull request.
- You’re done! We will review the changes and edit/merge them soon :)