These roughly 10 steps should get you started from scratch to a generated HTML website. If you just want to set up and edit a web site and don't want to know all
the details of how SBWG works and what else it can do, I recommend reading the README file instead. It contains shorter install instructions that are enough to
set up a new web site.


# 0. Download SBWG

https://log.steeph.de/entries/SBWG.html


# 1. Requirements:

- bash 4 (This script is not tested with other shells.)
- imagemagick (or compatible `convert`; only needed for image gallery generation)
- This file does not go into installing a web server. SBWG only generates web sites. It does not make them accessible over a network. Please refer to instructions on
  how to install a web server for your operating system.
- The style sheets included in the example website make use of CSS 3. This is not an issue. I just thought I better mention it.
- The same goes for the generated HTMl, which assumes HTML 5 support.


# 2. Place SBWG somewhere not accessible by the web server.

ööööööööööööööööööööö


# 3. Set up output directory.

If the script is called without the option `-o` or `--output` then the website is generated into directory specified in the 'settings' file. If the setting 'odir='
is not set in the settings file also then the `html` directory inside the source directory is used. Commonly 'html' is a softlink to your web root (see below).

Option 1: Manually copy or move the contents of the `html` directory to a location accessible by your webserver after every time the website has been re-generated.
This way the generated website won't immedietely be publicly available. You can check that everything looks right before you copy the newly generated website to its
actual destination.

Option 2: Create a symlink (replace the paths in the example according to your web server and configuration):

Example: `cd /path/to/your/website/source/; ln -s /var/www/html html`

This way the website source directory is sitting outside the www directory but the generated website will automatically be written to the publicly accessible
location. The website will be incomplete during generation and mistakes will be immedietly get published, as well. 

Option 3: Use the output directory option when generating the website.

Example: `sbwg -c -i ~/blog_source -o /var/www/html`

You can create an alias to always include the output directory option by default.

Examples:

`alias sbwg='sbwg -o /var/www/html'`
`alias updatemysite='genlog -i ~/mysite -o /var/www/html'`

Option 4: Edit the $odir variable in the web site's settings file to a path inside your web root. This will change the default output directory that is used when no
output directory is specified with the `-o` or `--output` option. You can still use the `-o` or `--output` option to overwrite this setting when you want to
generate the web site to a different output directory tha usual, e.g. to view the generated site before bublishing it.


# 4. Optional: Edit the script itself.

If you want to change aspects of the website generation itself, feel free to go to town in any or all of the script files. I encourage you to comment your changes
properly and or submit them to be integrated in a future version of the script. Please e-mail your suggestions, whishes or submissions to steeph@steeph.de
There is one thing you probably want to change for each website that you want to generate with SBWG: The website title tag that is currently hardcoded in various functions. There will be a better solution to set the title in the future.


# 5. Make the script(s) executable.

ööööööööö`chmod +x sbwg`

Either move/copy the script to a directory included in $PATH or add this directory to $PATH.

`cp sbwg ~/bin/`

Then you may want to set aliases for the script instead. For example add to ~/.bashrc:

`alias sbwg="~/bin/sbwg/sbwg"`
`alias genentry="~/bin/sbwg/sbwg"`


# 6. Create a source directory for your web site.

If you just want to generate the example web site for now, you can copy

öööööööööööööööööööööööö

The web site's source directory (where the settings are stored and where you edit and add content) may not be accessible by other users! Code injection through the
files in this directory is a feature by design. Do not make the files in this directory viewable publicly, either!


# 7. Optional: Set default options in the web site's settings file.

ööööööööööööööööööIf you want to, go over the variables that are being set at the beginning of the script file and edit them according to your wishes. Obviously these changes will be
reverted when you replace the script with the original or a newer version. Usually you don't really have to edit the script. There are options for the most common
values that you might want to change.


# 8. Optional: Customise CSS files/stylesheets

Edit or add a style


# 9. Fill your web site with content.

If you just want to generate the example web as it is, you can skip to the next step for now.


# 10. Generate the website.
