I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit 897e8605 authored by dev's avatar dev
Browse files

applied partial changes from 720393956bd6eaceef4ba3f5be0dc3296a0f7e86

                     through a7375a677ec43f581eeae1b569f1ccd1885d5198
parent 03b8c33b
No related branches found
No related tags found
No related merge requests found
......@@ -213,18 +213,19 @@ def get_blog_index():
"""
Returns list of valid slugs sorted by date
"""
ret=[]
# list of slugs(not sorted in any way)
# list of slugs
entries=[]
# walk over all directories/files
for v in os.walk(BLOG_DIR):
# iterate over all files
slugbase = os.path.relpath(v[0], BLOG_DIR)
for f in v[2]:
# ignore all non-.rst files
if not f.endswith('.rst'):
continue
entries.append(safe_join(slugbase, f[:-4]))
entries.sort()
return entries
def render_blog_entry(slug):
"""
......@@ -252,7 +253,9 @@ def render_blog_entry(slug):
@app.route('/<string:lang>/blog/page/<int:page>')
def blog_index(page=0):
# TODO: implement
pass
entries = get_blog_index()
return render_template('blog/index.html', entries=entries)
@app.route('/<string:lang>/blog/entry/<path:slug>')
def blog_entry(slug):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment