git ssb

0+

Grey the earthling / scuttleblog



Commit 8b2cfc6a3971d343006e0db90b5eab327c4d9692

Remove unmanaged hugo config files at runtime

Not at install time.
Greg K Nicholson committed on 10/15/2017, 5:04:28 PM
Parent: 3e4cd5cd53d0b8d6f4964b7960386bb0b6763182

Files changed

install.shchanged
scuttleblog.pychanged
install.shView
@@ -4,5 +4,4 @@
44 sbot invite.accept 'pub.hacky.af:30434:@VqbBx7dr72FQwO5ztq4FULpareSMFSwegY1Ruh7XpjA=.ed25519~fvs5DS7+n+WL0TjLCIZNBLgkLrI7JR8oP6zo0lp/+tc='
55 hugo new site hugo
66 cd hugo
77 git submodule add -f https://github.com/budparr/gohugo-theme-ananke.git themes/ananke
8-rm config.toml
scuttleblog.pyView
@@ -29,8 +29,10 @@
2929 import subprocess
3030
3131 import conf
3232
33 +scuttleblog_dir = os.path.dirname(__file__)
34 +
3335 def run_sbot():
3436 for attempt in range(100):
3537 try:
3638 subprocess.check_output(['sbot', 'status'])
@@ -121,8 +123,11 @@
121123 return (hugo_config)
122124
123125 def write_hugo_config_from_user(ssb_userid):
124126 metadata = get_user_metadata(ssb_userid)
127 + for file in ['hugo/config.toml', 'hugo/config.yaml']:
128 + if os.path.exists(file):
129 + os.remove(file)
125130 with open('hugo/config.json', 'w') as f:
126131 f.write (json.dumps(build_hugo_config(metadata), indent = 4))
127132 # TODO: add the user's image in the right place
128133

Built with git-ssb-web