jSite HowTo
This is a jSite tutorial. jSite is about inserting freesites, so we'll see how to actually insert a freesite.In order to do that, we'll need a freesite to insert (makes sense, huh?)
Freesites
You'll find literally thousands of html tutorials everywhere on the internet, so we'll skip that part and jump directly to the part about inserting your site into the Freenet network. However, a quick Freenet-specific word about website building is necessary:Links
When linking to other freesites (or linking back to your own freesite, for that matter) do NOT hardcode 127.0.0.1:8888 in your links!!<a href="http://127.0.0.1:8888/USK@blahblahEA/freesite/0/"> <-- BAD
<a href="/USK@blahblahEA/freesite/0/"> <-- GOOD
Limitations
Freesites are basically HTML, just like 'regular' websites, but Freenet is limited by a number of factors; different aspects of security are probably the biggest limiting factor (you can't allow stuff that would compromise the user's anonymity), and another serious problem is the insufficient number of 'man-hours': Freenet has few developers and little money, there is way more work to do than what the quantity of man-hours available can cover. (want more development faster? How about some contribution?)With all those security and 'not-supported-yet' limitations, freesites tends to look pretty '90's-style', compared with what you see on the 'regular' web.That's the price to pay for anonymity and freedom from censorship, so keep your html simple, have a look at existing freesites to figure out what you can or cannot do, build your freesite locally keeping all the files in one folder (that may include subfolders), and finally launch jSite.
activelinks
You may want to add an activelink to your freesite.These are used by Freenet web spiders to keep track of freesites: if your freesite has an activelink it will be easier for it to get listed on index sites.
To add an activelink to your freesite, create a .png image 108x36 pixel in size. Yes, that's small. So don't make it too complicate or it will look like a multicolored mess.
Save your image as activelink.png and drop it in your freesite's main directory. That's it. Your site now has an activelink.
Running jSite
First of all, create a jSite directory (a new folder called jSite) and drop jSite.jar in it, then place the jSite directory where you keep your Freenet stuff (e.g. inside your Freenet folder). You may want to create some shortcuts or not, but basically, you're good to go.Example insert
In our example, we are running Freenet and jSite on Ubuntu and we want to upload a simple freesite that we have built locally and saved it in:/home/luke/my freesites/my first freesite
(yes, 'luke' is my username. Brilliant deduction, Watson)
jSite is installed in: /home/luke/freenet/jSite/jsite.jar
To launch jSite, open a terminal and type: cd freenet/jSite to Change Directory, then hit Enter. At the next line type: java -jar jSite.jar, and hit Enter
=NOTE:= Don't close the terminal window, that would cause jSite to crash. You may want to use & at the end of the line and close the terminal with exit
=NOTE2:= do not launch jSite with one line directly from your home directory (e.g. java -jar /home/<user>/freenet/jsite/jSite.jar); that would create jSite files and folders in your home directory rather than in the jSite folder. Cd to the jSite folder first, then run with java -jar jSite.jar
=NOTE3:= On Windows or Mac OSX, you may run jSite (or any other executable .jar file) double-clicking on it. Running with java -jar from a cmd shell would work too.
Add new project
When you run jSite for the first time your projects' list will be empty (you haven't added any projects, yet) and almost all the buttons will be greyed out. You have only three available buttons: Add project, Manage Nodes and Quit.The 'Manage nodes' buttons opens the same interface that you can open from the Nodes menu at the top of the window. You need to use the 'Manage nodes' interface only in case you're running jSite on one computer while the Freenet node that jSite is supposed to use is running on a different machine.
Our node is local, so we don't need to use the Manage nodes interface.
Good.
Another option that you have is the Languages menu in the top-left corner. Five languages are currently available. (you may submit new translations for the jSite interface to bombe@freenetproject.org or to the develpment mailing list) or contact Bombe over FMS (jSite board). Or phone him. Or make smoke signals.

Click Add project ( Click to view full-size image )

1 - Keys are generated as soon as you click Add project ( Click to view full-size image )
2 - The site name is added as-you-type

1- Avoid spaces in the freesite's name to keep it easy to read ( Click to view full-size image )
2- Click 'Browse' to choose the local directory where your freesite is
Freesite Path
or 'name of the freesite'
The Freesite path line is where you type the 'name' of your freesite.This will be the final part of your freesite's URI, most of which is a non-human-readable string that looks like an apparently random series of characters.
At the end of the string is the sequence AQACAAE followed by a slash and (here it is) the 'name' that you entered in the 'Freesite path' field, which in turn is followed by another slash and the version (update) number, starting from zero.
In our example, we typed my-first-freesite at the 'Freesite path' line, and we inserted a new freesite, not an update. Therefore, the key will look like this:
USK@<series-of-characters>AQACAAE/my-first-freesite/0/
and when we insert the first update, the /0/ at the end of the line will turn into /1/.
If you want to keep the final part of your URI easy to read for humans (or space aliens, for that matter), you don't want to use spaces in the 'Freesite path' line that you type in jSite.
Using 'my first freesite' with spaces between words, would turn the final URI into:
USK@<series-of-characters>AQACAAE/my%20first%20freesite/0/
which is still readable with some effort but surely not as good looking (and easy to read) as my-first-freesite or even better my_first_freesite.
By the way, this goes for any insert, not only freesites: if you want filenames that are easy to read in your URI's, avoid spaces! Before inserting my awesome holiday video 2008.avi, change the name to my_awesome_holiday_video_2008.avi
Freesite paths:
my very first freesite <-- BAD (spaces)my_very_first_freesite <-- GOOD (underscores or dashes)

1 - Click 'Browse to open the file browser ( Click to view full-size image )
2 - Navigate to the directory that contains your freesite's folder and select the folder containing your freesite
3 - Click 'Choose'
4 - Click 'Next'
Default file
After clicking 'Next' you will be presented with a list of all the files that are in the folder that you selected, including the files located in subfolders. Folders are not listed.
1 - select default file (freesite's home page), usually 'index.htm' ( Click to view full-size image )
2 - set the file you selected as default file (check the checkbox)
3 - MIME type is usually picked automatically. if it's not, set it to text/html (or what's appropriate)
4 - click 'Insert now'
Cross your fingers and click Insert now
This is the moment of truth. If you have done something wrong (or more exactly, if you have done something so wrong that jSite can't insert your freesite, a warning will pop up and tell you about the problem. If you see the following screen, you're OK.
Inserting may take some time ( Click to view full-size image )
Insert now
The actual insertion requires some time: from a few minutes up to a couple of hours for a really heavy freesite. Inserting a regular size freesite usually takes 15 minutes or less.
1 - click OK ( Click to view full-size image )
2 - click 'Copy URI to clipboard'
Save your URI
Paste your URI in text file; when you want to announce your freesite on the FMS 'sites' board or somewhere else, copy the URI from your text file and paste it in a message, or use it as the target for a link in another freesiteNote that the URI that you paste won't include the last slash.
The final part of the URI will look like blahblahAAE/my-first-freesite/0 rather than blahblahAAE/my-first-freesite/0/ with a slash at the end.
I suggest you add the final slash manually so the URI will work without problems for a larger number of users.
Oops!
I closed jSite but I forgot to copy the URI to clipboard! Do I have to reinsert the freesite to get the key?NO
Just launch jSite, select your project, and click 'copy URI to clipboard'

1 - select your project ( Click to view full-size image )
2 - click 'Copy URI to clipboard'
that would be all
Don't forget to show me your new freesitesalutame a soreta!