Skip to content

Commit

Permalink
Add theme
Browse files Browse the repository at this point in the history
  • Loading branch information
heqin-zhu committed Mar 7, 2019
1 parent f9bffc4 commit 1ba8b1c
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions utils/genIndex.py
Expand Up @@ -52,12 +52,16 @@ def getIcon(name):
suf=name[name.rfind('.')+1:]
return FMT_DIC[suf] if suf in FMT_DIC else FMT_DIC['other']


def handleDir(target):
def prepare():
if os.path.exists(TARDIR):
os.system('rm -rf '+TARDIR)
try:os.mkdir(TARDIR)
try:
os.mkdir(TARDIR)
with open(os.path.join(TARDIR,'_config.yml'),'w',encoding='utf-8') as f:
f.write('theme: jekyll-theme-cayman\n')
except:return
def handleDir(target):
prepare()
n = len(target)
gen = os.walk(target)
for path,dirs,files in gen:
Expand Down

0 comments on commit 1ba8b1c

Please sign in to comment.