diff --git a/daemon.py b/daemon.py index e5e050d3b..f50ca9d85 100644 --- a/daemon.py +++ b/daemon.py @@ -3315,7 +3315,7 @@ class PubServer(BaseHTTPRequestHandler): return linksFilename = baseDir + '/accounts/links.txt' - aboutFilename = baseDir + '/accounts/about.txt' + aboutFilename = baseDir + '/accounts/about.md' TOSFilename = baseDir + '/accounts/tos.md' # extract all of the text fields into a dict diff --git a/webapp_about.py b/webapp_about.py index 9493c1b59..d7a9c35cb 100644 --- a/webapp_about.py +++ b/webapp_about.py @@ -18,9 +18,9 @@ def htmlAbout(cssCache: {}, baseDir: str, httpPrefix: str, """Show the about screen """ adminNickname = getConfigParam(baseDir, 'admin') - if not os.path.isfile(baseDir + '/accounts/about.txt'): - copyfile(baseDir + '/default_about.txt', - baseDir + '/accounts/about.txt') + if not os.path.isfile(baseDir + '/accounts/about.md'): + copyfile(baseDir + '/default_about.md', + baseDir + '/accounts/about.md') if os.path.isfile(baseDir + '/accounts/login-background-custom.jpg'): if not os.path.isfile(baseDir + '/accounts/login-background.jpg'): @@ -28,8 +28,8 @@ def htmlAbout(cssCache: {}, baseDir: str, httpPrefix: str, baseDir + '/accounts/login-background.jpg') aboutText = 'Information about this instance goes here.' - if os.path.isfile(baseDir + '/accounts/about.txt'): - with open(baseDir + '/accounts/about.txt', 'r') as aboutFile: + if os.path.isfile(baseDir + '/accounts/about.md'): + with open(baseDir + '/accounts/about.md', 'r') as aboutFile: aboutText = aboutFile.read() aboutForm = '' diff --git a/webapp_column_left.py b/webapp_column_left.py index c2fc8da78..a7d143102 100644 --- a/webapp_column_left.py +++ b/webapp_column_left.py @@ -17,6 +17,7 @@ from webapp_utils import headerButtonsFrontScreen from webapp_utils import htmlHeaderWithExternalStyle from webapp_utils import htmlFooter from webapp_utils import getBannerFile +from webapp_utils import markdownToHtml def _linksExist(baseDir: str) -> bool: @@ -411,11 +412,11 @@ def htmlEditLinks(cssCache: {}, translate: {}, baseDir: str, path: str, adminNickname = getConfigParam(baseDir, 'admin') if adminNickname: if nickname == adminNickname: - aboutFilename = baseDir + '/accounts/about.txt' + aboutFilename = baseDir + '/accounts/about.md' aboutStr = '' if os.path.isfile(aboutFilename): with open(aboutFilename, 'r') as fp: - aboutStr = fp.read() + aboutStr = markdownToHtml(fp.read()) editLinksForm += \ '
'