|
1 | | -# Contributing |
| 1 | +# Contributing to GitHub Maintainer Month |
2 | 2 |
|
3 | 3 | :+1::tada: First off, thanks for taking the time to contribute! :tada::+1: |
4 | 4 |
|
5 | | -The following is a set of guidelines for contributing to GitHub Maintainer Month website. |
| 5 | +This document provides guidelines and instructions for contributing to the GitHub Maintainer Month website. |
6 | 6 |
|
7 | | -## Table Of Contents |
| 7 | +## Quick Navigation |
8 | 8 |
|
9 | | -- [Web content](#web-content) |
10 | | - - [Events](#events) |
11 | | - - [Library links](#library-links) |
12 | | - - [Literals](#literals) |
| 9 | +- [How to Contribute](#how-to-contribute) |
| 10 | +- [Contribution Walkthrough](#contribution-walkthrough) |
| 11 | +- [Development Guidelines](#development-guidelines) |
| 12 | +- [Content Guidelines](#content-guidelines) |
13 | 13 |
|
14 | | -## Web content |
| 14 | +## How to Contribute |
15 | 15 |
|
16 | | -In this section you will find the instructions to modify web content: either to add/modify an event, or to update a literal. |
| 16 | +1. **Fork the repository** and create your branch from `main` |
| 17 | +2. **Make your changes** following the guidelines below |
| 18 | +3. **Test your changes** locally if possible |
| 19 | +4. **Submit a pull request** with a clear description of your changes |
17 | 20 |
|
18 | | -All the web literals are located in the `content` folder, at the root of the repository, so it will only be necessary to edit them and, after making a pull request, add them to the main branch in order to update the web. |
| 21 | +## Contribution Walkthrough |
19 | 22 |
|
20 | | -> **Note:** many files use _frontmatter_ to define some fields (setting a variable name and a value), so it is very important not to edit the variable name for the web to work correctly. Neither can new ones be deleted or added. The variables that are set in the _frontmatter_ are made between the `---` lines, so these cannot be modified either. |
| 23 | +### Adding a New Event |
21 | 24 |
|
22 | | -### Events |
| 25 | +1. Navigate to the `content/events/` folder |
| 26 | +2. Create a new markdown file with a descriptive name (e.g., `2025-05-20-your-event-name.md`) |
| 27 | +3. Use the following template: |
23 | 28 |
|
24 | | -The events are located inside the `content/events` folder. Each event is documented in a markdown file for each one so, to create one, create a new file inside that same folder, with extension `.md`, for example: `africameetup.md`, following the example below: |
25 | | - |
26 | | -``` |
| 29 | +```markdown |
27 | 30 | --- |
28 | | -title: 'GitHub Virtual Meetup: Africa' |
29 | | -metaTitle: 'GitHub Virtual Meetup: Africa' |
30 | | -metaDesc: 'Join GitHub users across Africa to talk about open source project maintainership!' |
31 | | -date: '06/16' |
32 | | -UTCStartTime: '12:00' |
33 | | -UTCEndTime: '15:00' |
| 31 | +title: 'Your Event Title' |
| 32 | +metaTitle: 'Your Event Title' |
| 33 | +metaDesc: 'A brief description of your event' |
| 34 | +date: 'MM/DD' |
| 35 | +UTCStartTime: 'HH:MM' |
| 36 | +UTCEndTime: 'HH:MM' |
34 | 37 | type: 'meetup' |
35 | 38 | language: 'English' |
36 | | -location: 'Virtual' |
37 | | -userName: 'github' |
38 | | -userLink: 'https://www.meetup.com/GitHub-Africa/' |
39 | | -linkUrl: 'https://www.meetup.com/GitHub-Africa/' |
| 39 | +location: 'Virtual or Physical Location' |
| 40 | +userName: 'organizationName' |
| 41 | +userLink: 'https://link-to-organization.com' |
| 42 | +linkUrl: 'https://link-to-event.com' |
40 | 43 | --- |
41 | 44 |
|
42 | | -Join GitHub users across Africa to talk about open source project maintainership! |
43 | | -
|
44 | | -Speakers TBD, follow along on the Meetup page for announcements. |
| 45 | +Detailed description of your event goes here. You can use markdown formatting. |
45 | 46 | ``` |
46 | 47 |
|
47 | | -All fields included in the _frontmatter_ are mandatory: |
48 | | - |
49 | | -- `title`: event title. |
50 | | -- `metaTitle`: title to use as meta tag. |
51 | | -- `metaDesc`: description to use as meta tag. |
52 | | -- `date`: date of event, in `MM/DD` format. |
53 | | -- `UTCStartTime`: start time in UTC, in `HH:MM` format. |
54 | | -- `UTCStartTime`: end time in UTC, in `HH:MM` format. |
55 | | -- `type`: one of the following `podcast`, `stream`, `talk`, `meetup`, `fundraising`, `conference`, `misc`. |
56 | | -- `language`: primary language of the event (e.g., English, Spanish, Mandarin). |
57 | | -- `location`: event location, either `Virtual` or the location itself. |
58 | | -- `userName`: user name or organization organizing the event. |
59 | | -- `userLink`: link to user or organization profile. |
60 | | -- `linkUrl`: Button link with external link to the event. |
| 48 | +4. All frontmatter fields (between `---`) are mandatory |
| 49 | +5. Submit a PR with your changes |
61 | 50 |
|
62 | | -After these fields, on the line following `---`, you can add the event description, in markdown format. |
| 51 | +### Adding a New Resource |
63 | 52 |
|
64 | | -### Library links |
65 | | - |
66 | | -_Library_ page links can be added and edited from the `content/library/resources.json` file, inside the `resources` array, which has the following structure: |
| 53 | +1. Open the `content/library/resources.json` file |
| 54 | +2. Add a new entry to the `resources` array following this format: |
67 | 55 |
|
68 | 56 | ```json |
69 | 57 | { |
70 | | - "resources": [ |
71 | | - { |
72 | | - "title": "Link 1", |
73 | | - "author": "Author", |
74 | | - "description": "A short description", |
75 | | - "link": "https://github.com/", |
76 | | - "type": "video", |
77 | | - "topics": "video" |
78 | | - }, |
79 | | - { |
80 | | - "title": "Link 2", |
81 | | - "author": "Author", |
82 | | - "description": "A short description", |
83 | | - "link": "https://github.com/", |
84 | | - "type": "video", |
85 | | - "topics": "video" |
86 | | - }, |
87 | | - { |
88 | | - "title": "Link 3", |
89 | | - "author": "Author", |
90 | | - "description": "A short description", |
91 | | - "link": "https://github.com/", |
92 | | - "type": "video", |
93 | | - "topics": "video" |
94 | | - } |
95 | | - ] |
| 58 | + "title": "Resource Title", |
| 59 | + "author": "Author Name", |
| 60 | + "description": "Brief description (max 200 characters)", |
| 61 | + "link": "https://link-to-resource.com", |
| 62 | + "type": "video|article|tutorial|etc", |
| 63 | + "topics": "relevant topic tags" |
96 | 64 | } |
97 | 65 | ``` |
98 | 66 |
|
99 | | -Each resource: |
| 67 | +3. Submit a PR with your changes |
100 | 68 |
|
101 | | -```json |
102 | | -{ |
103 | | - "title": "Link 3", |
104 | | - "author": "Author", |
105 | | - "description": "A short description", |
106 | | - "link": "https://github.com/", |
107 | | - "type": "video", |
108 | | - "topics": "video" |
109 | | -} |
110 | | -``` |
| 69 | +### Fixing Typos or Content Issues |
| 70 | + |
| 71 | +1. Locate the file with the content that needs correction |
| 72 | + - Website text is in the `content/` directory |
| 73 | + - For events, check `content/events/` |
| 74 | + - For library resources, check `content/library/resources.json` |
| 75 | +2. Make your corrections |
| 76 | +3. Submit a PR describing what you fixed |
| 77 | + |
| 78 | +### Making Code Changes |
| 79 | + |
| 80 | +1. For structural code changes, please open an issue first to discuss your proposal |
| 81 | +2. Follow the project's coding style and patterns |
| 82 | +3. Test your changes locally before submitting |
| 83 | +4. Include clear documentation for any new functionality |
| 84 | + |
| 85 | +## Development Guidelines |
| 86 | + |
| 87 | +### Setting Up Your Environment |
| 88 | + |
| 89 | +1. Clone the repository |
| 90 | +2. Install dependencies: `npm install` |
| 91 | +3. Start the development server: `npm run dev` |
| 92 | +4. Visit `http://localhost:3000` to see your changes |
| 93 | + |
| 94 | +### Code Style |
| 95 | + |
| 96 | +- Follow the existing code style and patterns |
| 97 | +- Use descriptive variable and function names |
| 98 | +- Write comments for complex logic |
| 99 | + |
| 100 | +### Testing |
| 101 | + |
| 102 | +- Run tests with `npm test` before submitting changes |
| 103 | +- Add new tests for new functionality when appropriate |
| 104 | + |
| 105 | +## Content Guidelines |
| 106 | + |
| 107 | +### Frontmatter Fields |
| 108 | + |
| 109 | +> **Important:** Do not modify variable names in frontmatter sections (between `---`). These are required for the website to function properly. |
| 110 | +
|
| 111 | +#### Event Fields |
| 112 | + |
| 113 | +- `title`: Event title |
| 114 | +- `metaTitle`: Title for SEO meta tags |
| 115 | +- `metaDesc`: Description for SEO meta tags |
| 116 | +- `date`: Event date in `MM/DD` format |
| 117 | +- `UTCStartTime`: Start time in UTC, in `HH:MM` format |
| 118 | +- `UTCEndTime`: End time in UTC, in `HH:MM` format |
| 119 | +- `type`: One of: `podcast`, `stream`, `talk`, `meetup`, `fundraising`, `conference`, `misc` |
| 120 | +- `language`: Primary language of the event |
| 121 | +- `location`: `Virtual` or physical location |
| 122 | +- `userName`: Organizer/organization name |
| 123 | +- `userLink`: Link to organizer profile/website |
| 124 | +- `linkUrl`: Direct link to the event |
| 125 | + |
| 126 | +#### Library Resource Fields |
111 | 127 |
|
112 | | -Where: |
| 128 | +- `title`: Resource title |
| 129 | +- `author`: Author or creator name |
| 130 | +- `description`: Brief description (max 200 characters) |
| 131 | +- `link`: URL to the resource |
| 132 | +- `type`: Content type (e.g., `video`, `article`, `tutorial`) |
| 133 | +- `topics`: Relevant topic tags |
113 | 134 |
|
114 | | -- `title`: link title. |
115 | | -- `author`: author or authors. |
116 | | -- `description`: a short description (max. 200 characters). |
117 | | -- `link`: resource link. |
118 | | -- `type`: content type, such as `video`, `article`, etc. |
119 | | -- `topics`: related topics. |
| 135 | +### Static Content |
120 | 136 |
|
121 | | -### Literals |
| 137 | +Other content files are organized as follows: |
122 | 138 |
|
123 | | -The rest of web literals (static content), is also inside the `content` folder: |
| 139 | +- `content/home/`: Content for the homepage sections |
| 140 | +- `content/commons.json`: Common website text (menu, footer, page titles, etc.) |
124 | 141 |
|
125 | | -- `content/home` folder: contains markdown files with all _Home_ sections content. |
126 | | -- `content/commons.json`: contains all common web literals, such as menu, page titles, footer, etc. |
| 142 | +When editing these files, maintain the existing structure and frontmatter fields. |
0 commit comments