$ cd /sys/html/tutorials
==== Creating a New Tutorial ====
Inside the tutorials directory, you can use ''echo'' to quickly create an empty HTML file with an RCS Id tag at the bottom. Use the ''umask'' command first to make sure that the permissions on the new file will allow the web server (and other users) to read it.
$ umask 022
$ echo -e "\n\$Id\$" > your_tutorial_filename.html
Use the command ''ci -u'' to check-in the file with RCS and leave it unlocked it so that anyone can edit it.
$ ci -u your_tutorial_filename.html
The first time you check-in a file, you will be asked for a description of it. Please write something useful.
You may now edit your tutorial using the instructions in the [[#editing_an_existing_tutorial |next section]] to check the file in and out of RCS.
Once your tutorial is ready for public display, please add it to the list of available tutorials so people can actually find it on the web. You must edit the ''index.html'' file in the tutorials directory to do this. When editing the ''index.html'' file, use the same check-in/check-out procedure that you do when editing a tutorial.
==== Editing an Existing Tutorial ====
Inside the tutorials directory, use the command ''co -l'' to check out the file with RCS and lock it while you make your edits.
$ co -l filename
**If when using ''co -l'' you are told that the file is already locked please STOP what you are doing and wait for it to be checked back in. If it does not get checked back in, email the author and let them know you want to check out the file and edit it.**
You may now edit the file using your preferred text editor. If you save your work periodically, you can load and reload the tutorial in your web browser to see your changes. The URL for the tutorial file will be ''http://sdf.org/?tutorials/filename_without_extension'' (e.g., if you are editing ''/sys/html/tutorials/nmap_for_dummies.html'', the URL will be ''http://sdf.org/?tutorials/nmap_for_dummies'').
When you are finished editing the file, use the command ''ci -u'' to check the file back in with RCS and unlock it so that others may edit it.
$ ci -u filename
When you check-in a file, you will be asked to describe the changes you've made to it. Be as terse as you like, but please write something useful.
==== Editing the FAQs ====
MetaARPA users can also edit the [[http://sdf.org/?faq |FAQs]]. These are plain text files, found in ''/sys/html/tutorials/FAQ/''. The list of FAQs for each section is in a dotfile ‘''.list''’. These FAQ files are synced regularly with those shown by the ''faq'' command.
===== Coding A Tutorial =====
Tutorials are coded using HTML. If you are already handy with HTML, then you are just moments away from editing your tutorial! Please read the [[#before_you_start_coding |Before You Start Coding]] section for some implementation specifics, and at least skim the [[#coding_style |Coding Style]] section before proceeding.
If you are **not** familiar with HTML, the W3C site has a very brief tutorial, [[http://www.w3.org/MarkUp/Guide/ |Getting Started With HTML]], which will teach you enough of the rudiments to be able to author a tutorial. In addition, the [[#html_template |template]] on this page is furnished with ample comments to help HTML beginners.
If you don't have the time or inclination to learn HTML, you may still be able to contribute to the Tutorials Project. Write a tutorial (or a section, correction, addendum, etc.) in plain text and tack a note in ''bboard:
Correct:
Notes
- James Bartles, Boogers For Breakfast
(Sacramento: Wine Cooler Press, 1979), 74.
- Delron Moribund, "Crossover Calisthenics",
Travesties of Better Judgement 64 (2009): 56-60.
Then, where the sources are cited in the text of your tutorial, use a superscript ( '' '' ) number or a number in parenthesis hyperlinked to the appropriate list item.
The secret to a proper nose-goblin ganache is in the picking1. (...)
Or,
Without adequate stretching beforehand, you are certain to suffer a
Ludmilian haemorrhage(2). (...)
There are further examples of this in the [[#html_template |code template]] below.
==== Which HTML Version? ====
The current W3C recommendation is [[http://www.w3.org/TR/html5/ |HTML 5]]. In most respects, the core elements of HTML haven't changed since the mid 1990s; some tags have been added, and some removed. To maximize backwards compatibility, you might * restrict yourself to the following elements, which have gone unchanged since 1996:
* Structural Elements
* '''', …, ''''
* Grouping/Block-Level Elements
* ''
''
* ''
''
* ''
'','''', '''' and their subordinates
* ''''
* ''
''
* ''