mirror of
https://github.com/venthur/blag.git
synced 2025-11-25 20:52:43 +00:00
added static dir
This commit is contained in:
@@ -67,6 +67,11 @@ def parse_args(args):
|
|||||||
default='templates',
|
default='templates',
|
||||||
help='Template directory (default: templates)',
|
help='Template directory (default: templates)',
|
||||||
)
|
)
|
||||||
|
build_parser.add_argument(
|
||||||
|
'-s', '--static-dir',
|
||||||
|
default='static',
|
||||||
|
help='Static directory (default: static)',
|
||||||
|
)
|
||||||
|
|
||||||
quickstart_parser = commands.add_parser('quickstart')
|
quickstart_parser = commands.add_parser('quickstart')
|
||||||
quickstart_parser.set_defaults(func=quickstart)
|
quickstart_parser.set_defaults(func=quickstart)
|
||||||
@@ -113,6 +118,10 @@ def build(args):
|
|||||||
path = os.path.relpath(f'{root}/{dirname}', start=args.input_dir)
|
path = os.path.relpath(f'{root}/{dirname}', start=args.input_dir)
|
||||||
os.makedirs(f'{args.output_dir}/{path}', exist_ok=True)
|
os.makedirs(f'{args.output_dir}/{path}', exist_ok=True)
|
||||||
|
|
||||||
|
# copy static files over
|
||||||
|
if os.path.exists(args.static_dir):
|
||||||
|
shutil.copytree(args.static_dir, args.output_dir, dirs_exist_ok=True)
|
||||||
|
|
||||||
config = get_config('config.ini')
|
config = get_config('config.ini')
|
||||||
|
|
||||||
env = Environment(
|
env = Environment(
|
||||||
|
|||||||
Reference in New Issue
Block a user