Configuration
Before generating your website, by the means mentioned in Basic Usage, it is important to configure your website.
Upon initial creation of a website through kurama, your configuration file will look like this:
{
"name": "Hello, World!",
"tagline": "A Grand Adventure",
"url": "//example.com"
}
and a minimal configuration will look like this:
{
"name": "Hello, World!",
"url": "//example.com"
}
In both examples, the URL is specified in a way that is independent of the protocol, or scheme, used, so that the site can work under both HTTP and HTTPS.
Keys
To configure things properly, the following keys are used:
- name
- The Website's name.
- tagline
- The Website's tagline.
- url
- The Website's URL.
- author
- The Website's creator or owner.
- blog_path
-
The path for the archive or blog
If this is set, you need to provide a separate name for the archive.
If this has no value, which is the default, kurama will assume the site is a blog the moment you create a post.
- blog_name
-
The name of the archive or blog.
If your website is going to be a blog, this is not needed.
- items_per_page
-
The number of posts to display on each page of an archive.
If this is not set or set to zero, then no pagination will occur.
- pagination_method
-
Specifies how pages of an archive will be paginated.
The default is as files, but if you set this to **dir**, pages will be in their own directory.
- links
-
This is used for a list of links on their own.
If your navigation doesn't have sections, you can use this.
- sections
-
Same as above, but provides a way to put related links into a section.
If you want your navigation menu to be split up into groups, you can use this.
Example
A complete configuration file will look like this:
{
"name": "Hello, World!",
"tagline": "A Grand Adventure",
"url": "//example.com",
"author": "Jack Sparrow",
"blog_path": "news",
"blog_name": "News",
"pagination_method": "dir",
"sections": [
{
"name": "Main",
"links": [
{
"name": "Home",
"url": "index.html"
},
{
"name": "History",
"url": "history.html"
},
{
"name": "News",
"url": "news/"
},
{
"name": "Q & A",
"url": "questions.html"
},
{
"name": "Contact Jack",
"url": "mailto:jack.sparrow@example.com"
}
]
},
{
"name": "Ships",
"links": [
{
"name": "Black Pearl",
"url": "black_pearl.html"
}
]
}
]
}