Skip to content

Commit 950b87a

Browse files
Thierry Chappuisfreezed
authored andcommitted
Simplified tasks.py and reverted to default theme
1 parent ef3df5c commit 950b87a

2 files changed

Lines changed: 3 additions & 27 deletions

File tree

pelicanconf.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@
2424
('Tags', '/tags.html'),
2525
]
2626

27-
PLUGIN_PATHS = ['plugins']
28-
PLUGINS = ['summary']
29-
3027
TIMEZONE = 'Europe/Paris'
3128

3229
# Translate to German.

tasks.py

Lines changed: 3 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3,44 +3,23 @@
33

44
from invoke import task
55

6-
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-
"""Checks if the theme and plugins directories are present and clones them
18-
from Github if necessary.
19-
"""
20-
if not Path('./theme').exists():
21-
c.run(THEME_CMD)
22-
if not Path('./plugins').exists():
23-
c.run(PLUGINS_CMD)
24-
256
@task
267
def build(c):
278
"""Builds the local Pelican blog."""
28-
check_theme_and_plugins(c)
299
c.run('echo "Publishing your Pelican website"')
30-
c.run(f'pelican content -s pelicanconf.py -t {THEME}')
10+
c.run(f'pelican content -s pelicanconf.py')
3111

3212
@task
3313
def publish(c):
3414
"""Builds the Pelican blog with deployment settings."""
35-
check_theme_and_plugins(c)
3615
c.run('echo "Building your Pelican website"')
37-
c.run(f'pelican content -s publishconf.py -t {THEME}')
16+
c.run(f'pelican content -s publishconf.py')
3817

3918
@task
4019
def autoreload(c):
4120
"""Starts the autoreload server to help during writing of blog articles."""
4221
c.run('echo "Running autoreload server. Press CTRL+C to stop"')
43-
c.run(f'pelican -r content -s pelicanconf.py -t {THEME}')
22+
c.run(f'pelican -r content -s pelicanconf.py')
4423

4524
@task
4625
def runserver(c):

0 commit comments

Comments
 (0)