mirror of
https://gitlab.com/octtspacc/staticoso
synced 2025-06-05 22:09:23 +02:00
Small improvements
This commit is contained in:
@@ -63,7 +63,7 @@ def GetConfMenu(Entries, MarkdownExts):
|
||||
for i in Entries:
|
||||
e = Entries[i]
|
||||
if not ((e.startswith('<') or e.startswith('[') or e.startswith('- ')) and (e.endswith('>') or e.endswith(')') or e.endswith('}'))):
|
||||
if not (e.lower().endswith('.html') or e.lower().endswith('.htm')):
|
||||
if not e.lower().endswith(FileExtensions['HTML']):
|
||||
e += '.html'
|
||||
Menu[int(i)] = e
|
||||
return Menu
|
||||
|
@@ -443,13 +443,13 @@ def MakeSite(TemplatesText, StaticPartsText, DynamicParts, DynamicPartsText, Con
|
||||
print("[I] Writing Pages")
|
||||
for File, Content, Titles, Meta in Pages:
|
||||
PagePath = 'public/{}.html'.format(StripExt(File))
|
||||
if File.lower().endswith(('.markdown', '.md')):
|
||||
if File.lower().endswith(FileExtensions['Markdown']):
|
||||
Content = markdown(PagePostprocessor('md', Content, Meta), extensions=MarkdownExts)
|
||||
elif File.lower().endswith(('.pug')):
|
||||
Content = PagePostprocessor('pug', ReadFile(PagePath), Meta)
|
||||
elif File.lower().endswith(('.txt')):
|
||||
Content = '<pre>' + Content + '</pre>'
|
||||
elif File.lower().endswith(('.htm', '.html')):
|
||||
elif File.lower().endswith(FileExtensions['HTML']):
|
||||
Content = ReadFile(PagePath)
|
||||
|
||||
TemplateMeta = TemplatePreprocessor(TemplatesText[Meta['Template']])
|
||||
|
Reference in New Issue
Block a user