Things like this happen all the time. Stack Overflow, Google Devs...
First off, we need to look at ways to license.
- Stack Overflow works by licensing all content, text and code, under the Creative Commons Attribution Share Alike license.
- Google Developers works by licensing all code under the Apache 2.0 license, and all other content under the Creative Commons Attribution license.
We kind of see two models here. Single licensing everything (the Stack Overflow model), and selectively licensing everything (the Google model).
Second, we need to figure out who the audience is.
Let's make a table:
People Type | Code | Text |
| Read | Copy | Read | Copy |
Good Guys | Y | Y | Y | |
Bad Guys | Y | Y | Y | Y |
Your good guys are the people looking to learn. They will read the text, but likely won't copy it. As for the code, they may look at it, copy it, or modify it. The code is the main interest to the good guys.
Your bad guys are copying everything for the sole purpose of making money. That's a given.
Third, we need to figure out what to restrict.
Right now, we want to stop the bad guys from doing the bad things they do. But we want to let the good guys pass freely.
You need to restrict any activity whose direct intention is to profit off of your work. This would include activities such as scraping, re-hosting... etc. Fun stuff. To restrict that, would mean violating the Open Source Definition, as well as hampering the good guys.
Using the information above,
Your best bet is to incorporate the Google model. This is what I recommend going forward:
- License all code under the Apache 2.0 (or similar) license.
- License all other content (e.g. text, images, media) under the CC BY-NC license.
Why Apache and CC BY-NC?
Only the bad guys copy non-code content. The CC license stops copying of that content, while letting good guys use everything freely.
The good guys will be able to copy code, and use it in any application. Since they don't use textual content, they don't violate any license. Note however, that use of textual content is still governed by various legal doctrines, such as Fair Use or Fair Dealing, permitting uses such as research, education, commenting, and private study.
The bad guys will be able to copy code, however, they can't copy any text for commercial purposes. It puts them in an infringing position.
Now for your considerations (and how they would work with my proposed model):
I'd like to allow other people to submit tutorials. I'd like to guarantee that I can use those tutorials without becoming a bad guy myself. For example, I could see maybe collecting the tutorials into an ebook or something.
This would work, but there are some additional implications that you need to consider.
First, you need users to license contributions to you. Not a big deal, can be solved with a ToS (Terms of Service) agreement.
Second, is that you can't go after the bad guys. I'm shaky on this: I'm not familiar with legislation on these matters (most important would be the Digital Millennium Copyright Act). Here's the baseline though. To take action on any infringement, you must be the copyright owner, or an agent of the copyright owner. The problem with user contributions is that you are no longer the copyright owner. Assigning copyright is horrible - people will resist, and you require a physically signed paper. Therefore, you'd need to figure out a way to make yourself an "agent" (probably through the ToS). But I'm not completely sure how this works. It would be helpful to figure out how Stack Exchange deals with this.
There are multiple components to the site: the code (and its resources like image files), and the text (and screenshots of the running code), plus logos and whatnot. Maybe I should use a different license for different resources? That seems confusing though.
I proposed this above! It's not as confusing as it looks :)
I'm using GitHub pages, which introduces its own copyright requirements.
If the implications of GitHub pages only extend to what is included in this post, then you're fine.
It would be neat to make my site compatible with Stack Overflow's new Documentation feature. My tutorial site is set up with similar ideas: a tutorial on a topic followed by a bunch of examples of that topic. It would be cool if I could kill two birds with one stone and upload my tutorials and examples to the Documentation site. If I choose a license that requires attribution, how does that work? Maybe this deserves its own question (maybe on meta?).
Stack Overflow contributions are licensed under the CC BY-SA license. That's cool, but it isn't cool if you put forward contributions made by other users (which, assuming the model above, would be licensed under CC BY-NC, an incompatible license). Of course, if the only things you send to Documentation are your own work, then you can do it. You can do whatever you would like with your own work.
I'd note that even if you did send users contributions properly (i.e. user contributions were licensed with CC BY-SA), it would properly be unethical to do so, and you're somewhat becoming your own definition of a bad guy there.
The Your Post Is Tooo Long!!!! I didn't read...
- License code under Apache 2.0, or another similar permissive license
- License media under CC BY-NC or CC BY-SA, depending on your needs, and your way of dealing with infringers of content.