mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-02 19:59:12 +00:00
[website] [fix] explicitly pass meta description
This commit is contained in:
@@ -81,3 +81,4 @@ class DocType(DocTypeNestedSet):
|
|||||||
if self.doc.slideshow:
|
if self.doc.slideshow:
|
||||||
from website.helpers.slideshow import get_slideshow
|
from website.helpers.slideshow import get_slideshow
|
||||||
get_slideshow(self)
|
get_slideshow(self)
|
||||||
|
|
||||||
@@ -76,10 +76,12 @@ class DocType:
|
|||||||
self.doc.full_name = get_fullname(self.doc.owner)
|
self.doc.full_name = get_fullname(self.doc.owner)
|
||||||
self.doc.updated = global_date_format(self.doc.published_on)
|
self.doc.updated = global_date_format(self.doc.published_on)
|
||||||
self.doc.content_html = self.doc.content
|
self.doc.content_html = self.doc.content
|
||||||
|
|
||||||
if self.doc.blogger:
|
if self.doc.blogger:
|
||||||
self.doc.blogger_info = webnotes.doc("Blogger", self.doc.blogger).fields
|
self.doc.blogger_info = webnotes.doc("Blogger", self.doc.blogger).fields
|
||||||
|
|
||||||
self.doc.description = self.doc.blog_intro or self.doc.content[:140]
|
self.doc.description = self.doc.blog_intro or self.doc.content[:140]
|
||||||
|
self.doc.meta_description = self.doc.description
|
||||||
|
|
||||||
self.doc.categories = webnotes.conn.sql_list("select name from `tabBlog Category` order by name")
|
self.doc.categories = webnotes.conn.sql_list("select name from `tabBlog Category` order by name")
|
||||||
|
|
||||||
|
|||||||
@@ -44,3 +44,5 @@ class DocType():
|
|||||||
if self.doc.slideshow:
|
if self.doc.slideshow:
|
||||||
from website.helpers.slideshow import get_slideshow
|
from website.helpers.slideshow import get_slideshow
|
||||||
get_slideshow(self)
|
get_slideshow(self)
|
||||||
|
|
||||||
|
self.doc.meta_description = self.doc.description
|
||||||
|
|||||||
Reference in New Issue
Block a user