Commits

wuhan88 committed 3ff08a2

Change this to the description of your blog for seo

  • Participants
  • Parent commits 11ab92f

Comments (0)

Files changed (4)

File tinkerer/__templates/conf.py

 # Change this to the tagline of your blog
 tagline = 'Add intelligent tagline here'                  
 
+#Change this to the description of your blog for seo
+description = 'Tinkerer is a static website generator powered by Sphinx'
+
 # Change this to your name
 author = 'Winston Smith'
 

File tinkerer/ext/blog.py

     '''
     # new config values
     app.add_config_value("tagline", "My blog", True)
+    app.add_config_value("description", "My blog", True)
     app.add_config_value("author", "Winston Smith", True)
     app.add_config_value("rss_service", None, True)
     app.add_config_value("website", "http://127.0.0.1/blog/html/", True)

File tinkerer/ext/metadata.py

 
     # blog tagline and pages
     context["tagline"] = app.config.tagline
+    context["description"] = app.config.description
     context["pages"] = env.blog_page_list
 
     # set translation context variables

File tinkerer/themes/boilerplate/layout.html

         <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
         {{ metatags }}
         {%- block htmltitle -%}
-        <title>{{ title|striptags|e }}{{ titlesuffix }}</title>
+          {%- if title== "Home" -%}
+             <title>{{ docstitle|e }}</title>
+          {%- else -%} 
+             <title>{{ title|striptags|e }}{{ titlesuffix }}</title>
+          {%- endif -%} 
         {%- endblock -%}
-        <meta name="description" content="">
+        <meta name="description" content="{{ description }}">
         <meta name="viewport" content="width=device-width">