[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Best way to document console steps on a web page?



On Tuesday 03 May 2005 00:56, Peter Sebastian Masny wrote:
> Hi all,
>
> Features I would like:
>
> - console prompt support.  This has two aspects:
>    -- Copying text off of the web page selects only the code
>       and not the prompt or comments
>    -- Preformatting with appropriate prompts/colors
>          <user>su</user>
>          <root>cd install</root>
> - search
> - looks nice
> - a table of contents
> - ability for others to add comments
>
> Any suggestions?

Use CSS to modify the style of the code element.  You'll probably want to 
display it as a block, enable an unnumbered list style, and set the bullet to 
"$ " or something similar.  When you're done, you'll be able to just write:

<code>ls -l<br/>
drwxr-xr-x 2 joe  joe        55 Mar 12 19:55 File1<br/>
drwxr-xr-x 3 joe  joe        2 Mar  14 19:55 File2</code>

and have it display as:

------------------------------------------------------|
| $ ls -l                                             |
| drwxr-xr-x 2 joe  joe        55 Mar 12 19:55 File1  |
| drwxr-xr-x 3 joe  joe        2 Mar  14 19:55 File2  |
-------------------------------------------------------

Selecting will ignore the css, and only copy your text.  Likewise, for search 
engines etc.

As for comments and user editing etc... either start looking into wikis etc., 
or talk to a web developer, and have him/her make it for you, if you don't 
know how yourself.

p.s.: this is a web development question, not a debian one ;)

-- 
Lee.



Reply to: