yll 4 years ago
parent
commit
063c7b0f7a
2 changed files with 9 additions and 6 deletions
  1. 5 5
      README.md
  2. 4 1
      githublog.py

+ 5 - 5
README.md

@@ -1,8 +1,8 @@
 ## posts
 ## posts
 
 
-- ["mustache 模板引擎中文文档"](http://git.wanbits.io/joe/blog\content\mustache.md)
-- ["好网站 一辈子"](http://git.wanbits.io/joe/blog\content\best-sites.md)
-- ["mysql commands"](http://git.wanbits.io/joe/blog\content\daily-mysql.md)
-- ["环境变量配置"](http://git.wanbits.io/joe/blog\content\env.md)
-- ["git in real world"](http://git.wanbits.io/joe/blog\content\git-in-real-world.md)
+- ["mustache 模板引擎中文文档"](http://git.wanbits.io/joe/blog/src/master/content/mustache.md)
+- ["好网站 一辈子"](http://git.wanbits.io/joe/blog/src/master/content/best-sites.md)
+- ["mysql commands"](http://git.wanbits.io/joe/blog/src/master/content/daily-mysql.md)
+- ["环境变量配置"](http://git.wanbits.io/joe/blog/src/master/content/env.md)
+- ["git in real world"](http://git.wanbits.io/joe/blog/src/master/content/git-in-real-world.md)
 
 

+ 4 - 1
githublog.py

@@ -11,6 +11,7 @@ This will make blog repo to be a blog inplace.
 import os
 import os
 import string
 import string
 import subprocess
 import subprocess
+from posixpath import join as urljoin
 
 
 POSTS_ROOT = 'content'
 POSTS_ROOT = 'content'
 EXTS = ['.md', '.rst']
 EXTS = ['.md', '.rst']
@@ -83,6 +84,8 @@ with open(README, 'wt', encoding='utf-8') as h:
         h.write('## {}\n\n'.format(k))
         h.write('## {}\n\n'.format(k))
         v = sorted(v, key=lambda metas: metas.get('date'), reverse=True)
         v = sorted(v, key=lambda metas: metas.get('date'), reverse=True)
         for metas in v:
         for metas in v:
-            h.write('- [{}]({})\n'.format(metas.get('title'), os.path.join(remote, POSTS_ROOT, metas.get('file'))))
+            h.write('- [{}]({})\n'.format(metas.get('title'), urljoin(remote, 'src/master', POSTS_ROOT, metas.get('file'))))
+        
         h.write('\n')
         h.write('\n')
+
 print('done.')
 print('done.')