pelicanconf.py 3.5 KB
Newer Older
1 2 3 4
#!/usr/bin/env python
# -*- coding: utf-8 -*- #
from __future__ import unicode_literals
import sys
5

6 7 8 9
reload(sys)
sys.setdefaultencoding("utf-8")

# Site information
Edprado4's avatar
Edprado4 committed
10
AUTHOR = 'Fluid Attacks'
11 12 13 14 15 16 17

# Theme
THEME = 'theme/2014'

# Date and time configuration
TIMEZONE = 'America/Bogota'
DEFAULT_DATE_FORMAT = ('%Y-%m-%d')
FluidPublicBot's avatar
FluidPublicBot committed
18 19
DEFAULT_LANG = 'de'
OUTPUT_PATH = 'output/web/de'
20 21 22

# URLs format
PATH = 'content'
23 24
ARTICLE_PATHS = ['blog-de']
PAGE_PATHS = ['pages-de']
25
ARTICLE_URL = 'blog/{slug}'
FluidPublicBot's avatar
FluidPublicBot committed
26
ARTICLE_SAVE_AS = 'blog/{slug}index.html'
27
PAGE_URL = '{slug}'
FluidPublicBot's avatar
FluidPublicBot committed
28
PAGE_SAVE_AS = 'pages/{slug}index.html'
FluidPublicBot's avatar
FluidPublicBot committed
29 30
DRAFT_URL = 'drafts/{slug}'
DRAFT_SAVE_AS = 'drafts/{slug}index.html'
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
USE_FOLDER_AS_CATEGORY = False
INDEX_SAVE_AS = 'blog/index.html'
LANDING_SAVE_AS = 'index.html'
ERROR_SAVE_AS = 'error/index.html'

# Plugins configuration
PLUGIN_PATHS = ['/app/pelican-plugins']
PLUGINS = [
           'asciidoc_reader',
           'assets',
           'neighbors',
           'share_post',
           'related_posts',
           'representative_image',
           'tipue_search',
           'sitemap',
           'i18n_subsites',
           'tag_cloud'
]
RELATED_POSTS_MAX = 3
DIRECT_TEMPLATES = (('index', 'tags', 'categories', 'archives', 'authors', 'search', 'landing', 'error'))
SITEMAP = {
    'format': 'xml',
    'priorities': {
        'articles': 0.7,
        'indexes': 0.8,
        'pages': 0.9
    },
    'changefreqs': {
        'articles': 'monthly',
        'indexes': 'daily',
        'pages': 'monthly'
    }
}
DEFAULT_PAGINATION = 12
# Line that allows the localization of the site (traslation)
JINJA_ENVIRONMENT = {'extensions': ['jinja2.ext.i18n']}
I18N_SUBSITES = {
FluidPublicBot's avatar
FluidPublicBot committed
69
    'en': {
Edprado4's avatar
Edprado4 committed
70
        'SITENAME': 'A Pentesting Company | Fluid Attacks',
71 72
        'SITEURL': 'https://fluidattacks.com/web',
        'OUTPUT_PATH': 'output/web',
FluidPublicBot's avatar
FluidPublicBot committed
73
        'THEME': 'theme/2014',
74 75 76 77 78
        'ARTICLE_PATHS': ['blog'],
        'PAGE_PATHS': ['pages'],
        'PAGE_SAVE_AS': 'pages/{slug}index.html',
        'ARTICLE_SAVE_AS': 'blog/{slug}index.html',
        'STATIC_PATHS': ['files', 'images', 'blog', 'pages'],
FluidPublicBot's avatar
FluidPublicBot committed
79 80 81 82 83 84 85 86 87 88 89 90
        'TAGS_SAVE_AS': 'blog/tags/index.html',
        'TAGS_URL': 'blog/tags/',
        'TAG_SAVE_AS': 'blog/tags/{slug}/index.html',
        'TAG_URL': 'blog/tags/{slug}/',
        'AUTHORS_SAVE_AS': 'blog/authors/index.html',
        'AUTHORS_URL': 'blog/authors/',
        'AUTHOR_SAVE_AS': 'blog/authors/{slug}/index.html',
        'AUTHOR_URL': 'blog/authors/{slug}/',
        'CATEGORIES_SAVE_AS': 'blog/categories/index.html',
        'CATEGORIES_URL': 'blog/categories/',
        'CATEGORY_SAVE_AS': 'blog/categories/{slug}/index.html',
        'CATEGORY_URL': 'blog/categories/{slug}/',
91 92
        'ASCIIDOC_OPTIONS': ['-a icons', '-a iconsdir=/web/images/icons',
                             '-a tooltip=/web/images/icons/tooltip.png'],
FluidPublicBot's avatar
FluidPublicBot committed
93
    },
94
}
FluidPublicBot's avatar
FluidPublicBot committed
95
SUBSITE_LANG = {
96
     'en': 'https://fluidattacks.com/web',
97 98 99 100 101 102 103 104 105
}
ASSET_BUNDLES = (
  ('bundle', [
   'css/custom/general.scss',
   'css/custom/global.scss',
   'css/custom/custom.scss'
  ], {'filters': 'scss'}),
)

106 107 108 109 110
# Cache Settings
CHECK_MODIFIED_METHOD = 'md5'
CACHE_CONTENT = True
LOAD_CONTENT_CACHE = True

111
# Disqus
Oscar Prado's avatar
Oscar Prado committed
112
DISQUS_SITENAME = 'fluidattacks'
113 114 115 116 117 118 119 120 121 122 123 124 125

# Feed generation is usually not desired when developing
FEED_ALL_ATOM = None
CATEGORY_FEED_ATOM = None
TRANSLATION_FEED_ATOM = None
AUTHOR_FEED_ATOM = None
AUTHOR_FEED_RSS = None

# Blogroll
LINKS = (('Pelican', 'http://getpelican.com/'),
         ('Python.org', 'http://python.org/'),
         ('Jinja2', 'http://jinja.pocoo.org/'),
         ('You can modify those links in your config file', '#'),)