Skip to content

Commit 9e0a952

Browse files
Add CONTRIBUTING.md
1 parent 8d997ad commit 9e0a952

File tree

4 files changed

+69
-8
lines changed

4 files changed

+69
-8
lines changed

CONTRIBUTING.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Contributing
2+
3+
Thank you for your interest in contributing to the Multi Theft Auto: Wiki. This guide will help you get started.
4+
5+
## Getting Started
6+
7+
1. **Fork the Repository**
8+
- Click the "Fork" button at the top-right of this GitHub repository's page to create your own copy.
9+
10+
2. **Clone the Repository**
11+
- Clone your forked repository to your local machine ([tutorial](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository)).
12+
13+
3. **Create a Branch**
14+
- Before making any changes, create a new branch to keep your work organized ([tutorial](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-and-deleting-branches-within-your-repository)).
15+
16+
## Editing Wiki Pages
17+
18+
The Wiki is generated by code, which relies on data present in this repository. Most text content uses the Markdown format. You can edit the files to make changes to the Wiki pages.
19+
20+
1. Navigate to the folder that contains the page you want to edit.
21+
22+
- Articles are defined in the [articles](/articles) folder.
23+
- Lua Functions are defined in the [functions](/functions) folder.
24+
- Lua Events are defined in the [events](/events) folder.
25+
- Lua Elements are defined in the [elements](/elements) folder.
26+
- Additional asset files can be stored in the [assets](/assets) folder.
27+
28+
2. Each folder may contain a `README.md` file with instructions or guidelines specific to the files in that directory. **Read these instructions carefully before making changes.**
29+
30+
3. Make your edits to the relevant file(s) using your preferred text editor.
31+
32+
## Testing Your Changes
33+
34+
Follow the provided instructions in the [`web/README.md`](/web/README.md) file.
35+
36+
## Submitting Your Changes
37+
38+
1. Commit your changes with a clear and descriptive message, e.g. `Add new article on scripting events`.
39+
40+
2. Push your branch to your forked repository.
41+
42+
3. Open a Pull Request:
43+
- Go to the original repository ([https://github.com/multitheftauto/mtasa-wiki](https://github.com/multitheftauto/mtasa-wiki)).
44+
- Click "Pull Requests" and then "New Pull Request."
45+
- Select your branch from your fork as the source and submit your pull request.
46+
47+
## Guidelines
48+
49+
- Follow the structure and formatting conventions used in the existing files.
50+
- Make sure your edits are clear, concise, and accurate.
51+
- Provide useful commit messages to explain your changes.
52+
- If you have questions or need clarification, open an issue or ask for help in your pull request.
53+
54+
We appreciate your contributions to improving the Multi Theft Auto: Wiki!

web/resources/article.html

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
1-
{{ article.html_content }}
21

3-
<div style="text-align: left; font-size: 0.8em; color: #b5b5b5; position: absolute; bottom: 0; padding-bottom: 20px; max-width: 100%;">
4-
<div>Article: <strong>{{ article.title }}</strong></div>
5-
<div style="margin-top: 0.5em;">Written by <i class="fab fa-github"></i> <a href="https://github.com/{{ article.author }}" rel="noopener" target="_blank">{{ article.author }}</a> on {{ article.date }}</div>
2+
<div style="float: right; text-align: right; margin-bottom: 10px;">
3+
<div style="color: #fff; font-size: 1em;">
4+
Article: <strong>{{ article.title }}</strong>
5+
<a style="margin-left: 2px;" href="https://github.com/multitheftauto/mtasa-wiki/tree/main/articles/{{article.path_repo}}" rel="noopener" target="_blank">
6+
<i class="fa-solid fa-pen-to-square"></i>
7+
</a>
8+
</div>
9+
<div style="color: #b5b5b5; font-size: 0.8em; margin-top: 0.5em;">
10+
Written by <i class="fab fa-github"></i> <a href="https://github.com/{{ article.author }}" rel="noopener" target="_blank">{{ article.author }}</a> on {{ article.date }}
11+
</div>
612
</div>
13+
14+
{{ article.html_content }}

web/resources/layout.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,7 @@
100100
<footer>
101101
<div class="inner">
102102
<p>Copyright &copy; {{ year }} Multi Theft Auto team and contributors</p>
103-
<p><i class="fab fa-github"></i> <a href="https://github.com/multitheftauto/mtasa-wiki" rel="noopener" target="_blank">Wiki on GitHub</a></p>
104-
<p><a href="/privacy">Privacy policy</a></p>
103+
<p><i class="fab fa-github"></i> <a href="https://github.com/multitheftauto/mtasa-wiki" rel="noopener" target="_blank">Wiki on GitHub</a> | <a href="/privacy">Privacy policy</a></p>
105104
</div>
106105
</footer>
107106

web/scripts/builder.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,8 @@ def create_function(self, function_name):
216216

217217
return function
218218

219-
def create_article(self, article_name, article_parent_path='', custom_web_path=False):
220-
article_real_path = os.path.join(DOCS_REPO_PATH, 'articles', article_parent_path, article_name, f"article.yaml")
219+
def create_article(self, article_name, articles_folder='', custom_web_path=False):
220+
article_real_path = os.path.join(DOCS_REPO_PATH, 'articles', articles_folder, article_name, f"article.yaml")
221221
article = utils.load_and_validate_yaml(article_real_path, self.schema_article)
222222

223223
content_path = article.get('content')

0 commit comments

Comments
 (0)