I have a non-trivial amount of text, image, audio, and video content that I'm licensing as Creative Commons Attribution 4.0 International (CC BY 4.0). I chose this license because it allows people to redistribute, use or remix the content that I produce for any purpose, as long as I am properly attributed. I hope to apply this license to a site as a whole, since it applies to the vast majority of the content.
However, mixed in with this content is software source code. Are there any special concerns that I need to be aware of, with respect to license marking?
I know that:
- The instructions for the Apache license say to include a
LICENSEfile in the project and a statement in the header of each source file. There's no way to include a
LICENSEfile in something like a Gist or a web page, but the content header is achievable. However...
- Including the license content or the Apache required header can be obnoxious for every code block on a CC-BY page. It's far less of a problem on a Gist page, though. There may be a way to mark a page that appropriately indicates the license of source code on the page in a good way, but I haven't found guidance.
- Creative Commons doesn't provide guidance for marking a mixed-content page on their page for marking guidance.
Ultimately, I think this boils down to two closely related questions:
- How should I appropriately mark source code posted to something like a GitHub Gist, where it is only a single file, especially when the license recommends a
- How should I appropriately mark source code when posting it on CC-BY page?
My questions are somewhat related to two other questions here on Open Source:
- Can I "Override" a licensing policy?
- How to license Stack Overflow contributions as permissive as possible?
There are a few differences, though. What I'm asking is closest to the how-to question, but unlike Stack Overflow, I don't have a profile page to use to add a disclaimer that I'm overriding a license and applying a dual-license. I'm also interested in not dual-licensing content, but applying a specific license (CC-BY 4.0) to one type of content (non-software content) and another license (Apache, BSD, MIT, etc.) to another type of content (source code).