diff --git a/README.md b/README.md index 5557400..3729fd9 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,7 @@ Create a new blog: Create a new page or post: blo post hello-world + blo post about --type page You can also use pipe with your favorite editor: diff --git a/blo/blog.py b/blo/blog.py index 9472a37..db797cc 100644 --- a/blo/blog.py +++ b/blo/blog.py @@ -15,7 +15,7 @@ from http.server import SimpleHTTPRequestHandler from http.server import HTTPServer -from .page_generator import PageGenerator +from page_generator import PageGenerator diff --git a/blo/default.json b/blo/default.json index 207d2f4..dd243fa 100644 --- a/blo/default.json +++ b/blo/default.json @@ -15,5 +15,15 @@ } }, "date_format": "%Y-%m-%d %H:%M", - "items_per_page": 12 + "items_per_page": 12, + "lang":{ + "fa":{ + "Posts_with_tag": "پستهای تگ شده با ", + "List_of_tags": "لیست تگها" + }, + "en":{ + "Posts_with_tag":"Posts with tag ", + "List_of_tags": "List of tags" + } + } } diff --git a/blo/page_generator.py b/blo/page_generator.py index a71e7dd..01c16c6 100644 --- a/blo/page_generator.py +++ b/blo/page_generator.py @@ -4,6 +4,7 @@ import codecs import os from datetime import datetime +from pprint import pprint import jinja2 import markdown @@ -70,7 +71,7 @@ def _generate_html_tag_pages(self, tag): items_pages = [] for page_number, item_set in enumerate(pages): page_vars = { - 'page_title': "Posts with tag '{0}'".format(tag), + 'page_title': self.config['lang'][self.config['site']['lang']]['Posts_with_tag']+" '{0}'".format(tag), 'tag': tag, 'page_items': item_set, 'page_number': page_number, diff --git a/blo/templates/base.html b/blo/templates/base.html index 3bdbfa0..165b57c 100644 --- a/blo/templates/base.html +++ b/blo/templates/base.html @@ -1,88 +1,140 @@ - + {% block title %}{% endblock %} - - + + - + - - - -
-
+
+
{% block content %} {% endblock %}
-
-
-
-
+
+
+
+
- Technical blog - + Technical blog +
- {% if site_footer_links %} - See also -
    - {% for title, link in site_footer_links.items() %} + {% if site_footer_links %} + See also +
      + {% for title, link in site_footer_links.items() %}
    • {{ title }}
    • - {% endfor %} -
    - {% endif %} + {% endfor %} +
+ {% endif %}
-

{{ site_url }} © 2015

+

{{ site_url }} © 2015

-
-
+
+ + + + + + - - - + + + \ No newline at end of file diff --git a/setup.py b/setup.py index 1fc37cf..ad0b0b1 100644 --- a/setup.py +++ b/setup.py @@ -5,8 +5,8 @@ name='blo', version='0.6', license='BSD-3-clause', - author='Yann Savuir', - author_email='savuir@gmail.com', + author='Sajjad Shahcheraghian', + author_email='shgninc@gmail.com', packages=find_packages(), entry_points={ 'console_scripts': [ @@ -16,7 +16,7 @@ install_requires=['jinja2', 'markdown', 'PyRSS2Gen'], package_data={'': ['blo/default.json', 'blo/draft_templates.json',]}, include_package_data=True, - url='https://github.com/savuir/blo', # use the URL to the github repo + url='https://github.com/shgninc/blo', # use the URL to the github repo download_url='https://github.com/savuir/blo/tarball/0.1', # I'll explain this in a second keywords=['blogging', 'blog', 'static blog generator'], # arbitrary keywords )