2016-12-29 18:35:07 +01:00
|
|
|
# Contributing
|
|
|
|
|
2022-11-10 18:54:01 +01:00
|
|
|
Interested in contributing to the Material for MkDocs? Have a question? Want to
|
|
|
|
report a bug? Before you do, please read the following guidelines.
|
2016-12-29 18:35:07 +01:00
|
|
|
|
|
|
|
## Submission context
|
|
|
|
|
|
|
|
### Got a question or problem?
|
|
|
|
|
|
|
|
For quick questions there's no need to open an issue as you can reach us on
|
2021-11-07 18:23:01 +01:00
|
|
|
[gitter.im].
|
2016-12-29 18:35:07 +01:00
|
|
|
|
2021-11-07 18:23:01 +01:00
|
|
|
[gitter.im]: https://gitter.im/squidfunk/mkdocs-material
|
2016-12-29 18:35:07 +01:00
|
|
|
|
|
|
|
### Found a bug?
|
|
|
|
|
|
|
|
If you found a bug in the source code, you can help us by submitting an issue
|
2021-11-07 18:23:01 +01:00
|
|
|
to the [issue tracker] in our GitHub repository. Even better, you can submit
|
2017-01-07 20:08:49 +01:00
|
|
|
a Pull Request with a fix. However, before doing so, please read the
|
2021-11-07 18:23:01 +01:00
|
|
|
[submission guidelines].
|
2017-01-07 20:08:49 +01:00
|
|
|
|
2021-11-07 18:23:01 +01:00
|
|
|
[issue tracker]: https://github.com/squidfunk/mkdocs-material/issues
|
|
|
|
[submission guidelines]: #submission-guidelines
|
2016-12-29 18:35:07 +01:00
|
|
|
|
|
|
|
### Missing a feature?
|
|
|
|
|
|
|
|
You can request a new feature by submitting an issue to our GitHub Repository.
|
|
|
|
If you would like to implement a new feature, please submit an issue with a
|
2022-11-10 18:50:58 +01:00
|
|
|
proposal for your work first to be sure that it is of use to everyone, as
|
2020-10-18 11:38:45 +02:00
|
|
|
Material for MkDocs is highly opinionated. Please consider what kind of change
|
|
|
|
it is:
|
2016-12-29 18:35:07 +01:00
|
|
|
|
2017-09-07 14:19:29 +02:00
|
|
|
* For a **major feature**, first open an issue and outline your proposal so
|
2016-12-29 18:35:07 +01:00
|
|
|
that it can be discussed. This will also allow us to better coordinate our
|
|
|
|
efforts, prevent duplication of work, and help you to craft the change so
|
|
|
|
that it is successfully accepted into the project.
|
|
|
|
|
2017-09-07 14:19:29 +02:00
|
|
|
* **Small features and bugs** can be crafted and directly submitted as a Pull
|
2016-12-29 18:35:07 +01:00
|
|
|
Request. However, there is no guarantee that your feature will make it into
|
2020-03-10 11:55:25 +01:00
|
|
|
the `master`, as it's always a matter of opinion whether if benefits the
|
|
|
|
overall functionality of the project.
|
2016-12-29 18:35:07 +01:00
|
|
|
|
2022-09-18 15:51:59 +02:00
|
|
|
### Missing translations?
|
|
|
|
|
2022-11-10 18:50:58 +01:00
|
|
|
Material for MkDocs supports 50+ languages with the help of community
|
2022-09-18 15:51:59 +02:00
|
|
|
contributions. When new features are added, sometimes, new translations are
|
|
|
|
necessary as well. It's impossible for the maintainers of the project to update
|
|
|
|
all translations (we just don't speak 50+ languages), so we have to rely on
|
2022-11-10 18:50:58 +01:00
|
|
|
our contributors to update translations incrementally. This process is pretty
|
2022-09-18 15:51:59 +02:00
|
|
|
simple, so if you find a translation missing in your language, follow these
|
|
|
|
guidelines:
|
|
|
|
|
|
|
|
1. Fork the repository.
|
|
|
|
|
|
|
|
2. Open up the [translation file for your language] as well as the
|
|
|
|
[English translations], as they are always up-to-date. Compare them
|
|
|
|
side-by-side and add the missing translations. __Important__: only add the
|
|
|
|
translations that are different from the defaults, e.g. if your language
|
|
|
|
is left-to-right, don't add the `direction` translation, as English is
|
|
|
|
left-to-right as well. The following translations are for technical
|
2022-11-10 18:50:58 +01:00
|
|
|
purposes and should not be updated, so if they're missing from your
|
|
|
|
language, it's for good reason:
|
2022-09-18 15:51:59 +02:00
|
|
|
|
|
|
|
- `search.config.lang`
|
|
|
|
- `search.config.pipeline`
|
|
|
|
- `search.config.separator`
|
|
|
|
|
2022-11-10 18:50:58 +01:00
|
|
|
3. Create a PR (see below) with your changes.
|
2022-09-18 15:51:59 +02:00
|
|
|
|
|
|
|
[translation file for your language]: https://github.com/squidfunk/mkdocs-material/tree/master/src/partials/languages
|
|
|
|
[English translations]: https://github.com/squidfunk/mkdocs-material/tree/master/src/partials/languages/en.html
|
|
|
|
|
2016-12-29 18:35:07 +01:00
|
|
|
## Submission guidelines
|
|
|
|
|
|
|
|
### Submitting an issue
|
|
|
|
|
|
|
|
Before you submit an issue, please search the issue tracker, maybe an issue for
|
2022-11-10 18:50:58 +01:00
|
|
|
your problem already exists, and the discussion might inform you of workarounds
|
2016-12-29 18:35:07 +01:00
|
|
|
readily available.
|
|
|
|
|
2022-11-10 18:50:58 +01:00
|
|
|
We want to fix all the issues as soon as possible, but before fixing a bug, we
|
|
|
|
need to reproduce and confirm it. In order to reproduce bugs, we will
|
2016-12-29 18:35:07 +01:00
|
|
|
systematically ask you to provide a minimal reproduction scenario using the
|
2017-01-07 20:08:49 +01:00
|
|
|
custom issue template. Please stick to the issue template.
|
2016-12-29 18:35:07 +01:00
|
|
|
|
2022-11-10 18:50:58 +01:00
|
|
|
Unfortunately, we are not able to investigate / fix bugs without a minimal
|
|
|
|
reproduction scenario, so if we don't hear back from you, we may close the issue.
|
2016-12-29 18:35:07 +01:00
|
|
|
|
|
|
|
### Submitting a Pull Request (PR)
|
|
|
|
|
|
|
|
Search GitHub for an open or closed PR that relates to your submission. You
|
2017-01-07 20:08:49 +01:00
|
|
|
don't want to duplicate effort. If you do not find a related issue or PR,
|
|
|
|
go ahead.
|
|
|
|
|
2021-11-07 18:23:01 +01:00
|
|
|
1. **Development**: Fork the project, set up the [development environment],
|
|
|
|
make your changes in a separate git branch and add descriptive messages to
|
|
|
|
your commits.
|
2017-01-07 20:08:49 +01:00
|
|
|
|
2022-11-10 18:50:58 +01:00
|
|
|
2. **Build**: Before submitting a pull request, [build the theme]. This is
|
2022-11-10 18:54:01 +01:00
|
|
|
a mandatory requirement for your PR to get accepted, as the theme should be
|
|
|
|
installable through GitHub at all times.
|
2017-01-07 20:08:49 +01:00
|
|
|
|
2021-11-07 18:23:01 +01:00
|
|
|
3. **Pull Request**: After building the theme, commit the compiled output,
|
|
|
|
push your branch to GitHub and send a PR to `mkdocs-material:master`. If we
|
|
|
|
suggest changes, make the required updates, rebase your branch and push the
|
|
|
|
changes to your GitHub repository, which will automatically update your PR.
|
2016-12-29 18:35:07 +01:00
|
|
|
|
2016-12-29 19:06:47 +01:00
|
|
|
After your PR is merged, you can safely delete your branch and pull the changes
|
2016-12-29 18:35:07 +01:00
|
|
|
from the main (upstream) repository.
|
2017-01-07 20:08:49 +01:00
|
|
|
|
2021-11-07 18:23:01 +01:00
|
|
|
[development environment]: https://squidfunk.github.io/mkdocs-material/customization/#environment-setup
|
2022-03-04 08:13:36 +01:00
|
|
|
[build the theme]: https://squidfunk.github.io/mkdocs-material/customization/#building-the-theme
|