mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Using PATH in pelicanconf.py template to set path to content directory.
- declare default content directory to PATH in pelicanconf.py template - removing content path hardcoded in fafile.py template - removing previous commit
This commit is contained in:
parent
5d07d87f86
commit
96e10875b2
2 changed files with 4 additions and 5 deletions
|
|
@ -6,9 +6,6 @@ import os
|
||||||
env.deploy_path = 'output'
|
env.deploy_path = 'output'
|
||||||
DEPLOY_PATH = env.deploy_path
|
DEPLOY_PATH = env.deploy_path
|
||||||
|
|
||||||
# Content path configuration
|
|
||||||
CONTENT_PATH = 'content/'
|
|
||||||
|
|
||||||
# Remote server configuration
|
# Remote server configuration
|
||||||
production = '$ssh_user@$ssh_host:$ssh_port'
|
production = '$ssh_user@$ssh_host:$ssh_port'
|
||||||
dest_path = '$ssh_target_dir'
|
dest_path = '$ssh_target_dir'
|
||||||
|
|
@ -25,14 +22,14 @@ def clean():
|
||||||
local('mkdir {deploy_path}'.format(**env))
|
local('mkdir {deploy_path}'.format(**env))
|
||||||
|
|
||||||
def build():
|
def build():
|
||||||
local('pelican ' + CONTENT_PATH + ' -s pelicanconf.py')
|
local('pelican -s pelicanconf.py')
|
||||||
|
|
||||||
def rebuild():
|
def rebuild():
|
||||||
clean()
|
clean()
|
||||||
build()
|
build()
|
||||||
|
|
||||||
def regenerate():
|
def regenerate():
|
||||||
local('pelican ' + CONTENT_PATH + ' -r -s pelicanconf.py')
|
local('pelican -r -s pelicanconf.py')
|
||||||
|
|
||||||
def serve():
|
def serve():
|
||||||
local('cd {deploy_path} && python -m SimpleHTTPServer'.format(**env))
|
local('cd {deploy_path} && python -m SimpleHTTPServer'.format(**env))
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,8 @@ AUTHOR = $author
|
||||||
SITENAME = $sitename
|
SITENAME = $sitename
|
||||||
SITEURL = ''
|
SITEURL = ''
|
||||||
|
|
||||||
|
PATH = 'content/'
|
||||||
|
|
||||||
TIMEZONE = 'Europe/Paris'
|
TIMEZONE = 'Europe/Paris'
|
||||||
|
|
||||||
DEFAULT_LANG = $lang
|
DEFAULT_LANG = $lang
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue