Show Menu
Cheatography

SDF Tutorials Cheat Sheet (DRAFT) by

Tutorial editing cheat sheet for SDF Public Access Unix

This is a draft cheat sheet. It is a work in progress and is not finished yet.

Tutorial File Locations

Tutorials
/sys/h­tml­/tu­torials
Tutorial Images
/sys/h­tml­/tu­tor­ial­s/i­mages

File Check-­out­/Ch­eck-in Process

Check-out
co -l filename
Check-in
ci -u filename

End descri­ption with a single ".".
 

HTML Style Guide

The code in tutorial files represents the contents of a
<bo­dy>
element, and must not contain the following elemen­ts/­tags:
<ht­ml>
/
</h­tml>

<he­ad>
/
</h­ead>

<me­ta>

<ba­se>

<bo­dy>
/
</b­ody>
Tutorial files also contain an RCS $Id tag, something like:
$Id:fi­len­ame.html,v 1.11 2011/01/01 11:11:11 username Exp $
. This is automa­tically generated by RCS and should be left as the last line of the file.
To maximize backwards compat­ibi­lity, try to restrict yourself to the following elements.
• Structural Elements
   
<h1>
, ...,
<h6>

• Groupi­ng/­Blo­ck-­Level Elements
   
<p>

   
<pr­e>

   
<ul>
,
<ol>
,
<dl>
and their subordinates
   
<bl­ock­quo­te>

   
<hr>

   
<ta­ble>
and its subordinates
   and, of course,
<di­v>

• Text-l­eve­l/I­nline Elements
   
<br>

   
<a>

   
<im­g>

   
<co­de>
,
<sa­mp>
, and
<kb­d>

   
<su­p>
and
<su­b>

   
<st­ron­g>
,
<sm­all>
, and
<em>

   
<i>
,
<b>
,
<u>
, and
<s>

   
<df­n>
,
<va­r>
, and
<ci­te>

Many closing tags are optional, but for code clarity they can be nice. Stay away from XHTML self-c­losing tag forms (ie.
<br­/>
,
<hr­/>
,
<img src="so­me_­url­"­/>
, et cetera).
 

Creating a new tutorial

Change your working directory to /sys/h­tml­/tu­torials.
cd /sys/h­tml­/tu­torials
Use umask to make sure your new file is readable.
umask 022
Create your new tutorial file.
echo -e "­\n­\$Id­\$" > your_t­uto­ria­l_f­ile­nam­e.html
Use ci -u to check-in and unlock the new file.
ci -u your_t­uto­ria­l_f­ile­nam­e.html
Enter a meaningful descri­ption for your new tutorial, end the descri­ption with a line with a single ".".
How to contribute to the SDF
.
Now your new tutorial file is created and you can edit it using the Editing a tutorial guide below.

Editing a tutorial

Change your working directory to /sys/­­htm­­l/­t­u­to­­rials.
cd /sys/­­htm­­l/­t­u­to­­rials
Use the command co -l to check out the tutorial file and lock it while you edit it.  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.
co -l filename
Edit the file using your preferred text editor.  If you save your work period­ically, you can load and reload the tutorial in your web browser to see your change­s.  The URL for the tutorial file will be http:/­/sd­f.o­rg/­?tu­tor­ial­s/f­ile­nam­e_w­ith­out­_ex­tension (eg. If you are editing /sys/h­tml­/tu­tor­ial­s/n­map­_fo­r_d­umm­ies.html, the URL will be http:/­/sd­f.o­rg/­?tu­tor­ial­s/n­map­_fo­r_d­ummies).
Check-in the updated tutorial.
ci -u filename
Describe the changes you've made to it. Be as terse as you like, but please write something useful.  End the descri­­ption with a line with a single ".".
Added a section on describing changes.
.
Your updated tutorial should now be checked back.

Note: If this is a new tutorial, once your tutorial is ready for public display you will also need to add it to the tutorials index by following the steps above for the index.html file in the tutorials directory.