From e44924eda6767ccf45b2531b7566270d31431fbc Mon Sep 17 00:00:00 2001 From: octospacc Date: Sun, 28 Aug 2022 17:12:52 +0200 Subject: [PATCH] Change generation of clickable title links --- Source/Modules/Site.py | 5 +++-- TODO | 7 ++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Source/Modules/Site.py b/Source/Modules/Site.py index ebe4ea4..b87d624 100644 --- a/Source/Modules/Site.py +++ b/Source/Modules/Site.py @@ -22,10 +22,11 @@ def DashifyTitle(Title, Done=[]): def MakeLinkableTitle(Line, Title, DashTitle, Type): if Type == 'md': Index = Title.split(' ')[0].count('#') - return f'» {Title[Index+1:]}' + #return f'{Title[Index+1:]}' + return f'» {Title[Index+1:]}' elif Type == 'pug': Index = Line.find('h') - return f"{Line[:Index]}{Line[Index:Index+2]}(id='{DashTitle}' class='SectionTitle') #[span(class='SectionLink') #[a(href='#{DashTitle}') #[span »]] ]{Line[Index+2:]}" + return f"{Line[:Index]}{Line[Index:Index+2]}.SectionHeading #[span.SectionLink #[a(href='#{DashTitle}') #[span »]] ]#[span#{DashTitle}.SectionTitle {Line[Index+2:]}]" def GetTitle(FileName, Meta, Titles, Prefer='MetaTitle', BlogName=None): if Prefer == 'BodyTitle': diff --git a/TODO b/TODO index 60b565e..1c078f1 100644 --- a/TODO +++ b/TODO @@ -1,6 +1,7 @@ -- Check if external tools are installed -- Specify input folder(s) and files (idea is Makefile compatibility too) -- Customize meta line source +- Check if external tools (pug-cli, html2gmi) are installed +- Fix and optimize differential building +- Specify input folder(s) +- Customize HTML source code for Meta lines / page lists - Show page size/words/time in meta line - Add feed support for diary-like pages - Fix excess whitespace in some section/menu titles