Configuration¶
Catsup’s configuration file is a vaild JSON file.
Overview¶
The default config file looks like :
{
"site": {
"name": "blogname",
"description": "Just another catsup blog",
"url": "http://blog.com/"
},
"author": {
"name": "nickname",
"email": "name@exmaple.com",
"twitter": "twitter"
},
"config": {
"source": "posts",
"static_source": "static",
"output": "deploy",
"static_output": "deploy/static",
"static_prefix": "/static/",
"analytics": ""
},
"permalink": {
"page": "/page/{page}/",
"post": "/{filename}/",
"tag": "/tag/{name}/",
"tags": "/tag/index.html",
"archive": "/archive/{year}/",
"archives": "/archive/index.html",
"feed": "/feed.xml"
},
"comment": {
"allow": true,
"system": "disqus",
"shortname": "catsup"
},
"deploy": {
"default": "rsync",
"git": {
"repo": "repo url here",
"branch": "master",
"delete": true
},
"rsync": {
"ssh_port": 22,
"ssh_user": "username",
"ssh_host": "123.45.6.78",
"document_root": "~/website.com/",
"delete": true
}
},
"theme": {
"name": "sealscript",
"vars": {
"github": "whtsky",
"links": [
{
"name": "catsup",
"url": "https://github.com/whtsky/catsup",
"description": "Awesome!"
}
]
}
}
}
Site & Author & Config¶
It’s easy enough to configure these by yourself.
If you’re using Google Analytics, remember to change config.analytics
"config": {
"source": "posts",
"static_source": "static",
"output": "deploy",
"static_output": "deploy/static",
"static_prefix": "/static/",
"analytics": ""
},
Permalink¶
You can easily change any page’s permalink in config.permalink
.
There are some permalink styles for posts you may like :
/{title}.html
{filename}.html
/{date}/{title}/
/{filename}/
/{date}/{filename}/
/{datetime.year}/{filename}/
Note that permalink defined in Post Meta will be used first.
For example, you defined your post permalink like
"permalink": {
"post": "/{title}/",
"feed": "/feed.xml"
},
And in your post, you defined a permalink in Post Meta
# About
- datetime: 2013-08-30 12:00
- type: page
- permalink: /about-the-site
-------
This is a about page
In the end the permalink of this page will be /about-the-site
.
Comment¶
Catsup supports two comment systems: Disqus and Duoshuo
If you prefer Duoshuo to Disqus, just change your comment system to it
"comment": {
"allow": true,
"system": "duoshuo",
"shortname": "catsup"
},
If you have your own shortname, remember to change comment.shortname
to your own
"comment": {
"allow": true,
"system": "disqus",
"shortname": "my_site"
},
If you don’t want to allow any comment, just disable it
"comment": {
"allow": false
},
If you just want some of the posts can’t be commented, set - comment: disabled
in Post Meta
Deploy & Theme¶
It’s easy enough to configure these by yourself.
For more information, read about Deploy Support and your theme’s document.