Help spread the site by linking the relevant pages when answering questions on ZeroNet.
Cannot find something useful? Post a request in the Discussion Forum.

You are reviewing and older version of this page.

Restore this version View current version

ZeroNet documentation for developers

In this wiki we collect various tutorials and documentation for ZeroNet functionalities. Our hope is that collaborative editing of the wiki will make it a very useful resource for all ZeroNet devs.

This is also a protest against ZeroNet non-existant documentation, a giant hole which we hope will be fixed soon. (Edit: maybe this is now changing thanks to anoa, that is writing the new official documentation)

To contribute please read below the topic list.

Cheat sheets: how to do things quickly

Are you in a hurry and just want to know how to do a certain thing? This is the right section to look in.

Tutorials for site owners

In this section you will find some tutorials that explain to a site owner how to manage some of things of his site:

Tutorials for site creators

What follows are some tutorials spliced into Beginners, Medium and Advanced topics that will allow you to start create your own site-kind. Many of them are not yet written, so to really get developers started the series of tutorials by imachug called the truth about ZeroNet is really advised. They are a bit old (dating September 2017) but very good to start.

Beginners

Basics of site organizations and of content publishing. Be aware that basic tutorials are thought to be read in-order because they may use something that is explained in previous ones.

  1. Basic overview of sites on ZN and what they can contain AKA can I use PHP?
  2. Deploying a static site
  3. Basics of site organization and folder structure
  4. Write your own ZeroBoard: a global guest log
  5. Write your own ZeroTalk: a simple forum
  6. Complete content guide: understand all nitty witty details of the various content.json
  7. Complete database guide: all details of dbschema.json

Medium

Things that you need if you want to develop a medium complex site. These tutorials can be read in no particular order, since they should talk about orthogonal features. It is assumed that you have read and understand all basic tutorials. You may also be interested in reading the section "ZN design and code details" to gain a better understanding of some features.

Advanced

Topics that you may not even need, but they are here for the perfectionists. Be aware that these topics may not include full source code, but only give you ideas and relevant parts of source.

Stairway to plugins

Everything you must know about how to write a plugin. Some articles do not depend on the previous ones, but it may be better to read them in-order. Also the articles are very short, so it shouldn't take too much.

  1. Current plugin architecture: how to write a do-nothing plugin
  2. Plugin - Simple API command: expose a simple API command to the sites
  3. Plugin - Asking the user: ask a question to the user using standard prompts
  4. Plugin - Permissions: adding a new permission to ZeroNet
  5. Plugin - Adding translation: how to add translations to our messages
  6. Plugin - Intercepting file update: create your custom rules on json file update

After having done all the basics of plugin, you should read description of ZeroNet main classes to better know how to structure your plugin.

ZN Design and code details

Pages that talk about current ZN design (please be sure to insert the version/revision you are talking about) and/or document tough code parts.

Lists of useful developers resources

Pages that are lists of links to useful available resources and their sites. This is NOT a list of known sites: please do not insert personal blog when not relevant (i.e. almost only contain developer things) and do not use them for self-promoting. Spam won't be tollerated.

How to contribute

If you want to contribute please see Contributing Guidelines. Reading those can help maintaining a common style across the whole wiki and in turn help first-time users of the wiki to better understand what you have written.

Before inserting a link in the main page please write about it in the discussion forum.

If you don't know what Markdown is, you can refer to the article Markdown from zero to hero. This will help you write good wiki pages.

Of course, but what can I do to contribute?

You have many available options to choose to:

  • Simply use the wiki and link to the relevant articles in discussion topics: this will help others know that this site exists.
  • Read the articles you may like to read and correct spelling or grammar errors, especially if your mothertongue is english. Also simplifying paragraphs is of big help, since many users may not have deep comprehension of the english language.
  • Correct logical errors in presentations, or add some historical notes about how such a thing was done before and why it has been changed.
  • Write new tutorial for something that you have done recently and had a lot of trouble to get done. It is especially useful to write what ways do not get you there and why, and to write the correct way to have it done.
  • Search for non-existent pages and write something clear about them.

Every contribution is always welcome, as long as it is done in good faith and is about ZN development. You may even copy text from other sources, as long as you have permission from the author either explicitly or implicitly (i.e. the content is licensed under a Creative Commons compatible licence).

This page is a snapshot of ZeroNet. Start your own ZeroNet for complete experience. Learn More