-
Notifications
You must be signed in to change notification settings - Fork 4
docs: add contributing guide for website contributions #147
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
Open
bendichter
wants to merge
1
commit into
main
Choose a base branch
from
contributing-guide
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,175 @@ | ||||||||||||||||||||||||||||||||||||
| --- | ||||||||||||||||||||||||||||||||||||
| title: "Contributing to This Website" | ||||||||||||||||||||||||||||||||||||
| description: "Guide for contributing to the NWB website through GitHub" | ||||||||||||||||||||||||||||||||||||
| --- | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
|
Comment on lines
+1
to
+5
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think if we just add a brief introduction with a short list of links to the various other documents, would help make this a more general guide for how to contribute to NWB. What do you think?
Suggested change
|
||||||||||||||||||||||||||||||||||||
| This guide provides instructions for contributing to the NWB website. Whether you want to fix a typo, add new content, or improve existing pages, we welcome your contributions! | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| ## Overview | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| The NWB website is hosted on GitHub at [NeurodataWithoutBorders/neurodatawithoutborders.github.io](https://github.com/NeurodataWithoutBorders/neurodatawithoutborders.github.io). The site is built using [Hugo](https://gohugo.io/), a fast and flexible static site generator. | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| ## Quick Edits (For Small Changes) | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| For minor edits like fixing typos or updating text, you can edit files directly on GitHub: | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| 1. Navigate to the [repository](https://github.com/NeurodataWithoutBorders/neurodatawithoutborders.github.io) | ||||||||||||||||||||||||||||||||||||
| 2. Find the file you want to edit in the `content/` directory | ||||||||||||||||||||||||||||||||||||
| 3. Click the pencil icon (✏️) to edit the file | ||||||||||||||||||||||||||||||||||||
| 4. Make your changes | ||||||||||||||||||||||||||||||||||||
| 5. Scroll down and create a commit message describing your change | ||||||||||||||||||||||||||||||||||||
| 6. Select "Create a new branch for this commit and start a pull request" | ||||||||||||||||||||||||||||||||||||
| 7. Submit the pull request | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| ## Local Development (For Larger Changes) | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| For more substantial contributions, we recommend setting up the site locally. | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| ### Prerequisites | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| - [Git](https://git-scm.com/downloads) | ||||||||||||||||||||||||||||||||||||
| - [Hugo](https://gohugo.io/installation/) (extended version recommended) | ||||||||||||||||||||||||||||||||||||
| - [Node.js](https://nodejs.org/) (for asset processing) | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| ### Step 1: Fork and Clone the Repository | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| 1. Fork the repository by clicking the "Fork" button at [https://github.com/NeurodataWithoutBorders/neurodatawithoutborders.github.io](https://github.com/NeurodataWithoutBorders/neurodatawithoutborders.github.io) | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| 2. Clone your fork locally: | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| ```bash | ||||||||||||||||||||||||||||||||||||
| git clone https://github.com/YOUR-USERNAME/neurodatawithoutborders.github.io.git | ||||||||||||||||||||||||||||||||||||
| cd neurodatawithoutborders.github.io | ||||||||||||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| 3. Add the upstream remote: | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| ```bash | ||||||||||||||||||||||||||||||||||||
| git remote add upstream https://github.com/NeurodataWithoutBorders/neurodatawithoutborders.github.io.git | ||||||||||||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| ### Step 2: Install Dependencies | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| ```bash | ||||||||||||||||||||||||||||||||||||
| npm install | ||||||||||||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| ### Step 3: Run the Development Server | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| ```bash | ||||||||||||||||||||||||||||||||||||
| hugo server -D | ||||||||||||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| This will start a local server at `http://localhost:1313/`. The site will automatically reload when you make changes. | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| ### Step 4: Make Your Changes | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| Create a new branch for your changes: | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| ```bash | ||||||||||||||||||||||||||||||||||||
| git checkout -b my-feature-branch | ||||||||||||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| Make your edits to the relevant files in the `content/` directory. | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| ### Step 5: Submit a Pull Request | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| 1. Commit your changes: | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| ```bash | ||||||||||||||||||||||||||||||||||||
| git add . | ||||||||||||||||||||||||||||||||||||
| git commit -m "Description of your changes" | ||||||||||||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| 2. Push to your fork: | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| ```bash | ||||||||||||||||||||||||||||||||||||
| git push origin my-feature-branch | ||||||||||||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| 3. Go to the [original repository](https://github.com/NeurodataWithoutBorders/neurodatawithoutborders.github.io) and click "New Pull Request" | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| 4. Select your branch and submit the pull request with a clear description of your changes | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| ## Content Structure | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| The website content is organized in the `content/` directory: | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| | Directory | Description | | ||||||||||||||||||||||||||||||||||||
| |-----------|-------------| | ||||||||||||||||||||||||||||||||||||
| | `content/about-nwb/` | Information about NWB | | ||||||||||||||||||||||||||||||||||||
| | `content/events/` | Event pages and announcements | | ||||||||||||||||||||||||||||||||||||
| | `content/news/` | News articles and updates | | ||||||||||||||||||||||||||||||||||||
| | `content/tools/` | Software tools (core and community) | | ||||||||||||||||||||||||||||||||||||
| | `content/publications/` | Publications, papers, and citations | | ||||||||||||||||||||||||||||||||||||
| | `content/faq/` | Frequently asked questions | | ||||||||||||||||||||||||||||||||||||
| | `content/community/` | Community resources | | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| ## Adding New Content | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| ### Adding a News Post | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| Create a new markdown file in `content/news/`: | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| ```markdown | ||||||||||||||||||||||||||||||||||||
| --- | ||||||||||||||||||||||||||||||||||||
| title: "Your News Title" | ||||||||||||||||||||||||||||||||||||
| date: 2025-01-15 | ||||||||||||||||||||||||||||||||||||
| --- | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| Your news content here... | ||||||||||||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| ### Adding an Event | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| Create a new markdown file in `content/events/`: | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| ```markdown | ||||||||||||||||||||||||||||||||||||
| --- | ||||||||||||||||||||||||||||||||||||
| title: "Event Name" | ||||||||||||||||||||||||||||||||||||
| date: 2025-01-15 | ||||||||||||||||||||||||||||||||||||
| event_date: "January 20-22, 2025" | ||||||||||||||||||||||||||||||||||||
| location: "Location Name" | ||||||||||||||||||||||||||||||||||||
| --- | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| Event description and details... | ||||||||||||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| ### Adding a Community Tool | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| See our dedicated guide: [Integrating Community Software with NWB](/contributing-tools/) | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| ## Page Format | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| Most pages use Markdown with YAML front matter. The front matter includes metadata like: | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| ```yaml | ||||||||||||||||||||||||||||||||||||
| --- | ||||||||||||||||||||||||||||||||||||
| title: "Page Title" | ||||||||||||||||||||||||||||||||||||
| description: "Brief description of the page" | ||||||||||||||||||||||||||||||||||||
| weight: 1 # Optional: controls ordering in lists | ||||||||||||||||||||||||||||||||||||
| --- | ||||||||||||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| ## Style Guidelines | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| - Use clear, concise language | ||||||||||||||||||||||||||||||||||||
| - Follow existing formatting conventions | ||||||||||||||||||||||||||||||||||||
| - Include links to relevant resources | ||||||||||||||||||||||||||||||||||||
| - Add images to `static/images/` and reference them in your content | ||||||||||||||||||||||||||||||||||||
| - Test all links before submitting | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| ## Getting Help | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| If you have questions or need assistance: | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| - Open an issue on [GitHub](https://github.com/NeurodataWithoutBorders/neurodatawithoutborders.github.io/issues) | ||||||||||||||||||||||||||||||||||||
| - Visit the [NWB Help Desk](https://github.com/NeurodataWithoutBorders/helpdesk/discussions) | ||||||||||||||||||||||||||||||||||||
| - Join the [NWB Slack workspace](https://nwb-users.slack.com/) | ||||||||||||||||||||||||||||||||||||
| - Contact us through the [Contact Us](/contact-us/) page | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| ## Code of Conduct | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| All contributors are expected to follow our [Code of Conduct](/code_of_conduct/). | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| Thank you for helping improve the NWB website! | ||||||||||||||||||||||||||||||||||||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would just call it "Contributing"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think if we just call it "Contributing" it will seem like a page about contributing to the NWB project in general, not a page specifically about contributing to this website
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree. I think the answer here depends on if you like my suggestion for updating the page. Feel free to accept/reject these two suggestions as you see fit. I think either way is Ok. I just figured it would be easy to turn this into a bit broader page if we provide linkages to the other related docs.