Nanoc is the effort of dozens of people. Contributions are welcomed, no matter how small. This page shows the different ways you can make a difference to Nanoc.
Making a donation
Donations for Nanoc are no longer accepted at this time. If you like Nanoc and want to show your support, consider donating to a worthy cause — how about one to help people whose lives and livelihoods are shattered by conflict and disaster?
If you find a bug in Nanoc, you should report it! But before you do, make sure you have the latest version of Nanoc (and dependencies) installed, and see if you can still reproduce the bug there. If you can, report it!
When reporting a bug, please make sure you include as many details as you can about the bug. Some information that you should include:
- The Nanoc version (nanoc --version), including the Ruby version
- The crash.log file, if the bug you’re reporting is a crash
- Steps to reproduce the bug
Submitting feature requests
If you have an idea for a new feature, start a discussion on the Nanoc Google group.
To contribute code, you need a basic knowledge of git. The Try Git interactive tutorial is quite good for getting up to speed.
Before you start coding, make sure that the idea you have fits with Nanoc’s philosophy. Start a thread on the discussion group or find us on the Gitter channel. Generally speaking, all bug fixes are accepted, while feature changes need more discussion.
To fetch the latest Nanoc source code, clone the Git repository:
~% git clone git://github.com/nanoc/nanoc.git
Create a new branch. Pick a good name; the convention is to prefix the branch name with
bug/ when it is a bug and with
feature/ if it is a feature. Once you’ve picked a branch name, create the branch:
nanoc% git checkout -b bug/fix-colors-on-windows
Nanoc uses Bundler to manage its development dependencies. Run bundle install to install all dependencies necessary for development and testing.
Now you can make modifications to the source code. You can find the source code in lib and the tests in test. Make sure that your changes have test cases that cover the bug fix or the new/changed functionality. To run the tests, do one of the following:
- To run all tests, run bundle exec rake.
- To run style checks, run bundle exec rake rubocop.
- To run a specific test file, run bundle exec m path_to_test_file from a subdirectory.
- To run a specific spec file, run bundle exec rspec path_to_spec_file from a subdirectory.
To test your locally modified version of Nanoc on a local Nanoc site, edit your site’s Gemfile and let the Nanoc gem point to the locally modified version:
gem 'nanoc', path: '/home/denis/projects/nanoc'
Finally, create a pull request. Once submitted, your work here is done. We’ll review the code, have a discussion and merge it once we’re satisfied.
If you’re a release manager, you can follow these steps to release a new version of Nanoc.
Before you start, ensure that you have access to the following:
- GitHub push access
- RubyGems push access
- Twitter access
If you are missing any of these, let me (Denis) know and I’ll set you up.
Preparing for a release
Preparing a release means ensuring that the version that is about to be released meets the requirements. To prepare for a release, follow these steps:
- Ensure the
Nanoc::VERSIONconstant is set to the right version. Keep in mind that Nanoc follows the Semantic Versioning standard.
- Ensure the release notes in the NEWS.md file are up-to-date, and that the release date is correct.
- Run the tests using bundle exec rake.
- As a final check, compile the Nanoc site with the Nanoc gem in the Gemfile pointing to your local Nanoc working copy, and verify locally that the release notes page is as expected.
Releasing the new version
Run scripts/release. It should just work!
Spread the word
To announce the new release, follow these steps:
- In the nanoc.ws repository, upgrade Nanoc. The web site will be built and published automatically.
- Send a tweet from the @nanoc_ssg Twitter account.
- Update the version mentioned on the Nanoc Wikipedia page.
Contributor Covenant Code of Conduct
We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation.
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
Examples of behavior that contributes to a positive environment for our community include:
- Demonstrating empathy and kindness toward other people
- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
- Focusing on what is best not just for us as individuals, but for the overall community
Examples of unacceptable behavior include:
- The use of sexualized language or imagery, and sexual attention or advances of any kind
- Trolling, insulting or derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or email address, without their explicit permission
- Other conduct which could reasonably be considered inappropriate in a professional setting
Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at email@example.com. All complaints will be reviewed and investigated promptly and fairly.
All community leaders are obligated to respect the privacy and security of the reporter of any incident.
Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
Community Impact: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
Consequence: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
Community Impact: A violation through a single incident or series of actions.
Consequence: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
3. Temporary Ban
Community Impact: A serious violation of community standards, including sustained inappropriate behavior.
Consequence: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
4. Permanent Ban
Community Impact: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
Consequence: A permanent ban from any sort of public interaction within the community.
This Code of Conduct is adapted from the Contributor Covenant, version 2.1, available at https://www.contributor-covenant.org/version/2/1/code_of_conduct.html.
Community Impact Guidelines were inspired by Mozilla's code of conduct enforcement ladder.