Added "description" meta
authorThierry Florac <tflorac@ulthar.net>
Wed, 24 Oct 2018 15:52:37 +0200
changeset 446 6a8890f9c810
parent 445 45e5a057b7c6
child 447 9b174c5d1b70
Added "description" meta
src/pyams_skin/metas.py
--- a/src/pyams_skin/metas.py	Wed Oct 24 15:42:20 2018 +0200
+++ b/src/pyams_skin/metas.py	Wed Oct 24 15:52:37 2018 +0200
@@ -9,24 +9,19 @@
 # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
 # FOR A PARTICULAR PURPOSE.
 #
-from pyams_i18n.interfaces import II18n
-from pyams_skin.interfaces.configuration import IConfiguration
-from pyams_utils.interfaces.site import ISiteRoot
 
 __docformat__ = 'restructuredtext'
 
+from pyramid.interfaces import IRequest
+from zope.interface import Interface, implementer
 
-# import standard library
-
-# import interfaces
+from pyams_i18n.interfaces import II18n
+from pyams_skin.interfaces.configuration import IConfiguration
 from pyams_skin.interfaces.extension import IGoogleAnalyticsInfo
 from pyams_skin.interfaces.metas import IHTMLContentMetas, IMetaHeader
+from pyams_utils.adapter import ContextRequestViewAdapter, adapter_config
+from pyams_utils.interfaces.site import ISiteRoot
 from pyams_utils.interfaces.tales import ITALESExtension
-from pyramid.interfaces import IRequest
-
-# import packages
-from pyams_utils.adapter import adapter_config, ContextRequestViewAdapter
-from zope.interface import implementer, Interface
 
 
 #
@@ -172,6 +167,7 @@
     def get_metas(self):
         config = IConfiguration(self.context)
         yield HTMLTagMeta('title', config.title)
+        yield ContentMeta('description', config.description)
 
 
 @adapter_config(name='content-type', context=(Interface, Interface, Interface), provides=IHTMLContentMetas)