Skip to content

Commit 8971b92

Browse files
committed
🤓 added guide on how to add your own article
1 parent 7dc29f2 commit 8971b92

File tree

1 file changed

+20
-3
lines changed

1 file changed

+20
-3
lines changed

‎README.md‎

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ The code for [dzcode.io](https://dzcode.io), a website for Algerian open-source
1414
- [Install dependencies](#install-dependencies)
1515
- [Run it locally](#run-it-locally)
1616
- [Contributing](#contributing)
17+
- [Add Your Own Article](#add-your-own-article)
18+
- [Fix Typos, or Edit existing Article](#fix-typos-or-edit-existing-article)
1719
- [License](#license)
1820

1921
## Get Started
@@ -92,12 +94,27 @@ $ cd data && yarn build && yarn dev
9294

9395
To get started see [the contributing guidelines](https://github.com/dzcode-io/dzcode.io/blob/master/.github/CONTRIBUTING.md).
9496

95-
**Fix Typos** :
96-
If you find a typo, please let us know, by creating a poll request.
97-
9897
**Unit test** :
9998
Unit test are written in [Jest](https://jestjs.io/). Please add a unit test for every new feature or bug fix. `yarn test` to run the test suite.
10099

100+
### Add Your Own Article
101+
102+
Articles on dzCode.io are found under the folder [`data/articles`](https://github.com/dzcode-io/dzcode.io/tree/master/data/articles).
103+
104+
To add new article let's say "Awesome New Article", simply do the following:
105+
106+
- Create a new folder `Awesome_New_Article` under `data/articles`
107+
- Add two files:
108+
- `info.json` , a json file containing info about your article, like **title**, **description** etc..., see [this file](https://github.com/dzcode-io/dzcode.io/blob/master/data/articles/Welcome_to_dzCode/info.json) as an example.
109+
- `content.md` , a markdown file which contain your Article text, in form of [markdown](https://www.markdownguide.org/).
110+
- Lastly, to make you article visible, modify the content of [`data/articles/list.json`](https://github.com/dzcode-io/dzcode.io/blob/master/data/articles/list.json) and add your article's folder name `Awesome_New_Article` inside the `"items": []` array.
111+
112+
To test and see your article locally, make sure to [you are all set](#get-started), after you run dzCode locally go to http://localhost:8080/Articles/Awesome_New_Article, you will see you article, and you can continue editing from there, once you are happy with the result, create a [pull request](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests) against master branch, and we will be happy to merge it 😃.
113+
114+
### Fix Typos, or Edit existing Article
115+
116+
If you find a typo in any Article, or you find something that needs to be edited, please let us know, by applying the necessary modification, then create a [pull request](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests) against master branch, and we will review it along with the article's author, then merge it.
117+
101118
## License
102119

103120
Copyright (c) 2020 dzCode.io (twitter: [@dzcode_io](https://twitter.com/dzcode_io)) Licensed under the MIT license.

0 commit comments

Comments
 (0)