File tree Expand file tree Collapse file tree 4 files changed +24
-6
lines changed
Expand file tree Collapse file tree 4 files changed +24
-6
lines changed Original file line number Diff line number Diff line change 33* .swp
44__pycache__ /
55output /
6+ plugins /
Original file line number Diff line number Diff line change 55 - pip3 install pipenv
66 - pipenv install
77script :
8- - git clone https://github.com/alexandrevicenzi/Flex.git theme/active
98 - pipenv run invoke publish
109after_failure :
1110 - pipenv run invoke revert
Original file line number Diff line number Diff line change 1919MENUITEMS = [
2020 ('News' , 'category/news.html' ),
2121 ('Articles' , 'category/articles.html' ),
22- ('Tutoriels' , '/category/tutoriels.html' ),
23- ('Livres' , '/category/livres.html' ),
24- ('Catégories' , '/categories.html' ),
25- ('Tags' , '/tags.html' ),
22+ ('Tutoriels' , 'category/tutoriels.html' ),
23+ ('Catégories' , 'categories.html' ),
24+ ('Tags' , 'tags.html' ),
2625]
2726
27+ PLUGIN_PATHS = ['plugins' ]
28+ PLUGINS = ['summary' ]
29+
2830TIMEZONE = 'Europe/Paris'
2931
3032# Translate to German.
Original file line number Diff line number Diff line change 11import os
2+ from pathlib import Path
23
34from invoke import task
45
56
6- THEME = 'theme/active'
7+ THEME = './theme/active'
8+ THEME_CMD = f'git clone https://github.com/alexandrevicenzi/Flex.git { THEME } '
9+
10+ PLUGINS = './plugins'
11+ PLUGINS_CMD = (
12+ 'git clone --recursive '
13+ f'https://github.com/getpelican/pelican-plugins { PLUGINS } '
14+ )
15+
16+ def check_theme_and_plugins (c ):
17+ if not Path ('./theme' ).exists ():
18+ c .run (THEME_CMD )
19+ if not Path ('./plugins' ).exists ():
20+ c .run (PLUGINS_CMD )
721
822@task
923def build (c ):
24+ check_theme_and_plugins (c )
1025 c .run ('echo "Publishing your Pelican website"' )
1126 c .run (f'pipenv run pelican content -s pelicanconf.py -t { THEME } ' )
1227
1328@task
1429def publish (c ):
30+ check_theme_and_plugins (c )
1531 c .run ('echo "Building your Pelican website"' )
1632 c .run (f'pipenv run pelican content -s publishconf.py -t { THEME } ' )
1733
You can’t perform that action at this time.
0 commit comments