Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Various changes (Not very helpfull comment I know, I'll do better nex…

…t time)
  • Loading branch information...
commit 9f79202c1d0fa82ea0eb29b23aea2d96f0f4d711 1 parent c85fe5f
@varunpant authored
View
7 .gitignore
@@ -1,4 +1,7 @@
*.py[co]
+blog.css
+varunpant.jpg
+BlogML.xml
# Packages
*.egg
@@ -34,4 +37,6 @@ pip-log.txt
.idea
.pydevproject
node_modules
-out
+.font-awesome
+out
+p
View
7 app.py
@@ -38,14 +38,19 @@
'/admin/settings', 'controllers.admin_controller.Settings',
'/sitemap.xml', 'controllers.api_controller.Sitemap',
+ '/sitemap', 'controllers.api_controller.Sitemap',
+ '/sitemap.xsd', 'controllers.api_controller.Sitemap',
'/sitemap.xsl', 'controllers.api_controller.SitemapStyle',
'/rsd.xml', 'controllers.api_controller.Rsd',
'/rsd.axd', 'controllers.api_controller.Rsd',
'/wlwmanifest.xml', 'controllers.api_controller.Wlwmanifest',
'/metaweblog.xml', 'controllers.api_controller.Metaweblog',
'/feed.xml', 'controllers.api_controller.Feed',
+ '/feed', 'controllers.api_controller.Feed',
'/opensearch.axd', 'controllers.api_controller.Opensearch',
+ '/opensearch', 'controllers.api_controller.Opensearch',
'/robots.txt', 'controllers.api_controller.Robots',
+ '/robots', 'controllers.api_controller.Robots',
'/(.+)', 'controllers.main_controller.PageSlug'
)
@@ -55,7 +60,7 @@
from controllers import main_controller
app.notfound = main_controller.notfound
-#app.internalerror = main_controller.internalerror
+app.internalerror = main_controller.internalerror
#application = app.wsgifunc()
View
5 controllers/admin_controller.py
@@ -8,7 +8,8 @@
# General Housekeeping ########################################################
###############################################################################
-blog_settings = settings_service.get_settings()
+blog_settings = settings_service.Settings().get_settings()
+
start_index = shared_helper.start_index
safe_number = shared_helper.safe_number
total_page = shared_helper.total_page
@@ -256,7 +257,7 @@ def GET(self):
@requires_auth
class Settings:
def GET(self):
- settings = settings_service.get_settings()
+ settings = settings_service.Settings().get_settings()
return render.settings(settings, False)
def POST(self):
View
13 controllers/api_controller.py
@@ -10,7 +10,7 @@
all_cap_re = re.compile('([a-z0-9])([A-Z])')
before_dot = re.compile('(metaWeblog|blogger|mt|wp)\.')
-blog_settings = settings_service.get_settings()
+blog_settings = settings_service.Settings().get_settings()
global_settings = {'settings': blog_settings}
render = web.template.render('views/api', globals=global_settings)
@@ -23,6 +23,7 @@
class Sitemap:
def GET(self):
+ web.header('Content-Type', 'text/xml;charset=utf-8')
posts = post_service.get_all_published()
pages = page_service.get_all_published()
tags = tag_service.get_all()
@@ -34,7 +35,8 @@ def GET(self):
return render.sitemapXsl()
class Rsd:
- def GET(self):
+ def GET(self):
+ web.header('Content-Type', 'text/xml;charset=utf-8')
return render.rsd()
class Wlwmanifest:
@@ -45,18 +47,18 @@ class Metaweblog:
def POST(self):
web.header('Content-Type', 'text/xml;charset=utf-8')
xml = web.data()
- #print xml
+
if xml:
command = xmlrpclib.loads(xml)
name = before_dot.sub("", command[1])
- method = all_cap_re.sub(r'\1_\2', first_cap_re.sub(r'\1_\2', name)).lower()
- print method,":",command
+ method = all_cap_re.sub(r'\1_\2', first_cap_re.sub(r'\1_\2', name)).lower()
return metaweblog_service.__dict__[method](command[0])
else:
raise web.notfound("Invalid Post content.")
class Feed:
def GET(self):
+ web.header('Content-Type', 'text/xml;charset=utf-8')
posts = post_service.get_all(0, blog_settings.items_per_page)
if posts:
return render.atom(posts)
@@ -65,6 +67,7 @@ def GET(self):
class Opensearch:
def GET(self):
+ web.header('Content-Type', 'text/xml;charset=utf-8')
return render.opensearch()
class Robots:
View
28 controllers/main_controller.py
@@ -1,24 +1,23 @@
import web, calendar
-from services import shared_helper, post_service, tag_service, page_service, settings_service, search_service
-
+from services import shared_helper, post_service, tag_service, page_service, search_service, blog_cache, settings_service
###############################################################################
# General Housekeeping ########################################################
###############################################################################
-blog_settings = settings_service.get_settings()
+blog_settings = settings_service.Settings().get_settings()
start_index = shared_helper.start_index
safe_number = shared_helper.safe_number
total_page = shared_helper.total_page
-global_settings = {'settings': blog_settings }
+global_settings = {'settings': blog_settings, 'blog_cache':blog_cache.Cache() }
render = web.template.render('views/themes/light', base='base', globals=global_settings)
def notfound(msg):
raise web.notfound(render.notfound(msg))
-def internalerror(msg):
- raise web.internalerror("Bad, bad server. No donut for you.\n" + msg)
+def internalerror():
+ return web.internalerror(render.notfound("Bad, bad server. No donut for you."))
###############################################################################
# Routes Handlers #############################################################
@@ -69,21 +68,22 @@ def GET(self, slug, page):
page_count = total_page(count, blog_settings.items_per_page)
nextLink = previousLink = None
if page < page_count:
- nextLink = "/archives/" + str(page + 1)
+ nextLink = "/topics/" + slug + "/" + str(page + 1)
if page > 1 :
- previousLink = "/archives/" + str(page - 1)
+ previousLink = "/topics/" + slug + "/" + str(page - 1)
return render.index(posts, nextLink, previousLink)
else:
return notfound("The requested tag: " + slug + " was not found.")
class Archives:
def GET(self):
- posts = post_service.find_recent(blog_settings.items_per_page)
+ posts = post_service.get_all_published()
_archives = post_service.get_archives()
archives = []
+ tags = tag_service.get_published()
for archive in _archives:
- archives.append({'full_month':calendar.month_name[archive.month],'month':archive.month, 'year':archive.year, 'posts_count':archive.posts_count})
- return render.archive(posts, archives)
+ archives.append({'full_month':calendar.month_name[archive.month], 'month':archive.month, 'year':archive.year, 'posts_count':archive.posts_count})
+ return render.archive(posts, tags, archives)
class ArchivePage:
def GET(self, page):
@@ -119,7 +119,7 @@ def GET(self, page, year):
offset = start_index(page, blog_settings.items_per_page)
limit = blog_settings.items_per_page
posts = post_service.find_published_by_year(year, offset, limit)
- page_count = total_page(count,limit)
+ page_count = total_page(count, limit)
nextLink = previousLink = None
if page < page_count:
nextLink = "/archives/" + str(page + 1)
@@ -171,7 +171,7 @@ def GET(self, page, year, month, day):
return notfound("No archived posts were found.")
offset = start_index(page, blog_settings.items_per_page)
limit = blog_settings.items_per_page
- posts = post_service.find_published_by_year_month_and_day(safe_year, safe_month, safe_day, offset,limit)
+ posts = post_service.find_published_by_year_month_and_day(safe_year, safe_month, safe_day, offset, limit)
page_count = total_page(count, limit)
nextLink = previousLink = None
if page < page_count:
@@ -234,4 +234,4 @@ def GET(self):
msg = "No results were found for query \" " + q + " \""
- return render.search(q,count, result, nextLink, previousLink, msg)
+ return render.search(q, count, result, nextLink, previousLink, msg)
View
2  services/metaweblog_service.py
@@ -8,7 +8,7 @@
all_cap_re = re.compile('([a-z0-9])([A-Z])')
before_dot = re.compile('(metaWeblog|blogger|mt|wp)\.')
-blog_settings = settings_service.get_settings()
+blog_settings = settings_service.Settings().get_settings()
global_settings = {'settings': blog_settings}
safe_number = shared_helper.safe_number
render = web.template.render('views/api', globals=global_settings)
View
10 services/post_service.py
@@ -78,7 +78,7 @@ def count_published_by_tag(slug):
def get_archives():
session = getSession()
- return session.query(Archives).filter(Archives.posts_count > 0).order_by(Archives.month.desc(), Archives.year.desc()).all()
+ return session.query(Archives).filter(Archives.posts_count > 0).order_by(Archives.year.desc(),Archives.month.desc()).all()
###############################################################################
@@ -115,8 +115,8 @@ def update(postId, title, slug, content, published_at, excerpt, tags):
post.slug = shared_helper.to_url(post.slug) if isNotNull(post.slug) else shared_helper.to_url(post.title)
if tags is not None and len(tags)>0 :
tags = unique_tags(tags)
- tags_to_remove = filter(lambda t: t not in tags,post.tags)
- tags_to_add = filter(lambda t: not any(filter(lambda pt:pt == t,post.tags)),tags)
+ tags_to_remove = filter(lambda t: t.title.lower() not in tags,post.tags)
+ tags_to_add = filter(lambda t: not any(filter(lambda pt:pt.title.lower() == t,post.tags)),tags)
remove_tags(session,post, tags_to_remove)
add_tags(session,post, tags_to_add)
else:
@@ -194,7 +194,7 @@ def __commit(session,o):
session.commit()
return True
except Exception,e:
- print e
+ raise
return False
def __destroy(session,o):
@@ -203,6 +203,6 @@ def __destroy(session,o):
session.commit()
return True
except Exception,e:
- print e
+ raise
return False
View
68 services/settings_service.py
@@ -2,29 +2,7 @@
# Settings Querying Service #######################################################
###############################################################################
from models import getSession , Setting
-
-
-class CacheFetcher:
- def __init__(self):
- self.cache = None
- def fetch(self):
- if self.cache:
- return self.cache
- # Retrieve and cache
- session = getSession()
- #print "############# cached #############"
- self.cache = session.query(Setting).scalar()
- return self.cache
-
- def clear(self):
- self.cache = None
-
-def get_settings():
- return CacheFetcher().fetch()
-
-def reset():
- CacheFetcher().clear()
-
+
def update_settings(settings):
session = getSession()
current_settings = session.query(Setting).scalar()
@@ -51,13 +29,47 @@ def update_settings(settings):
try:
session.add(current_settings)
session.commit()
- reset();
- return get_settings()
+ s = Settings()
+ s.clear();
+ return s.get_settings()
except Exception, e:
print e
return None
- pass
-
-
+class Settings:
+
+ class __impl:
+ def __init__(self):
+ self.cache = None
+ def get_settings(self):
+ if self.cache:
+ return self.cache
+ # Retrieve and cache
+ session = getSession()
+ self.cache = session.query(Setting).scalar()
+ return self.cache
+
+ def clear(self):
+ self.cache = None
+
+ # storage for the instance reference
+ __instance = None
+
+ def __init__(self):
+ """ Create Settings instance """
+ # Check whether we already have an instance
+ if Settings.__instance is None:
+ # Create and remember instance
+ Settings.__instance = Settings.__impl()
+
+ # Store instance reference as the only member in the handle
+ self.__dict__['_Singleton__instance'] = Settings.__instance
+
+ def __getattr__(self, attr):
+ """ Delegate access to implementation """
+ return getattr(self.__instance, attr)
+
+ def __setattr__(self, attr, value):
+ """ Delegate access to implementation """
+ return setattr(self.__instance, attr, value)
View
2  services/tag_service.py
@@ -17,7 +17,7 @@ def get_all():
def get_published():
session = getSession()
- return session.query(Tag).filter(Tag.posts.any(Post.published_at != None)).order_by(Tag.title.desc()).all()
+ return session.query(Tag).filter(Tag.posts.any(Post.published_at != None)).order_by(Tag.posts_count.desc()).all()
def get_unpublished():
session = getSession()
View
1  views/admin/layout.html
@@ -15,6 +15,7 @@
<link href="/static/css/bootstrap.min.css" rel="stylesheet">
<link href="/static/css/bootstrap-responsive.min.css" rel="stylesheet">
<link href="/static/css/admin.css" rel="stylesheet">
+ <link rel="shortcut icon" href="/static/ico/favicon.ico">
<!--[if lt IE 9]><script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
</head>
<body>
View
40 views/admin/settings.html
@@ -1,4 +1,4 @@
-$def with (settings,msg)
+$def with (blog_settings,msg)
$var title ="Blog Settings"
<div class="span12">
$if msg == True:
@@ -16,43 +16,43 @@
<div class="control-group">
<label class="control-label" for="blog_title">Blog Title</label>
<div class="controls">
- <input type="text" class="span4" name="blog_title" id="blog_title" placeholder="Blog Title..." value = "$:settings.blog_title" />
+ <input type="text" class="span4" name="blog_title" id="blog_title" placeholder="Blog Title..." value = "$:blog_settings.blog_title" />
</div>
</div>
<div class="control-group">
<label class="control-label" for="tag_line">Tagline</label>
<div class="controls">
- <input type="text" class="span4" name="tag_line" id="tag_line" placeholder="Tagline..." value = "$:settings.tag_line" />
+ <input type="text" class="span4" name="tag_line" id="tag_line" placeholder="Tagline..." value = "$:blog_settings.tag_line" />
</div>
</div>
<div class="control-group">
<label class="control-label" for="meta_keywords">Metakeywords</label>
<div class="controls">
- <input type="text" class="span4" name="meta_keywords" id="meta_keywords" placeholder="Metakeywords..." value = "$:settings.meta_keywords" />
+ <input type="text" class="span4" name="meta_keywords" id="meta_keywords" placeholder="Metakeywords..." value = "$:blog_settings.meta_keywords" />
</div>
</div>
<div class="control-group">
<label class="control-label" for="meta_description">Metadescription</label>
<div class="controls">
- <input type="text" class="span4" name="meta_description" id="meta_description" placeholder="Metadescription..." value = "$:settings.meta_description" />
+ <input type="text" class="span4" name="meta_description" id="meta_description" placeholder="Metadescription..." value = "$:blog_settings.meta_description" />
</div>
</div>
<div class="control-group">
<label class="control-label" for="meta_description">Posts per Page</label>
<div class="controls">
- <input type="number" class="span4" name="items_per_page" id="items_per_page" placeholder="Posts per Page..." value = "$:settings.items_per_page" />
+ <input type="number" class="span4" name="items_per_page" id="items_per_page" placeholder="Posts per Page..." value = "$:blog_settings.items_per_page" />
</div>
</div>
<div class="control-group">
<label class="control-label" for="posts_in_home">Posts in Home</label>
<div class="controls">
- <input type="number" class="span4" name="posts_in_home" id="posts_in_home" placeholder="Posts in Home..." value = "$:settings.posts_in_home" />
+ <input type="number" class="span4" name="posts_in_home" id="posts_in_home" placeholder="Posts in Home..." value = "$:blog_settings.posts_in_home" />
</div>
</div>
<div class="control-group">
<label class="control-label" for="posts_in_home">Cache timeout</label>
<div class="controls">
- <input type="number" class="span4" name="cache_duration_in_seconds" id="cache_duration_in_seconds" placeholder="Cache Duration in Seconds..." value = "$:settings.cache_duration_in_seconds" />
+ <input type="number" class="span4" name="cache_duration_in_seconds" id="cache_duration_in_seconds" placeholder="Cache Duration in Seconds..." value = "$:blog_settings.cache_duration_in_seconds" />
</div>
</div>
@@ -65,37 +65,37 @@
<div class="control-group">
<label class="control-label" for="login">Login</label>
<div class="controls">
- <input type="text" class="span4" name="login" id="login" maxlength = "128" placeholder="Login name...." value = "$:settings.login" />
+ <input type="text" class="span4" name="login" id="login" maxlength = "128" placeholder="Login name...." value = "$:blog_settings.login" />
</div>
</div>
<div class="control-group">
<label class="control-label" for="password">Password</label>
<div class="controls">
- <input type="password" class="span4" name="password" id="password" maxlength = "32" placeholder="Password..." value = "$:settings.password" required />
+ <input type="password" class="span4" name="password" id="password" maxlength = "32" placeholder="Password..." value = "$:blog_settings.password" required />
</div>
</div>
<div class="control-group">
<label class="control-label" for="user_full_name">Full Name</label>
<div class="controls">
- <input type="text" class="span4" name="user_full_name" id="user_full_name" maxlength = "256" placeholder="Full name..." value = "$:settings.user_full_name" />
+ <input type="text" class="span4" name="user_full_name" id="user_full_name" maxlength = "256" placeholder="Full name..." value = "$:blog_settings.user_full_name" />
</div>
</div>
<div class="control-group">
<label class="control-label" for="user_short_name">Short Name</label>
<div class="controls">
- <input type="text" class="span4" name="user_short_name" id="user_short_name" maxlength = "256" placeholder="Short name..." value = "$:settings.user_short_name" />
+ <input type="text" class="span4" name="user_short_name" id="user_short_name" maxlength = "256" placeholder="Short name..." value = "$:blog_settings.user_short_name" />
</div>
</div>
<div class="control-group">
<label class="control-label" for="user_email">Email</label>
<div class="controls">
- <input type="email" class="span4" name="user_email" id="user_email" maxlength = "256" placeholder="Email..." value = "$:settings.user_email" />
+ <input type="email" class="span4" name="user_email" id="user_email" maxlength = "256" placeholder="Email..." value = "$:blog_settings.user_email" />
</div>
</div>
<div class="control-group">
<label class="control-label" for="user_bio">Biography</label>
<div class="controls">
- <textarea tabindex="6" class="span4" name="user_bio" id="user_bio" rows="10" cols="100" maxlength ="2048" placeholder = " Bio..." >$:settings.user_bio</textarea>
+ <textarea tabindex="6" class="span4" name="user_bio" id="user_bio" rows="10" cols="100" maxlength ="2048" placeholder = " Bio..." >$:blog_settings.user_bio</textarea>
</div>
</div>
</div>
@@ -109,13 +109,13 @@
<div class="control-group">
<label class="control-label" for="google_analytics_code">Analytics code</label>
<div class="controls">
- <input type="text" class="span2" name="google_analytics_code" id="google_analytics_code" placeholder="UA-XXXXXXX-X" value = "$:settings.google_analytics_code" />
+ <input type="text" class="span2" name="google_analytics_code" id="google_analytics_code" placeholder="UA-XXXXXXX-X" value = "$:blog_settings.google_analytics_code" />
</div>
</div>
<div class="control-group">
<label class="control-label" for="feed_burner_url">Feedburner Url</label>
<div class="controls">
- <input type="text" class="span2" name="feed_burner_url" id="feed_burner_url" maxlength = "1024" placeholder="Feedburner Url..." value = "$:settings.feed_burner_url" />
+ <input type="text" class="span2" name="feed_burner_url" id="feed_burner_url" maxlength = "1024" placeholder="Feedburner Url..." value = "$:blog_settings.feed_burner_url" />
</div>
</div>
</div>
@@ -127,14 +127,14 @@
<div class="control-group">
<label class="control-label" for="bing_app_id">App Id</label>
<div class="controls">
- <input type="text" class="span2" name="bing_app_id" id="bing_app_id" maxlength = "64" placeholder="App Id..." value = "$:settings.bing_app_id" />
+ <input type="text" class="span2" name="bing_app_id" id="bing_app_id" maxlength = "64" placeholder="App Id..." value = "$:blog_settings.bing_app_id" />
</div>
</div>
<div class="control-group">
<label class="control-label" for="root">Root</label>
<div class="controls">
- <input type="text" class="span2" name="root" id="root" maxlength = "256" placeholder="Root url..." value = "$:settings.root" required/>
+ <input type="text" class="span2" name="root" id="root" maxlength = "256" placeholder="Root url..." value = "$:blog_settings.root" required/>
</div>
</div>
@@ -148,13 +148,13 @@
<div class="control-group">
<label class="control-label" for="disqus_short_name">Short name</label>
<div class="controls">
- <input type="text" class="span2" name="disqus_short_name" id="disqus_short_name" maxlength = "256" placeholder="Short name..." value = "$:settings.disqus_short_name" />
+ <input type="text" class="span2" name="disqus_short_name" id="disqus_short_name" maxlength = "256" placeholder="Short name..." value = "$:blog_settings.disqus_short_name" />
</div>
</div>
<div class="control-group">
<label class="control-label" for="disqus_url">Discuss Url</label>
<div class="controls">
- <input type="text" class="span2" name="disqus_url" id="disqus_url" maxlength = "256" placeholder="Discuss Url..." value = "$:settings.disqus_url" />
+ <input type="text" class="span2" name="disqus_url" id="disqus_url" maxlength = "256" placeholder="Discuss Url..." value = "$:blog_settings.disqus_url" />
</div>
</div>
View
2  views/api/atom.xml
@@ -6,7 +6,7 @@ $def with (posts)
<link href="$:settings.root/" />
<link href="$:settings.root/feed.xml" rel="self" />
<id>$:settings.root/</id>
- <rights>Copyright (c) 2011 $:settings.user_full_name. The content on this feed is licensed under Creative Commons Attribution 3.0 License.</rights>
+ <rights>Copyright (c) 2013 $:settings.user_full_name. The content on this feed is licensed under Creative Commons Attribution 3.0 License.</rights>
<icon>$:settings.root/static/images/favicon.ico</icon>
<updated>$:posts[0].published_at.strftime("%Y-%m-%dT%H:%M:%Sz")</updated>
<author><name>$:settings.user_full_name</name><email>$:settings.user_email</email>
View
2  views/api/opensearch.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
<ShortName>$:settings.blog_title</ShortName>
- <Description>An open sourcepython and web.py powered blogging engine</Description>
+ <Description>$:settings.meta_description</Description>
<Image height="16" width="16" type="image/vnd.microsoft.icon">$:settings.root/static/ico/favicon.ico</Image>
<Url type="text/html" template="$:settings.root/search?q={searchTerms}" />
</OpenSearchDescription>
View
4 views/api/sitemapXsl.xsl
@@ -64,7 +64,7 @@ xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<a href="http://www.yahoo.com">YAHOO</a>.
<br />
It was generated by using the Blogging-Software
- <a href="https://github.com/varunpant/Message/">Message</a> written in Python and
+ <a href="https://github.com/varunpant/Bhaguli/">Message</a> written in Python and
<a href="http://webpy.org/">Web.Py</a>, by
<a href="http://varunpant.com/">Varun Pant</a>.
</p>
@@ -107,7 +107,7 @@ xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
</div>
<div id="footer">
Generated with
- <a href="https://github.com/varunpant/Message/" title="Google Sitemap Generator Plugin for Message">Google Sitemap Generator Plugin for Message</a> by
+ <a href="https://github.com/varunpant/Bhaguli/" title="Google Sitemap Generator Plugin for Message">Google Sitemap Generator Plugin for Message</a> by
<a href="http://www.varunpant.com/">Varun Pant</a>. This XSLT template is released under GPL.
</div>
</body>
View
55 views/themes/light/archive.html
@@ -1,23 +1,42 @@
-$def with (posts,archives)
+$def with (posts,tags,archives)
$var title = 'Archive'
+$var menu = 'Archive'
+<h5>Posts</h5>
+<hr>
+<ul>
+ $for post in posts:
+ <li>
+ <a target="_blank" class="taggedlink" href="/posts/$:post.slug" rel="bookmark">$:post.title</a>
+ </li>
+</ul>
-<h4>Recent</h4>
+<!-- list of Pages -->
+<h5>Pages</h5>
+<hr>
+<ul>
+ $for post in blog_cache.get_pages():
+ <li>
+ <a rel="bookmark" target="_blank" href="/$:post.slug">$:post.title</a>
+ </li>
+</ul>
-<ul id="recent">
-$for post in posts:
- <li>
- <div class="time"><i>$:post.published_at.strftime("%B %d, %Y")</i></div>
- <a class="taggedlink" href="/posts/$:post.slug" rel="bookmark">$:post.title</a>
- </li>
+<!-- list of categories -->
+<h5>Archives</h5>
+<hr>
+<ul>
+ $for archive in archives:
+ <li>
+ <a href="/archives/1/$:archive['year']/$:archive['month']" rel="directory">$:archive['full_month'] $:archive['year'] &nbsp;&nbsp;($:archive['posts_count'])</a>
+ </li>
+</ul>
-</ul>
-
-<h4>Archive</h4>
-
-<ul id="monthly">
-$for archive in archives:
- <li>
- <a href="/archives/1/$:archive['year']/$:archive['month']" rel="directory">$:archive['full_month'] $:archive['year'] &nbsp;&nbsp;($:archive['posts_count'])</a>
- </li>
-</ul>
+<!-- list of tags -->
+<h5>Topics</h5>
+<hr>
+<ul>
+ $for tag in tags:
+ <li>
+ <a rel="bookmark" target="_blank" href="/topics/$:tag.slug/1">$:tag.title [$:tag.posts_count]</a>
+ </li>
+</ul>
View
2  views/themes/light/base.html
@@ -6,7 +6,7 @@
<title>$content.get("title","")</title>
<meta content="$:settings.meta_keywords" name="keywords"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
-<meta name="description" content="$:settings.blog_title">
+<meta name="description" content="$:settings.meta_description">
<meta name="author" content="$:settings.user_full_name">
<meta content="$:settings.user_full_name" name="copyright"/>
<meta content="Bhaguli" name="generator"/>
Please sign in to comment.
Something went wrong with that request. Please try again.