(This file was last written for SBWG version 0.8.4. SBWG and its README are works in progress. Features and details may have been changed by now.)

SBWG (steeph's bash website generator) is a bash script that generates a static HTML website from raw text files.


# Features

* Generates static HTML structure from a source file structure
* Simple image galleries
* Weblog/Blog generation
    * Categorised posts with multiple levels
    * Classical Blog view, filterable by category topic, author or language
    * Support for multi-author weblogs
    * Attached image galleries
    * 
* Stylesheet templates
* Easy staging
* Simple RSS feed


## Feature ideas and requested features

* Audio player/postcast support
* Video attachement support
* Easy image embedding


# Installation

You can get the latest published version from https://log.steeph.de/entries/SBWG.html

There is currectly no setup script. Installation is straight forward though if you understand how SBWG works. There are very detailed instructions in the INSTALL
file if not. Below install instructions are sufficient to get started, though.

After installation of SBWG and during setting up/editing of a web site you might find useful tips in the HOWTO file.


## Requirements:

* bash 4 (None of the scripts are tested with other shells.)
* imagemagick (or compatible `convert`; only needed for image gallery generation)
* A working web server (if you want to actually publish the generated website)


## Setting up the script

* Extract the package to a location outside of your web root
* Move the files to a directory in PATH or add the SBWG directory path to your PATH.
* Check if the file sbwg (and optionally the file genentry) is executable, make it executable if needed.


## Setting up a new web site

The steps necessary to create a new web site depend very much on what you wish your web site to be. SBWG is very flexible. You can change variables and add your
own code on a per-website basis in the 'settings' file of a web site. But you don't have to get into the details of what SBWG can do and how it works, exactly.
If you have never created a web site with SBWG before, I recommend to copy the 'example' directory and make changes to the copied example according to your
requirements/wishes.


### Setting up a new web site from the example template

The 'example' directory included in this package contains the complete source for a web site with a blog. All of the following steps are technically optional.
Omitting one will simply mean that whatever you didn't set/change will stay as it was set for the example web site.
 
* Copy the 'example' directory to a suitable location, e.g. ~/my_website
* Edit the 'settings' file to change your website's title, url/domain name, style template choice, default output directory, etc.
* If you have not changed the default output directory, change the 'html' symlink to point to your web root.
* Edit the 'footer' file to include any HTML code that you want to be included at the bottom of every generated HTML page.
* Edit or replace the logo.svg file with you web site's logo.
* Place any miscellaneous files needed by your web site in the 'files' directory.
* Create or edit CSS files in the 'styles' directory according to your wishes. Which files are used is determined by the 'style=' setting in the settings file.
* Create and/or edit files in the 'pages' directory for "static" web pages not related to a weblog.
* Create blog entries in the 'entries' directory. You can use the 'genentry' script, write files from scratch or use a template file that you have filled with header lines that you regularly use.
* Add galleries in the 'galleries' directory, one directory per gallery. Just put JPEG and PNG files in these directories.
* run 'sbwg --complete' or 'sbwg -c' to create the HTML website in the default output directory with its default settings. Use the '-o'/'--output' option to specify a different output directory, e.g. for testing/a non-public preview.


### Setting up a new web site from scratch

Please see the INSTALL file for detailed instructions on how to set all this up yourself.


# Other remarks

SBWG is work in progress and I don't always publish new versions immedietely. Feel free to contact me via e-mail at steeph@steeph.de for any requests, bug reports,
criticism, suggestions, wishes, complaints, declarations of love.
