Skip to content
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

Add a common license footer for docs #45

Closed
dewitt opened this issue Jun 28, 2018 · 3 comments
Closed

Add a common license footer for docs #45

dewitt opened this issue Jun 28, 2018 · 3 comments
Assignees

Comments

@dewitt
Copy link
Contributor

dewitt commented Jun 28, 2018

Confirmed with counsel, and we have a recommended way of communicate the license on docs, including docs which contain inline code samples. In addition to the top-level LICENSE file in the repository containing the text of the Apache License 2.0 (already done), we should add the following footer to each doc:

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License.

In Markdown, just copy the following text verbatim:

Except as otherwise noted, the content of this page is licensed under the
[Creative Commons Attribution 4.0 License](https://creativecommons.org/licenses/by/4.0/),
and code samples are licensed under the
[Apache 2.0 License](https://www.apache.org/licenses/LICENSE-2.0).
@rgregg
Copy link
Contributor

rgregg commented Jun 28, 2018

Anyone have a script that makes adding this easier than a copy and paste across 30-40 files?

@dewitt
Copy link
Contributor Author

dewitt commented Jun 29, 2018

for f in **/*.md; do
  cat << EOF >> $f

Except as otherwise noted, the content of this page is licensed under the
[Creative Commons Attribution 4.0 License](https://creativecommons.org/licenses/by/4.0/),
and code samples are licensed under the
[Apache 2.0 License](https://www.apache.org/licenses/LICENSE-2.0).
EOF
done

(Caveat, not tested. )

@rgregg
Copy link
Contributor

rgregg commented Jul 19, 2018

Tweaked it slightly, just to add a separator.

for f in **/*.md; do
  cat << EOF >> $f

---

Except as otherwise noted, the content of this page is licensed under the
[Creative Commons Attribution 4.0 License](https://creativecommons.org/licenses/by/4.0/),
and code samples are licensed under the
[Apache 2.0 License](https://www.apache.org/licenses/LICENSE-2.0).
EOF
done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants