From 74c085c44223cad49ed6485cd2474f036ecea489 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 | 17 ++++------------- 2 files changed, 21 insertions(+), 13 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 d77c1fb..c8eeda4 100644 --- a/pelicanconf.py +++ b/pelicanconf.py @@ -1,6 +1,10 @@ #!/usr/bin/env python # -*- 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' @@ -36,19 +40,6 @@ TRANSLATION_FEED_ATOM = None AUTHOR_FEED_ATOM = None AUTHOR_FEED_RSS = None -# Menu -MAIN_MENU = True -DISPLAY_PAGES_ON_MENU = False -DISPLAY_CATEGORIES_ON_MENU = False -MENUITEMS = [ - ('Opytex', "/opytex/"), - ("pyMath", "/pymath/"), - ("Contenus de cours", "/pages/mes-cours.html"), - #('blog', '/blog_index.html'), - ('À propos', "/pages/a-propos.html"), - #('Archives', "/pages/archives.html"), -] - # Blogroll LINKS = [ ("2019-2020", "/2019-2020/")