summaryrefslogtreecommitdiff
path: root/src/pyssg/pyssg.py
diff options
context:
space:
mode:
authorDavid Luevano Alvarado <david@luevano.xyz>2022-12-05 05:03:45 -0600
committerDavid Luevano Alvarado <david@luevano.xyz>2022-12-05 05:03:45 -0600
commit0b8441c79b047f81526bbb83febc40d7530e35d6 (patch)
tree71f4f3b51685fc81cda226476302c9084146ab39 /src/pyssg/pyssg.py
parente69392a52f102d169c7d80994d169ba0743747a1 (diff)
add extra configuration for more control, add pyssg.xyz example
this is the first step towards creating a way to handle multiple subdomains/configs in a single run for a more cohesive site generation
Diffstat (limited to 'src/pyssg/pyssg.py')
-rw-r--r--src/pyssg/pyssg.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/pyssg/pyssg.py b/src/pyssg/pyssg.py
index acf4542..718e043 100644
--- a/src/pyssg/pyssg.py
+++ b/src/pyssg/pyssg.py
@@ -85,7 +85,8 @@ def main() -> None:
if args['init']:
log.info('initializing the directory structure and copying over templates')
create_dir(config['path']['src'])
- create_dir(os.path.join(config['path']['dst'], 'tag'), True)
+ # dst gets created on builder
+ # create_dir(config['path']['dst'])
create_dir(config['path']['plt'])
files: list[str] = ['index.html',
'page.html',
@@ -103,12 +104,10 @@ def main() -> None:
if args['build']:
log.info('building the html files')
- # TODO: need to add this to the config and not assume it
- db_path: str = os.path.join(config['path']['src'], '.files')
- db: Database = Database(db_path)
+ db: Database = Database(config['path']['db'])
db.read()
- builder: Builder = Builder(config, db)
+ builder: Builder = Builder(config, db, "/")
builder.build()
db.write()