Posted on: 11/30/07 05:45pm
By: Anonymous (xiao_haozi)
Hi all,
I couldn't come up with a good solution myself so I implore your help.
I have a site that I post tutorials and guides for Linux [http://mutaku.com] and was trying to come up with a good way to separate code or cli commands from the rest of the guide text. Currently I just bold these parts but I would like maybe throw each in a small table to have a different background maybe.
So my question is, what do you guys do to post code or cli commands in a story...what works best, what looks best, etc.
Thanks in advance!
Re: Posting Code to Geeklog Site
Posted on: 12/01/07 03:23am
By: Dirk
Did you see the [code] tag (not to be confused with the HTML <code> tag) that Geeklog has?
bye, Dirk
Re: Posting Code to Geeklog Site
Posted on: 12/01/07 01:05pm
By: Anonymous (xiao_haozi)
Hi Dirk,
Yeah I tried out [code] and it seemed to just change the font a bit to a smaller semi-italicized form.
This worked in differentiating it a bit, but I was curious as to whether there were tricks people used to make it stand out a bit more.
Another option I found was to maybe just create a new css class for a different colored font:
http://www.geeklog.net/forum/viewtopic.php?showtopic=79622
Re: Posting Code to Geeklog Site
Posted on: 12/01/07 10:50pm
By: Anonymous (xiao_haozi)
OK, I think I found something that exemplifies what I would like to do with my code posting.
http://www.macosxhints.com/article.php?story=2007111404402514
It is a site that uses geeklog. I have checked the source and it uses something like this:
<div style="margin-left:60px"><blockquote>text here</blockquote></div>
I am not sure how I go about setting this up, as I have tried as such and it strips everything down to <div>text here</div> when I post it. Do I need to make something in my style.css and if so I am not quite sure how I do this and any input would be great. I have found my style.css in under my professional theme directory thus far...slow start.
Re: Posting Code to Geeklog Site
Posted on: 12/02/07 03:22am
By: Dirk
Geeklog
removes HTML tags and attributes that aren't explicitly allowed.
But rather than adding the code in the story every time, I'd suggest you add it to your stylesheet. The [code] pseudo-tag is translated into the HTML tags <pre><code>, so defining CSS rules for either of these two would save you a lot of typing.
bye, Dirk
Re: Posting Code to Geeklog Site
Posted on: 12/05/07 11:10am
By: Anonymous (xiao_haozi)
Thanks Dirk, I have done just that and it is working great!