Fwd: Steps to add dynamic tags to a post

Hello,
I have creating steps guide to add tags in jekyll with post

1. Open http://prose.io/#username


3. When you nevigate above url then a window will be open where bottom right corner there is a toggle button called “Authorized github”. Click this button and enter valid Github username and password.


Add tags in post:-

1. click on _posts folder the new page will open like this


1.1. Here you can edit existing posts or create new posts..suppose you want to edit "2014-08-21-Seamus Kraft.md" then click on this post.then new page will open like this.


1.2 If you want to add or edit tag then,click on meta data icon ,then view will be change.like this 


Here you can change tag,date , Author name,layout etc.
1.3 what ever tag you mentioned here ,those will be show in thinking page.
1.4 You can also put multiple tag you can add multiple tag like this
---------
layout: default
tags:
- open
- privacy
- etc
title: "your title"
----------

2. if you want dynamic posts list on a tag page, then you will need to add tag in meta data  specific tag html i.e. (/tag/privacy.html,tag/open.html .. etc).
for example:- open /tag.privacy.html,and specify tag in meta data.like as :-

---
layout: default
tag: privacy
title: Thinking articles tagged in privacy
---
// your page contents will be  here
// now following code will display dynamic posts list for privacy tag
<div class="projects row">                  
            <div class="project-wrapper">
                {% for post in site.posts reversed %}
                 {% for tag in post.tags %}
                    {% if tag == page.tag %}  
                    <div class="project">
                        <div class="photo-wrapper">
                            <div class="photo"><img src="{{ post.image | prepend: site.baseurl}}" alt="Sean Bonner"></div>
                          <a href="{{ post.url | prepend: site.baseurl }}">                        
                            <div class="overlay"><span class="fui-eye"></span></div></a>
                        </div>
                        <div class="info">

                            <h4 class="name"><a href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a></h4>
                            <p class="blog-author-date">by <a href="{{ "/team" | prepend: site.baseurl }}">{{post.author}}</a>, {{post.post_date}}</p>
                            <p class="blog-excerpt">{{ post.description }}</p>
                            <p class="blog-meta">posted in
                                 <ul >
                                    {% for tag in post.tags %}
                                        <li  ><a class="tag_list_link" href="{{site.baseurl}}/tag/{{ tag }}">{{ tag }}</a></li>
                                        {% endfor %}
                                </ul>
                            </p>
                        </div>
                    </div>
                    {% endif %}
                  {% endfor %}                
                {% endfor %}  
            </div>    
        </div>

3. No need to put static contents for particular tag posts,Above code will show only those posts which are  belongs to a that particular  tag.

4.click on save and commit the changes.

5. you can create new tag also.just click on tag directory then click on "new file",then create meta data and contents.then save adn commit.
 5.1 Then you can use this new tag in any post.

Comments

Popular Posts

How to pass hash in Postman

nginx: unrecognized service

Bootstrap Select Picker append add new item if search not exist

Reading Excel Sheets using "Roo" gem in ruby on rails

Add CORS to Nginx on AWS Elastic Beanstalk

Enable gzip compression on Elastic Beanstalk with nginx

Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock'

Get video duration by URL in Ruby on Rails

site-enables nginx setting in ruby in rails