Commits

sirex  committed 14285e6

Fixed pages urls and upload issues.

  • Participants
  • Parent commits a924527

Comments (0)

Files changed (2)

File pelican.conf.py

 DELETE_OUTPUT_DIRECTORY = True
 
 
+PAGE_URL = '{slug}.html'
+PAGE_SAVE_AS = '{slug}.html'
+PAGE_LANG_URL = '{slug}-{lang}.html'
+PAGE_LANG_SAVE_AS = '{slug}-{lang}.html'
+
+
 def popular_tags(tags, count=10):
     sorted_tags = sorted(tags, key=itemgetter(1, 0))
     return [tag[1][0] for tag in zip(range(count), sorted_tags)
         target=_get_thumbs_targets(ctx, src), update_outputs=True)
 
     ctx(rule='cd content && ../bin/pelican -s ../pelican.conf.py '
-             '-o ../output/public .',
-        target='output/public/index.html',
+             '-o ../output/public_html .',
+        target='output/public_html/index.html',
         source=['bin/pelican', 'pelican.conf.py',
                 'theme/static/css/main.css'] +
                ctx.path.ant_glob('content/**/*') +
         '.lock-wafbuild', 'config.log', 'c4che', Context.DBFILE,
 
         # pelican generated files
-        'output/public'
+        'output/public_html'
     ):
         if os.path.exists(pth):
             Logs.info('cleaning: %s' % pth)
 
 def upload_lftp(ctx):
     "upload generated content to server using lftp mirror command"
-    ctx.exec_command('cd output/public && lftp -e "%s" sirex' %
+    ctx.exec_command('cd output/public_html && lftp -e "%s" sirex' %
                      'mirror --reverse --delete --verbose=2')
 
 
     now = datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')
     ctx.exec_command(' && '.join([
         'cd output',
+        'hg addremove',
         'hg ci -m "Auto upload %s"' % now,
         'hg ftp --upload',
     ]))