blob: d16f6b7c28b48bffb5ebfa5ba030069b6114535f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
description = HTML.select_one(page, "#meta-tags .description")
if description then
description_contents = HTML.strip_tags(description)
head = HTML.select_one(page, "head")
HTML.append_child(head, HTML.parse('<meta name="description" content="' .. description_contents .. '">'))
else
Log.warning("Missing description in " .. page_file)
end
HTML.delete(description)
timestamps = HTML.select_one(page, "#timestamps")
if timestamps then
HTML.delete(timestamps)
target = HTML.select_one(page, "#whoami")
HTML.insert_after(target, timestamps)
end
|