hemanta212/blogger-cli

Add topic based indexting for blog posts

Closed this issue · 1 comments

Overview

Topic based indexing can be enabled by the user by modifying his index file. This issue is linked to #2
Same metadata variables will be passed through the index template.

Example of post metadata
*/
topic: Review
tags: ['programming', 'review']
author: name
data: date
*/

Example of index template

{{ html_head }}
{{ navbar }}
 <div class="container">
        <div class='blog_list'>

            {% if meta.topic %}
                  <h1 class='meta topic'> {{ meta.topic }} </h1>
            {% endif %}

            {% for link, title in post_info.items() %}
            
            <ul>
                <li><a href="{{ link }}">{{ title }}</a> <p> </li>
            </ul>
            {% endfor %}

        </div>
    </div>
{{ google_analytics }}

Caveats
There are some difficulties in doing this as it is very difficult to extract index for meta infos and placing them back so any meta information should be in class 'meta varname' to be extracted properly.

This should be the default feature so no index template should be created by user to achieve this feature.

This is done already in #11 the index is no more extracted. The only requirements for a compatible index is to place a div with class posts_list.