@@ -106,6 +106,7 @@ UPLOAD_FOLDER = join(dirname(abspath(__file__)), 'wiki/static/') # Upload folder
WEBSITE_LOGO = gettext('images/logo-e.png')
WEBSITE_NAME = gettext('Uruk Wiki')
WEBSITE_KEYWORDS = gettext('uruk, wiki, uruk wiki, uruk project, uruk linux, linux, URUK, URUK PROJECT') # Website Keywords (for SEO)
+FRONT_PAGE = gettext('index') # Front Page url, set to False if none
```
Also, project must have a config file in *instance* directory. Create *instance/config.py* and fill it with the below template:
@@ -27,4 +27,4 @@ UPLOAD_FOLDER = join(dirname(abspath(__file__)), 'wiki/static/') # Upload folder
-FRONT_PAGE = gettext('index') # Front Page name, set to False if none
@@ -18,7 +18,7 @@ wiki = Blueprint('wiki', __name__)
@wiki.route('/')
@nocache
def index():
- if app.config['FRONT_PAGE']:
+ if app.config.get('FRONT_PAGE'):
frontpage = WikiPostDB.query.filter_by(default_lang=session['lang'], url=gettext(app.config['FRONT_PAGE'])).first()
if frontpage:
content = macro_compiler(frontpage.content, 'macros.html')