@@ -88,7 +88,7 @@ def cleanFile(self):
8888
8989
9090    def  defaultConfig (self ):
91-         dconfig = {"singlePage" :[],"startSite" :"" ,"filingNum" :"" ,"onePageListNum" :15 ,"commentLabelColor" :"#006b75" ,"yearColorList" :["#bc4c00" , "#0969da" , "#1f883d" , "#A333D0" ],"i18n" :"CN" ,"themeMode" :"manual" ,"dayTheme" :"light" ,"nightTheme" :"dark" ,"urlMode" :"pinyin" ,"script" :"" ,"style" :"" ,"indexScript" :"" ,"indexStyle" :"" ,"bottomText" :"" ,"showPostSource" :1 ,"iconList" :{},"UTC" :+ 8 ,"rssSplit" :"sentence" ,"exlink" :{},"needComment" :1 ,"allHead" :"" }
91+         dconfig = {"singlePage" :[],"startSite" :"" ,"filingNum" :"" ,"onePageListNum" :15 ,"commentLabelColor" :"#006b75" ,"yearColorList" :["#bc4c00" , "#0969da" , "#1f883d" , "#A333D0" ],"i18n" :"CN" ,"themeMode" :"manual" ,"dayTheme" :"light" ,"nightTheme" :"dark" ,"urlMode" :"pinyin" ,"script" :"" ,"style" :"" ,"head"  : "" , " indexScript""" ,"indexStyle" :"" ,"bottomText" :"" ,"showPostSource" :1 ,"iconList" :{},"UTC" :+ 8 ,"rssSplit" :"sentence" ,"exlink" :{},"needComment" :1 ,"allHead" :"" }
9292        config = json .loads (open ('config.json' , 'r' , encoding = 'utf-8' ).read ())
9393        self .blogBase = {** dconfig ,** config }.copy ()
9494        self .blogBase ["postListJson" ]= json .loads ('{}' )
@@ -188,6 +188,7 @@ def createPostHtml(self,issue):
188188        postBase ["commentNum" ]= issue ["commentNum" ]
189189        postBase ["style" ]= issue ["style" ]
190190        postBase ["script" ]= issue ["script" ]
191+         postBase ["head" ]= issue ["head" ]
191192        postBase ["top" ]= issue ["top" ]
192193        postBase ["postSourceUrl" ]= issue ["postSourceUrl" ]
193194        postBase ["repoName" ]= options .repo_name 
@@ -371,6 +372,11 @@ def addOnePostJson(self,issue):
371372            else :
372373                self .blogBase [listJsonName ][postNum ]["script" ]= self .blogBase ["script" ]
373374
375+             if  "head"  in  postConfig :
376+                 self .blogBase [listJsonName ][postNum ]["head" ]= self .blogBase ["head" ]+ str (postConfig ["head" ])
377+             else :
378+                 self .blogBase [listJsonName ][postNum ]["head" ]= self .blogBase ["head" ]
379+ 
374380            if  "ogImage"  in  postConfig :
375381                self .blogBase [listJsonName ][postNum ]["ogImage" ]= postConfig ["ogImage" ]
376382            else :
@@ -478,6 +484,7 @@ def createFileName(self,issue,useLabel=False):
478484    del  blog .blogBase ["postListJson" ][i ]["createdAt" ]
479485    del  blog .blogBase ["postListJson" ][i ]["script" ]
480486    del  blog .blogBase ["postListJson" ][i ]["style" ]
487+     del  blog .blogBase ["postListJson" ][i ]["head" ]
481488    del  blog .blogBase ["postListJson" ][i ]["top" ]
482489    del  blog .blogBase ["postListJson" ][i ]["ogImage" ]
483490
0 commit comments