Table of Contents
programs required other than bash: cat, cp, cut, date, echo, expr, grep (fgrep), mkdir, read, rm, sed, sort, touch, trap
nb [options]... [blog (directory)]...Try "nb --help" for all available options. For each blog there's a user defined configuration file called "blog.conf". This file controls the behavior of a blog. It allows you to change such things as, how many entries to display on the front page. It's also where you set the title, description, and the URL for your blog. The DATE_FORMAT variable can be customized to change the date format of a new entry. The default DATE_FORMAT uses "%B %d, %Y %l:%M %p" and produces something like this: "August 05, 2003 12:53 AM". Read the man pages of the date command to see more on how to customize the format of a date.
NanoBlogger creates the following web pages:
The web pages are regenerated each time you add, edit, or delete an entry.
- index.html
- index.rdf
- archives/monthly/[YYYY-MM].html
- archives/permalinks/[YYYY-MM-HH_MM_SS].htm (only when full permalinks are enabled)
Enabling full permalinks, causes each entry to have it's own web page. To enable full permalinks in your blog, edit blog.conf and set FULL_PERMALINKS equal to 1. Make sure that the permalinks have been generated, you may have to rebuild your blog. The entries' permalinks should've automatically been changed, if you expreince any problems, have a look at the "entries.htm" template. Look at the "href" line and make sure that it's only set to equal "$NB_EntryPermalink". If it's not then change it and rebuild your blog again.
The blog's appearance is controlled by the following templates: templates description archive_links.htm the links to the archives default.htm controls look of alternate pages, such as the archive pages and permalinks entries.htm controls look of your blog entries main_index.htm controls look of the blog's main page permalink.htm controls look of a blog entry inside it's permalink page (similar to entries.htm) rdf_entries.xml controls look of each individual news item in the rss feed rdf.xml controls look and format of rss feed (index.rdf)
In addition there's a stylesheet called, "blog_style.css".
All the placeholders are reinterpretted by the shell as variables when a template is sourced, making the templates capable of a few shell scripting tricks themselves. As a simple example, you could place this in your template: "Last Modified: `date`", and it would display the time your page was last modified, using the date command. Thus greatly enchancing the power of the templates, making it possible to create your own script and replace my "Last Modified" example with your own script.
The entry template includes the following placeholders: placeholders description $NB_EntryAuthor author of entry $NB_EntryBody entry's content $NB_EntryDate entry's posted time $NB_EntryID entry's id $NB_EntryPermalink entry's permalink $NB_EntryTitle entry's title
The main template includes the following placeholders: placeholders description $BLOG_CHARSET blog's character set $BLOG_CONTACT blog's contact info $BLOG_DESCRIPTION blog's description $BLOG_TITLE blog's title $BLOG_URL blog's URL $NB_Archive_Links links to archives $NB_Entries all the current entries
To disable a plugin, rename the plugin's extension from ".sh" to ".off". This will move the plugin off of the radar, the next time NanoBlogger is run.
The plugins included and what placeholders they create (most are enabled by default and setup in the templates): plugins description placeholders special requirements autoformat/auto_break.sh adds paragraph breaks to blank lines of entries $NB_EntryBody none autoformat/moods.sh adds ability to use mood variables inside a blog's entry $NB_EntryBody copy moods directory to blog's directory blog_status.sh generates blog statistics $NB_Blog_Status none calendar.sh uses cal to generate a calendar with links $NB_Calendar cal fortune.sh uses fortune to generate random quotes $NB_Fortune fortune list_entries.sh generates list of entries recent or old $NB_Recent_Entries, $NB_Older_Entries none mymood.sh adds ability for user to set a mood status in their blog $NB_My_Mood copy moods directory to blog's directory