7

If I made a somewhat complicated website, and I want it (the layout/JavaScript) to be under a copyleft license (but not the text), which license should I use?

I want to pull others' forks so I have to obey my own license.

Would GPL require that all the content also be licensed under the GPL?

3
  • Hey there and welcome to OpenSource.SE. As it is, this question seems unanswerable. You ask more than one question and don't provide enough inormation for us to answer the main one. We need to know more about what is important to you to recommend a license.
    – overactor
    Aug 2, 2015 at 6:29
  • 1
    The way I read this question, it is perfectly answerable. What copyleft license is suitable for the code (client and server side), the html structure and css of a website, and would this license have an effect on the text content of the website.
    – Martijn
    Aug 2, 2015 at 7:38
  • To me, it looks like there is only one single license that fits all the criteria listed by the OP. That is not consistent with the question being "unanswerable" (so I answered it), or "too broad". Aug 3, 2015 at 3:19

1 Answer 1

7

First, let's look at your content concerns:

Would GPL require that all the content also be licensed under the GPL?

No, all variations of the GPL has some clause that ensures that any content is excluded from the license. Here is the text used in AGPLv3:

A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. (my emphasis)

While the legalize may seem hard to parse, it is just a reminder that copyright law does not regard the content as a derivative work of any program code or markup used to create the layout and functionality for that content. Instead, such a combination is a said to be a mere aggregate and that the copyleft clause of the license does not apply to other parts (i.e. the non-code) of that aggregate.

The cited clause in the AGPL is not really required, as it is just a reminder stating that this separation between content and code is a part of copyright law, but it is helpful to have such a reminder.

It should be noted that such a clause is absent from CC BY-SA. This is because the CC-licenses are created specifically for content. However, you can still refer to copyright law and just state that your content is a mere aggregate and shall not be licensed under any CC-license. However, Creative Commons do not recommend that you use CC-licenses for software, and I agree.

While there is need to worry about the license being applied to your content, if you intend that others should use your HTML and Javascript good design practice would be to separate the two. This means that instead of making your entire website (including its content) available for sharing (by putting it on GitHub or similar site), you should create a proper template consisting of only the components (HTML, CSS, Javascript) you want to share + some dummy content where necessary. Finding your entire site (code + real content) on GitHub may confuse some people, and will also make it harder for them to use your template.

You also want a copyleft license, which means we're left with: GPLv2, GPLv3, and AGPLv3. (CC BY-SA is also copyleft, but it is already deemed unsuitable.)

Since this is for a website, forks may not be distributed, but instead used for alternative web-sites.

As the copyleft clauses in GPLv2 and GPLv3 (and CC BY-SA) only applies in case of re-distribution, they may not be effective making sure a modified website-design being made publicly available. This means that all these licenses are less suitable for a website-design if you care about copyleft.

Some people argue that there is no difference between GPL and AGPL for code executed in the browser. However, there is no consensus about this being the case. AFAIK, the applicability of GPL to the client side components of SaaS has never been tested in court. Because of this uncertainty, I do not recommend using GPL for HTML, CSS or Javascript.

That leaves the AGPLv3. This is a variant of GPLv3. The difference (compared to GPLv3) is that AGPLv3 requires anyone who creates a derivative work, based upon your HTML and JavaScript, and makes the result available on the world wide web, to provide some means to download their modifications.

5
  • Overall very good answer. However, I don't understand why you dismiss the GPL. Are you claiming that sending HTML/CSS/JS over the network is not distribution? It seems to be in contradiction with the answer to this question opensource.stackexchange.com/questions/4303/…
    – Zimm i48
    Aug 21, 2016 at 18:24
  • @Zimmi48, the OP wants to "pull others forks". Let's assume Consultant One has created a website for a client based upon forking and enhancing some GPL-licensed template/skin. Client gets access to his site by means of SaaS. The two have a falling out and Consultant One is fired. SaaS site is taken down. Client demands to get a copy of the GPL-licensed "source code" (i.e. the GPL-licensed template/skin derivative work incorporating any enhancements created by Consultant One) for newly hired Consultant Two. Consultant One refuses, arguing that GPL does not apply to SaaS. Would you go to court? Aug 22, 2016 at 7:58
  • Are you talking about a PHP template which generates the website on demand or an HTML template which was compiled once by a static site generator?
    – Zimm i48
    Aug 22, 2016 at 9:40
  • @Zimmi48, I am talking specifically about the type of HTML/CSS/Javascript template that is mentioned to in the question (i.e. not a PHP or other kind of server-side script template that produces HTML). Aug 23, 2016 at 3:46
  • you should host your content publicly (i do). this helps readers fix typos, clarify things, note that something is offensive (etc.) by creating an issue or even submitting a pull request. anything private can still be done over email. you can almost always bundle content with different licenses, just mention it in the root or in each file. Mar 29, 2019 at 4:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.