Skip to content

Commit

Permalink
fix: remove license info if None
Browse files Browse the repository at this point in the history
  • Loading branch information
luizdesuo committed Nov 5, 2023
1 parent aa489ca commit 419aca4
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions {{cookiecutter.project_name}}/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# Contributor Guide

Thank you for your interest in improving this project.
{% if cookiecutter.license != 'None' -%}
This project is open-source under the [{{cookiecutter.license.replace("-", " ")}} license] and
welcomes contributions in the form of bug reports, feature requests, and pull requests.
{% endif -%}

Here is a list of important resources for contributors:

Expand All @@ -11,7 +13,9 @@ Here is a list of important resources for contributors:
- [Issue Tracker]
- [Code of Conduct]

{% if cookiecutter.license != 'None' -%}
[{{cookiecutter.license.replace("-", " ").lower()}} license]: https://opensource.org/licenses/{{cookiecutter.license}}
{% endif -%}
[source code]: https://github.com/{{cookiecutter.github_user}}/{{cookiecutter.project_name}}
{% if cookiecutter.publish -%}
[documentation]: https://{{cookiecutter.project_name}}.readthedocs.io/
Expand Down
4 changes: 4 additions & 0 deletions {{cookiecutter.project_name}}/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,12 @@ Please see the [Command-line Reference] for details.
Contributions are very welcome.
To learn more, see the [Contributor Guide].

{% if cookiecutter.license != 'None' -%}
## License

Distributed under the terms of the [{{cookiecutter.license.replace("-", " ")}} license][license],
_{{cookiecutter.friendly_name}}_ is free and open source software.
{% endif -%}

## Issues

Expand All @@ -81,7 +83,9 @@ This project was generated from [Dinkin Flicka Cookiecutter] template.

<!-- github-only -->

{% if cookiecutter.license != 'None' -%}
[license]: https://github.com/{{cookiecutter.github_user}}/{{cookiecutter.project_name}}/blob/main/LICENSE
{% endif -%}
[contributor guide]: https://github.com/{{cookiecutter.github_user}}/{{cookiecutter.project_name}}/blob/main/CONTRIBUTING.md
{% if cookiecutter.publish -%}
[command-line reference]: https://{{cookiecutter.project_name}}.readthedocs.io/en/latest/usage.html
Expand Down
4 changes: 4 additions & 0 deletions {{cookiecutter.project_name}}/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ end-before: <!-- github-only -->
---
```

{% if cookiecutter.license != 'None' -%}
[license]: license
{% endif -%}
[contributor guide]: contributing
[command-line reference]: usage

Expand All @@ -18,6 +20,8 @@ usage
autoapi/index
contributing
Code of Conduct <codeofconduct>
{% if cookiecutter.license != 'None' -%}
License <license>
{% endif -%}
Changelog <https://github.com/{{cookiecutter.github_user}}/{{cookiecutter.project_name}}/releases>
```

0 comments on commit 419aca4

Please sign in to comment.