Author metadata

Daizu CMS can publish information about the author (or authors) of documents. Currently, by default, this information only appears on pages for blog articles, but a small change to the templates can be made to publish it on regular articles as well.

daizu:author property

Subversion properties are used to tie one or more authors to each file. You can set the daizu:author property either on a single file or on a directory, in which case it describes the authors of all files within that directory. The value can be overridden for particular files or subdirectories by adding the same property for them as well.

Typically you will want to set a default author name for a whole website, which you can do like this:

svn ps daizu:author geoff example.com

This indicates that all the files in the directory example.com are by an author called ‘geoff’. The value is a short identifier or username which won't appear on the website itself. The username must not contain any whitespace. If you've got several websites in the repository, add this property to the top directory for each of them.

The daizu:author property can actually have several authors, with their usernames given on separate lines, but most people won't need to do that.

When you're choosing usernames bear in mind that at some point in the future Daizu will probably use these to identify users logging in to its user interface (when it gets one). It will probably also use the names which Subversion records (which are the username of the person accessing the repository, if you check it out using a ‘file’ URL, or the username you authenticate with if you're accessing a repository directly). Currently though a username is just a string which you manually put in both the database and the repository, so it can be pretty much anything.

Person database tables

The database has two tables called person and person_info. These supply the information about an author which appears on a website. The person table simply relates a username to an internal ID number. You can add a new author to it like this:

insert into person (username) values ('geoff');

The person_info table has the actual information like the person's real name. The reason it is stored separately from the username is that you may (rarely) need to provide more than one set of information describing a single author for different websites published with a single Daizu installation, or different parts of websites. So if you want to publish a blog under a pseudonym you can do so with the same Daizu repository as websites under your real name. Daizu will know that there is just a single author with a particular username, but it will use different names for that author on the websites.

You can create a person_info record like this:

insert into person_info (person_id, path, name, email, uri)
    values (1, '', 'Geoff Richards', 'geoff@laxan.com',
            'http://www.laxan.com/');

The path value is what determines which person_info record will be used. The one above, with an empty path, will be used by default. You should usually supply a default record like this to start with, and then add others if necessary, with the path to the directory in the repository for particular websites. These will override the default one for files which match the path. For example, you might add another record like this:

insert into person_info (person_id, path, name, email, uri)
    values (1, 'anonblog.com', 'Witty Pseudonym',
            'witty@anonblog.com', 'http://anonblog.com/');

You must provide a record for each user in both the person and person_info tables. The name value is required, and should be the name you want to be displayed on the website. The username value is for your use and won't be displayed (unless you fiddle with the templates). The email and uri columns can be null if you don't want to supply them. The uri value should be the URL of the author's homepage. The name uri is only used to match Atom's terminology.

The id and person_id columns are only used in the database to join the tables, and have no real significance.