This is example 3 as described in the Wsmake User Manual.

Have you read example 2 yet? We assume that you have, so if you haven't read
it yet, please do so now.

We cover using subtag groups in this example. We are going to use the
same configuration from our last example. This example can be found in the
doc/examples/ex3/ directory of the source distribution.

In this example's directory we have the configuration file from example 2
named ./ex3.ws and the way it should look when we finish is in the file
./ex3.final.ws

When we did example 2, our two subtags had to be repeated for each
page. As you can see, it is possible that we end up with the same problem
that we intended to solve once more pages are added. We want to only change
the value in one place. To solve this problem we can define a group of
SubTags with the two tags in it, and then reference that group from each
page. SubTagGroups are defined in the PageGroup section. For this
example, a possible way to make it would be:

  SubTagGroup {
    name "default"
    SubTag "<sitename>" "Hello world!"
    SubTag "<makedate>" `date`
  }

This means that any DefaultPage that references this SubTagGroup's name
"default" will acquire the SubTags defined in it in addition to the one's
already defined by the Page. Go ahead and add the above definition after
the output_dir setting in the PageGroup section of ./ex3.conf

Next we need to modify each Page to reference the SubTagGroup. The first
thing we should do is remove the SubTag definitions. Once that is done
reference the SubTagGroup like:

   subtaggroup "default"

That line should be in each Page section now. Run wsmake on the
configuration file and check the results.

Some notes:

* It is possible to override the definition of the SubTag in the SubTagGroup
  by placing a SubTag definition of the same name in the Page. We
  demonstrate this in the help.html webpage defined in ex3.conf.final.

* A Page's SubTags are applied before any referenced SubTagGroup's
  SubTags

* Wherever there are a group of SubTag's, they will be applied in the order
  that they are defined.

* There is a special case with PageParts that should be mentioned here,
  PageParts first apply the SubTags and SubTagGroups of the Page that
  is using it before it applies its own SubTags. This will be demonstrated
  in later examples.

* For sites with many SubTags that have similar structure, it may be
  beneficial to use the subtag_format attribute in the PageGroup
  section or Webpage section. This attribute specifies the common
  part to every tag in the section it is defined. It is then only
  needed to define the unique part of the SubTag for each definition. In
  this example, an appropriate use would be (where %s represents the
  location of the unique part of each tag):

    subtag_format "<%s>"

  Then each subtag would not need to have the '<' and '>' characters in
  it's definition. At parse time, the '<' and '>' would automatically
  be added to each subtag when it looks for them in the source file.

Ok, this is the end of example 3.
