Set title to be article's title
This commit is contained in:
@@ -12,6 +12,14 @@ class Post(Index):
|
||||
post_elem = post_nodes[0]
|
||||
post_elem.parentNode.removeChild(post_elem)
|
||||
|
||||
title_nodes = dom.getElementsByTagName("title")
|
||||
|
||||
# Set title to be title's post
|
||||
for node in title_nodes:
|
||||
if node.hasChildNodes():
|
||||
node.removeChild(node.childNodes[0])
|
||||
node.appendChild(dom.createTextNode(post.title))
|
||||
|
||||
def generate(self, blog, src, output):
|
||||
from dynastie.models import Post, Blog
|
||||
|
||||
|
Reference in New Issue
Block a user