Configuration

Yozuch is configurable using config.py file in the project directory:

Basic settings

Setting

Example

Description

AUTHOR

'Name Lastname'

Your name

TITLE

'My blog'

Blog title

URL

'http://example.com'

Blog URL

DESCRIPTION

'My blog description'

Blog description

THEME_NAME

'foundation'

Theme name

THEME_CONFIG

{} see below

Theme settings, see description below

VIEWS

{} see below

Views, see description below

Views

Views define pages you want to include in your blog.

List of available views:

blog-index

Blog index.

view('/', 'blog-index')

posts

URL variables:

  • {date} - post date ({date:%Y}/{date:%m}/{date:%d})

  • {slug} - post slug

view('/blog/{date:%Y}/{date:%m}/{date:%d}/{slug}/', 'posts')

tags-index

view('/tags/', 'tags-index')

tags

URL variables:

  • {slug} - tag slug

view('/tag/{slug}/', 'tags')

archive-index

view('/archive/', 'archive-index')

documents

URL variables:

  • {slug} - document slug

view('/documents/{slug}', 'documents')

pages

URL variables:

  • {filename} - HTML file name

view('/pages/{filename}', 'pages')

atom-feed

view('/atom.xml', 'atom-feed')

assets

URL variables:

  • {filename} - file name

view('/{filename}', 'assets')

Example:

VIEWS = (
    view('/', 'blog-index'),
    view('/blog/{date:%Y}/{date:%m}/{date:%d}/{slug}/', 'posts'),
    view('/tags/', 'tags-index'),
    view('/tag/{slug}/', 'tags'),
    view('/archive/', 'archive-index'),
    view('/{slug}/', 'documents'),
    view('/atom.xml', 'atom-feed'),
    view('/{filename}', 'assets'),
)

Theme settings

Setting

Example

Description

navigation

[] see below

Navigation menu items

disqus_shortname

example

Disqus website ID

disqus_display_comment_count

True

Display Disqus comment count on blog index

google_analytics_id

UA-000000-01

Google Analytics Tracking ID

logo_url

blog-index

URL or view ID

post_date_format

%B %d, %Y

Post date format

archive_date_format

%Y-%m-%d

Archive date format

github_profile_url

https://github.com/foo

GitHub profile URL

twitter_profile_url

https://twitter.com/foo

Twitter profile URL

Yozuch uses strftime to format dates, you can find the syntax description in Python documentation website.

Example:

THEME_CONFIG = {
    'disqus_shortname': 'example',
    'disqus_display_comment_count': False,
    'google_analytics_id': 'UA-000000-01',
    'github_profile_url': 'https://github.com/foo',
    'twitter_profile_url': 'https://twitter.com/foo',
    'navigation': [
        ('Blog', 'blog-index'),
        ('Tags', 'tags-index'),
        ('Archive', 'archive-index'),
        ('External URL', 'http://example.com/'),
        ('Feed', 'atom-feed'),
    ],
    'logo_url': '/',
}