Skip to content

Commit 86b8562

Browse files
MarkusMarkus
authored andcommitted
Updated 'How to Contribute' Instructions
1 parent fdb9be1 commit 86b8562

1 file changed

Lines changed: 45 additions & 3 deletions

File tree

README.md

Lines changed: 45 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -220,13 +220,55 @@ Flyweight.
220220
the issue that you are working on it so that others don't start work on the
221221
same thing.
222222
2. Fork the repository.
223+
3. Create a new folder for the pattern. The rough structure of the new folder would be as follows:
224+
* etc (every resource related to the pattern, like diagrams)
225+
* src (the source code of the pattern)
226+
* index.md (the description of the pattern)
227+
* pom.xml (the maven pom.xml)
223228
3. Implement the code changes in your fork. Remember to add sufficient comments
224229
documenting the implementation. Reference the issue id e.g. #52 in your
225230
commit messages.
226-
4. Create a simple class diagram from your example code.
227-
5. Add description of the pattern in README.md and link to the class diagram.
231+
4. Create a simple class diagram from your example code and put it inside of the etc folder.
232+
5. Add description of the pattern in index.md and link to the class diagram.
233+
(Attention, all internal links must be relative to the pattern subdirectory, else the links dont link properly on the website)
228234
6. Create a pull request.
229235

236+
**Structure of the index.md file**
237+
238+
```markdown
239+
--- # this is so called 'Yaml Front Matter', read up on it here: http://jekyllrb.com/docs/frontmatter/
240+
layout: pattern # layout must allways be pattern
241+
title: Best Pattern Ever # the properly formatted title
242+
folder: best-pattern-ever # the folder name in which this pattern lies
243+
permalink: /patterns/best-pattern-ever/ # the permalink to the pattern, to keep this uniform please stick to /patterns/FOLDER/
244+
245+
# both categories and tags are Yaml Lists
246+
# you can either just pick one or write a list with '-'s
247+
# usable categories and tags are listed here: https://github.com/iluwatar/java-design-patterns/blob/gh-pages/_config.yml
248+
categories: creational # categories of the pattern
249+
tags: # tags of the pattern
250+
- best
251+
- ever
252+
- awesome
253+
---
254+
255+
**Intent:** Makes your code awesome
256+
257+
![alt text](./etc/best_pattern.png "Best Pattern Ever")
258+
259+
**Applicability:** Use the Best Pattern Ever pattern when
260+
261+
* you want to be the best
262+
* you need to ...
263+
264+
**Real world examples:**
265+
266+
* [Nowhere](http://no.where.com)
267+
```
268+
269+
**To add a new category or tag** you need to edit the _config.yml file of the gh-pages branch.
270+
In there you should find 2 yaml lists with the respective names 'category-list' and 'tag-list'
271+
230272
**To work on one of the non-pattern issues** you need to do the following steps:
231273

232274
1. Check that the issue has "help wanted" badge
@@ -247,7 +289,7 @@ Flyweight.
247289
* Microsoft's [Cloud Design Patterns](http://download.microsoft.com/download/B/B/6/BB69622C-AB5D-4D5F-9A12-B81B952C1169/CloudDesignPatternsBook-PDF.pdf)
248290

249291
**Links to patterns applied in real world applications** are welcome. The links
250-
should be added to the corresponding section of the `README.md`.
292+
should be added to the corresponding section of the `index.md`.
251293

252294

253295
# <a name="versioning">Versioning</a> [&#8593;](#top)

0 commit comments

Comments
 (0)