views:

42

answers:

3

Let's say I want make some of my sources publicly available via my blog or other web location.

How do I properly indicate what Open Source license I've applied to the sources? For instance, with the MIT License or The Code Project Open License, should I put something at he top of the source files or should I have something on the web page, or both?

+2  A: 

The most common path is to include a licensing notice at the top of files inside block comments - that's the way most likely to ensure that anyone utilizing the code is aware of the license, since the only possible way for it to be decoupled from the code is someone intentionally removing it.

Amber
+2  A: 

Can't hurt to have it on both but you absolutely need to indicate it in the file itself. A LICENSE file at the root which indicates which license is used throughout would not be a bad idea either.

Daniel DiPaolo
+1  A: 

If you have separate code files, a COPYRIGHT file is suggested. If you post code on a blog, include the license at the top as comment lines. It is also acceptable to reference the license via a link at the top, instead of including it entirely in your code. See the QA at the last link regarding this.

/* Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php */
Wez