A Blogging Roller-Coaster Ride!

Why do I spend so much time fighting Roller? Why can't I just get on and do my blogging thang? My patience is wearing thin. Shouldn't the default environment just work? Why do I have to become and HTML/CSS expert? I didn't sign up for this!

And judging by the quality of the OpenSolaris blogs, I'm not alone in my frustation. The content is great, but the presentation is often poor.

So, in the absence of better advice I have decided on the following:

  • I will use the "Basic" theme with minimal hacks (see below)
  • I will hijack <h4> ... </h4> for my own subheading use
  • I will mark all my paragraphs with <p> ... </p> containers
  • I will never use <p> as a separator
  • I will spurn the use of <br> separators
  • I will employ <pre class="code"> ... </pre> for code quotes

I've modified the "Basic" theme's default _css file to ensure that "h4" headings have margins which match standard "p" paragraphs, and that preformatted code has a readable font size ...

#set( $theme = "basic" )
#parse("/WEB-INF/classes/themes/css.vm")

<style type="text/css" media="print">
    .rWeblogCategoryChooser{ visibility: hidden; }
    .entries{ width: 100%; float: none; }
    .rightbar{ visibility: hidden; }
</style>

<style type="text/css">
    h4 { margin:10px; }
    pre.code { font-size: 10pt; }
</style>

I didn't like the way the "Basic" theme's default _day file adds <p> ... </p> containers around each day entry because this forces nesting of the "p" tags within the final HTML. Nor did I like the way the entry title was just marked with the "b" tag. So this is what I now use ...

<div class="box">

<div class="entry">
   #showDayPermalink( $day )
   #showEntryDate( $day )
</div>

#foreach( $entry in $entries )
   <a name="$utilities.encode($entry.anchor)" id="$utilities.encode($entry.anchor)"></a>
   <h3>$entry.title</h3>
   #showEntryText($entry)
   <span class="dateStamp">(#showTimestamp($entry.pubTime))</span>
   #showEntryPermalink( $entry )
   #showCommentsPageLink( $entry )
#end
    
#showLinkbacks( $day )

</div>

For such an advanced blogging environment I find it absolutely incredible that I have to edit both the bookmarks database and the main weblog template jsut to get rid of the default (and useless) "News" links! Here's my revised "Basic" theme weblog template ...

<div class="entries">

    <h1>#showWebsiteTitle()</h1>
    <h2>#showWebsiteDescription()</h2>

    #showWeblogCategoryChooser()

    #showNextPreviousLinks()

    #showWeblogEntries("_day" 15)
</div>
<div class="rightbar">
    <h2>Calendar</h2>
    <div class="sidebar">
    #showWeblogCalendar()
    </div>

    <h2>RSS Feeds</h2>
    <div class="sidebar">
    #showRSSBadge()<br>
    #showRSSLinks()
    </div>

    <h2>Search</h2>
    <div class="sidebar">
    #showSearchForm()
    </div>

    <h2>Links</h2>
    <div class="sidebar">
    #showBookmarks("My Sites" true false)
    #showBookmarks("Blogroll" true false)
    </div>

    <h2>Navigation</h2>
    <div class="sidebar">
    #showCssNavBar()
    </div>
</div>

Well, there you are. That's what I did. I just wish it was a simple matter for others to use the above, but unless you are also using the "Basic" theme it almost certainly won't work for you! However, the principles should be applicable to other themes.

I have also taken the precaution of downloading the current Roller distro just incase someone fiddles with the "Basic" theme in a later release. Sigh!

Comments:

Phil, As you've gone through the pain of hacking the CSS, you might like to simplify the other aspect, ie. writing the HTML ... take a look at Markdown (http://daringfireball.net/projects/markdown/) and write your entries in plain legible text and get teh XHTML for free. HTH Craig

Posted by Craig Morgan on June 15, 2005 at 01:32 AM PDT #

A couple comments.
  • You use the _css page exactly as it's intended, to extend and customize your display.
  • However, it isn't good that Basic would result in nested paragraph tags, we'll have to look into that (should wrap the day/entries in div's instead).
  • It shouldn't have been necessary to edit both your Weblog template and delete the News folder - one or the other should have sufficed (depends on the template I think).
  • Finally, Markdown is not available in Roller, but Textile is available(or should be, depending on how b.s.c is configured) on the Weblog Edit screen.
  • The Basic templates were re-written with extensibility in mind, in fact it is made to be customized. The other templates are much harder to customize as they are (most of them) direct ports of templates from other blog servers (Blogger, MT, WordPress).

    Posted by Lance Lavandowska on June 15, 2005 at 11:45 PM PDT #

    How do you display xml tag in your blog entry? Do you need to convert the less than character and greater than character of each tag into < and > manually??

    Posted by Herman Cheung on January 05, 2006 at 10:23 AM PST #

    Post a Comment:
    Comments are closed for this entry.
    About

    pgdh

    Search

    Categories
    Archives
    « April 2014
    MonTueWedThuFriSatSun
     
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
        
           
    Today