mirror of
https://gitlab.com/octtspacc/staticoso
synced 2025-06-05 22:09:23 +02:00
Add rel.canonical to redirects; Added alias for internal macros
This commit is contained in:
@@ -25,11 +25,12 @@ RedirectPageTemplate = """\
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>{TitlePrefix}Redirect</title>
|
||||
<meta http-equiv="refresh" content="0; url='{DestURL}'" />
|
||||
<title>{TitlePrefix}Redirect</title>
|
||||
<link rel="canonical" href="{SiteDomain}/{DestURL}">
|
||||
<meta http-equiv="refresh" content="0; url='{DestURL}'">
|
||||
</head>
|
||||
<body>
|
||||
<p><a href="{DestURL}">{StrClick}</a> {StrRedirect}.</p>
|
||||
<p><a href="{DestURL}">{StrClick}</a> {StrRedirect}.</p>
|
||||
</body>
|
||||
</html>
|
||||
"""
|
||||
|
@@ -347,6 +347,7 @@ def PatchHTML(File, HTML, StaticPartsText, DynamicParts, DynamicPartsText, HTMLP
|
||||
for e in Meta['Macros']:
|
||||
HTML = ReplWithEsc(HTML, f"[:{e}:]", Meta['Macros'][e])
|
||||
for e in FolderRoots:
|
||||
HTML = ReplWithEsc(HTML, f"<staticoso:CustomPath:{e}>", FolderRoots[e])
|
||||
HTML = ReplWithEsc(HTML, f"[staticoso:Folder:{e}:AbsoluteRoot]", FolderRoots[e])
|
||||
HTML = ReplWithEsc(HTML, f"<staticoso:Folder:{e}:AbsoluteRoot>", FolderRoots[e])
|
||||
for e in Categories:
|
||||
@@ -362,6 +363,7 @@ def PatchHTML(File, HTML, StaticPartsText, DynamicParts, DynamicPartsText, HTMLP
|
||||
'<staticoso:PageTitle>': Title,
|
||||
'[staticoso:Page:Description]': Description,
|
||||
'<staticoso:PageDescription>': Description,
|
||||
'<staticoso:SiteDomain>': SiteDomain,
|
||||
'[staticoso:Site:Name]': SiteName,
|
||||
'<staticoso:SiteName>': SiteName,
|
||||
'[staticoso:Site:AbsoluteRoot]': SiteRoot,
|
||||
@@ -372,6 +374,7 @@ def PatchHTML(File, HTML, StaticPartsText, DynamicParts, DynamicPartsText, HTMLP
|
||||
for e in Meta['Macros']:
|
||||
ContentHTML = ReplWithEsc(ContentHTML, f"[:{e}:]", Meta['Macros'][e])
|
||||
for e in FolderRoots:
|
||||
ContentHTML = ReplWithEsc(ContentHTML, f"<staticoso:CustomPath:{e}>", FolderRoots[e])
|
||||
ContentHTML = ReplWithEsc(ContentHTML, f"[staticoso:Folder:{e}:AbsoluteRoot]", FolderRoots[e])
|
||||
ContentHTML = ReplWithEsc(ContentHTML, f"<staticoso:Folder:{e}:AbsoluteRoot>", FolderRoots[e])
|
||||
for e in Categories:
|
||||
|
Reference in New Issue
Block a user