mirror of https://gitlab.com/octtspacc/staticoso
Switch to <li> for right section list
This commit is contained in:
parent
a236e46dfa
commit
5a71f9f306
|
@ -49,17 +49,16 @@ def GetTitleIdLine(Line, Title):
|
||||||
NewLine += Line[:Index]
|
NewLine += Line[:Index]
|
||||||
NewLine += "{}(id='{}')".format(Line[Index:Index+2], Title)
|
NewLine += "{}(id='{}')".format(Line[Index:Index+2], Title)
|
||||||
NewLine += Line[Index+2:]
|
NewLine += Line[Index+2:]
|
||||||
print(NewLine)
|
|
||||||
return NewLine
|
return NewLine
|
||||||
|
|
||||||
def FormatTitles(Titles):
|
def FormatTitles(Titles):
|
||||||
MDTitles = ''
|
MDTitles = ''
|
||||||
for t in Titles:
|
for t in Titles:
|
||||||
n = t.split(' ')[0].count('#')
|
n = t.split(' ')[0].count('#')
|
||||||
Heading = '\-'*n + ' '
|
Heading = '- ' * n
|
||||||
Title = t.lstrip('#')
|
Title = t.lstrip('#')
|
||||||
Title = '[{}](#{})'.format(Title, DashifyStr(Title))
|
Title = '[{}](#{})'.format(Title, DashifyStr(Title))
|
||||||
MDTitles += Heading + Title + ' \n'
|
MDTitles += Heading + Title + '\n'
|
||||||
return Markdown().convert(MDTitles)
|
return Markdown().convert(MDTitles)
|
||||||
|
|
||||||
def LoadFromDir(Dir):
|
def LoadFromDir(Dir):
|
||||||
|
@ -116,7 +115,6 @@ def PreProcessor(p):
|
||||||
Heading = ls.split(' ')[0].count('#')
|
Heading = ls.split(' ')[0].count('#')
|
||||||
if Heading > 0:
|
if Heading > 0:
|
||||||
Titles += [ls]
|
Titles += [ls]
|
||||||
print(Content)
|
|
||||||
return Content, Titles, Meta
|
return Content, Titles, Meta
|
||||||
|
|
||||||
def PugCompileList(Pages):
|
def PugCompileList(Pages):
|
||||||
|
@ -152,7 +150,6 @@ def MakeSite(Templates, Parts):
|
||||||
for File in Path('Pages').rglob('*.pug'):
|
for File in Path('Pages').rglob('*.pug'):
|
||||||
File = str(File)[len('Pages/'):]
|
File = str(File)[len('Pages/'):]
|
||||||
Content, Titles, Meta = PreProcessor('Pages/{}'.format(File))
|
Content, Titles, Meta = PreProcessor('Pages/{}'.format(File))
|
||||||
print(Content)
|
|
||||||
Pages += [[File, Content, Titles, Meta]]
|
Pages += [[File, Content, Titles, Meta]]
|
||||||
PugCompileList(Pages)
|
PugCompileList(Pages)
|
||||||
for File, Content, Titles, Meta in Pages:
|
for File, Content, Titles, Meta in Pages:
|
||||||
|
|
Loading…
Reference in New Issue