From 5239c34f50b3f4bb350533e359e3fb16da3d84e6 Mon Sep 17 00:00:00 2001 From: Bertrand Benjamin Date: Tue, 23 Jun 2020 10:05:25 +0200 Subject: [PATCH] Feat: split with globalconf --- globalconf.py | 17 +++++++++++++++++ pelicanconf.py | 18 +++--------------- 2 files changed, 20 insertions(+), 15 deletions(-) create mode 100644 globalconf.py diff --git a/globalconf.py b/globalconf.py new file mode 100644 index 0000000..0935fb4 --- /dev/null +++ b/globalconf.py @@ -0,0 +1,17 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- # +from __future__ import unicode_literals + +# Menu +MAIN_MENU = True +DISPLAY_PAGES_ON_MENU = False +DISPLAY_CATEGORIES_ON_MENU = False +MENUITEMS = [ + #("Dernières modifications", SITEURL+"blog_index.html"), + ("Contenus de cours", "/pages/tout-sur-mes-cours.html"), + ('blog', '/blog_index.html'), + ('Opytex', "/opytex/"), + ("pyMath", "/pymath/"), + ('À propos', "/pages/a-propos.html"), + ] + diff --git a/pelicanconf.py b/pelicanconf.py index 5dfc7d8..03de42d 100644 --- a/pelicanconf.py +++ b/pelicanconf.py @@ -2,6 +2,9 @@ # -*- coding: utf-8 -*- # from __future__ import unicode_literals import os +import sys +sys.path.append(os.curdir) +from globalconf import * AUTHOR = 'Benjamin Bertrand' SITENAME = 'OpyTex' @@ -35,21 +38,6 @@ INDEX_SAVE_AS = 'blog_index.html' PATH_METADATA = '(?P.*)\..*' ARTICLE_URL = ARTICLE_SAVE_AS = PAGE_URL = PAGE_SAVE_AS = '{path_no_ext}.html' - -# Menu -MAIN_MENU = True -DISPLAY_PAGES_ON_MENU = False -DISPLAY_CATEGORIES_ON_MENU = False -MENUITEMS = [ - #("Dernières modifications", SITEURL+"blog_index.html"), - ("Contenus de cours", "/pages/tout-sur-mes-cours.html"), - ('blog', '/blog_index.html'), - ('Opytex', "/opytex/"), - ("pyMath", "/pymath/"), - ('À propos', "/pages/a-propos.html"), - ] - - # Feed generation is usually not desired when developing FEED_ALL_ATOM = None CATEGORY_FEED_ATOM = None