Commits

murarth committed 5fd5597

Added configuration values for <meta> description and keywords

Comments (0)

Files changed (4)

development.ini.example

 contact_email = admin@my-reddish-site.com
 # Expiry of 'remember me' cookies
 cookie_expires = 1y
+# Default frontpage communities
+default_communities =
+# Noun used to indicate a user
+demonym = user
+# Plural form of demonym
+demonym_pl = users
+# Short website description
+description =
 # Default domain name
 domain = my-reddish-site.com
 # Accepted domain names which won't result in a redirect
 # Implicitly includes above named domain
 domains = other-reddish-site.com
-# Noun used to indicate a user
-demonym = user
-# Plural form of demonym
-demonym_pl = users
-# Default frontpage communities
-default_communities =
 # Domain in From header for outgoing email; defaults to 'domain' if missing
 email_domain = my-reddish-site.com
 # Whether to enable CAPTCHA verification for submissions and registration
 icon = /icons/my-icon.png
 # MIME type for icon
 icon_type = image/png
+# Comma-separated list of website keywords
+keywords =
 # Whether to log server errors
 log_errors = false
 # URI to alternate compiled Javascript

production.ini.example

 contact_email = admin@my-reddish-site.com
 # Expiry of 'remember me' cookies
 cookie_expires = 1y
+# Default frontpage communities
+default_communities =
+# Noun used to indicate a user
+demonym = user
+# Plural form of demonym
+demonym_pl = users
+# Short website description
+description =
 # Default domain name
 domain = my-reddish-site.com
 # Accepted domain names which won't result in a redirect
 # Implicitly includes above named domain
 domains = other-reddish-site.com
-# Noun used to indicate a user
-demonym = user
-# Plural form of demonym
-demonym_pl = users
-# Default frontpage communities
-default_communities =
 # Domain in From header for outgoing email; defaults to 'domain' if missing
 email_domain = my-reddish-site.com
 # Whether to enable CAPTCHA verification for submissions and registration
 icon = /icons/my-icon.png
 # MIME type for icon
 icon_type = image/png
+# Comma-separated list of website keywords
+keywords =
 # Whether to log server errors
 log_errors = false
 # URI to alternate compiled Javascript

reddish/lib/app_globals.py

         ('contact_email', unicode, required),
         ('cookie_expires', h.parse_duration, None),
         ('debug', asbool, False),
+        ('default_communities', lower_space_sep_list, ''),
         ('demonym', unicode, 'user'),
         ('demonym_pl', unicode, 'users'),
-        ('default_communities', lower_space_sep_list, ''),
+        ('description', unicode, required),
         ('domain', unicode, required),
         ('domains', lower_space_sep_set, ''),
         ('email_domain', str, None),
         ('https_domain', unicode, None),
         ('icon', unicode, None),
         ('icon_type', unicode, None),
+        ('keywords', unicode, None),
         ('log_errors', asbool, False),
         ('script_name', unicode, '/script/reddish.js'),
         ('secret', str, required),

reddish/templates/base.mako

 <title><%block name="title">${g.title}\
 ${' - ' + g.headline if g.headline else ''}</%block></title>
 <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
-<%block name="meta"/>\
+<meta name="description" content="\
+<%block name="description" filter="h">${g.description}</%block>"/>
+% if g.keywords:
+<meta name="keywords" content="${g.keywords}"/>
+% endif
+<meta name="title" content="${self.title()}"/>
 % if g.icon:
 <link rel="icon" type="${g.icon_type}" href="${url(g.icon)}"/>
 % endif