From 5f0cb35422db9a7cd3150e0aba6d128faab23a9e Mon Sep 17 00:00:00 2001 From: Suraj kumar Date: Thu, 10 Jul 2025 06:43:53 +0530 Subject: [PATCH] docs: improve contributor experience with setup guide and enhanced gitignore --- .gitignore | 34 +++++++++++++++++++++++++ CONTRIBUTING.md | 68 +++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 36 ++++++++++++++++++++++++++ 3 files changed, 138 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/.gitignore b/.gitignore index 72a376a8d960..e638936be867 100644 --- a/.gitignore +++ b/.gitignore @@ -56,3 +56,37 @@ docs-internal-data/ # For intermediate data (like scraping for Elasticsearch indexing) tmp/ + +# Additional common files to ignore +*.log +*.pid +*.seed +*.pid.lock +.npm +.nyc_output +.grunt +bower_components +.lock-wscript +build/Release +.coverage +.nyc_output +.cache +.parcel-cache +.next +out +dist +.nuxt +.vuepress/dist +.serverless +.fusebox +.dynamodb +.tern-port + +# OS generated files +.DS_Store +.DS_Store? +._* +.Spotlight-V100 +.Trashes +ehthumbs.db +Thumbs.db diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 000000000000..188fc7c39eab --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,68 @@ +# Contributing to GitHub Docs + +Thank you for your interest in contributing to GitHub Docs! 🎉 + +## Quick Start for Contributors + +### First-time Setup + +1. **Fork and clone the repository** + ```bash + git clone https://github.com/YOUR-USERNAME/docs.git + cd docs + ``` + +2. **Install dependencies** + ```bash + npm install + ``` + +3. **Start the development server** + ```bash + npm run dev + ``` + +### Making Changes + +1. **Create a new branch** + ```bash + git checkout -b your-feature-branch + ``` + +2. **Make your changes** + - Edit content in the `content/` directory + - Test your changes locally with `npm run dev` + +3. **Test your changes** + ```bash + npm test + npm run lint + ``` + +4. **Commit and push** + ```bash + git add . + git commit -m "Brief description of your changes" + git push origin your-feature-branch + ``` + +5. **Create a Pull Request** + - Go to GitHub and create a PR from your fork + +## Easy First Contributions + +- Fix typos in documentation +- Improve code examples +- Add missing installation steps +- Update outdated links +- Improve formatting and readability + +## Need Help? + +- Check the detailed [contributing guide](contributing/README.md) +- Browse [help wanted issues](https://github.com/github/docs/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22) +- Read the [content style guide](contributing/content-style-guide.md) + +## Code of Conduct + +Please note that this project is released with a [Code of Conduct](.github/CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms. \ No newline at end of file diff --git a/README.md b/README.md index 01eee7da20ce..f8a91f1858e4 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,42 @@ This repository contains the documentation website code and Markdown source file GitHub's Docs team works on pre-production content in a private repo that regularly syncs with this public repo. +## Prerequisites + +- **Node.js**: Version 20 or 22 (see [engines](package.json) in package.json) +- **npm**: Comes with Node.js +- **Git**: For version control + +## Quick Start + +### Installation + +1. **Clone the repository** + ```bash + git clone https://github.com/github/docs.git + cd docs + ``` + +2. **Install dependencies** + ```bash + npm install + ``` + +3. **Start the development server** + ```bash + npm run dev + ``` + The site will be available at `http://localhost:4000` + +### Available Scripts + +- `npm run dev` - Start development server with English content only +- `npm run start-all-languages` - Start server with all language versions +- `npm run build` - Build the production version +- `npm test` - Run the test suite +- `npm run lint` - Check code style and formatting +- `npm run prettier` - Format code automatically + Use the table of contents icon Table of contents icon on the top right corner of this document to navigate to a specific section quickly. ## Contributing