Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added contributing.md #27

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 88 additions & 0 deletions docs/CONTRIBUTING.MD
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
Contributing to Engineering Handbook
====================================

Thank you for your interest in contributing to the WordPress Engineering Handbook! We appreciate your help in making this resource even better. Below are some guidelines to ensure a smooth and effective contribution process.


### Ways to Contribute

+ [Submit Ideas and Issues](#submit-an-idea-or-issue)
+ [Project Structure](#project-structure)
+ [Commands](#commands)
+ [Contributing a New Guide or Docs](#how-to-contribute)


### Submit an Idea or Issue

Ideas and issues can be submitted at [https://github.com/Travelopia/wordpress-engineering-handbook/issues/new/choose](https://github.com/Travelopia/wordpress-engineering-handbook/issues/new/choose).

Before submitting an issue, [search existing issues](https://github.com/Travelopia/wordpress-engineering-handbook/issues) and ensure you're not creating a duplicate. If the issue already exists you can add your information to the existing issue.

## 🚀 Project Structure

Understanding the project structure will help you navigate the repository:

```
.
├── public/
├── src/
│ ├── assets/
├── css/
├── images/
│ ├── content/
│ │ ├── docs/
│ │ └── config.ts
│ └── env.d.ts
├── astro.config.mjs
├── package.json
└── tsconfig.json
```

- **`src/content/docs/`**: Contains the `.md` or `.mdx` files, which are exposed as routes based on their file names.
- **`src/assets/`**: Store images and other assets here. They can be embedded in Markdown with a relative link.
- **`public/`**: Place static assets like favicons in this directory.


## 🧞 Commands

To contribute, you'll likely need to run some commands from the root of the project:

| Command | Action |
| :------------------------ | :----------------------------------------------- |
| `npm install` | Installs dependencies |
| `npm run dev` | Starts local dev server at `localhost:4321` |
| `npm run build` | Build your production site to `./dist/` |
| `npm run preview` | Preview your build locally, before deploying |
| `npm run astro ...` | Run CLI commands like `astro add`, `astro check` |
| `npm run astro -- --help` | Get help using the Astro CLI |


## 💡 How to Contribute

### 1. Adding a New Guide

To add a new guide to the handbook:

1. **Create a New File**: Add a new `.mdx` file in the `src/content/docs/` directory.
2. **Add Frontmatter**: Include frontmatter at the top of the file. Here’s an example:
```md
---
title: "New Guide"
description: "This is a new guide"
template: doc
---
```
3. **Write Content**: Add your content below the frontmatter.
4. **Update Configuration**: Ensure the new guide is listed in `astro.config.mjs`.

### 2. Submitting a Pull Request

1. **Create an issue**: Before starting work on a new feature, docs or change, please open an issue to discuss the proposed changes.
2. **Create a New Branch**: Use a descriptive name for your branch (e.g., `add-new-guide`).
3. **Make Your Changes**: Implement your changes or additions following the project guidelines.
4. **Submit a Pull Request**: Open a pull request with a clear description of your changes. Reference any related issues if applicable and assign any maintainers for review.

## 💬 Have Questions?
If you have any questions or need further assistance, feel free to open an issue or reach out to the maintainers of the handbook.

We look forward to your contributions! 🌟