The gv-blog module comes in two parts, the blog list, and the blog post.

List Tag

<div gv-blog-list></div>

The gv-blog-list  tag activates the blog-list functionality and enables the use of blog expressions within the tag. Governor loops through all of the available blog posts and lists them within the gv-blog-list  tag.

Basic

Example: blog.html

<div class="s12 m8 push-m2">
    <div class="blog-list">
        <div gv-blog-list>
            <h5>
                @category
            </h5>    
            <div class="blog-image">
                <img src="@image.src" alt="@image.alt"/>
            </div>
            <h2>
                @title
            </h2>
            <div class="s6 col">
                <small>@postDate</small>
            </div>
            <div class="s6 col">
                <small>@tags</small>
            </div>
            <p>
                @summary
            </p>
            <a href="@href">Read More</a>
        </div>
    </div>
</div> 

Available List Properties

  • @title  - Title of the blog

  • @postDate  - Date posted

  • @category  - General blog category

  • @tags  - Specific blog tags

  • @summary  - Preview text for blog

  • @content  - Entire blog text content

  • @image.src  - Blog image src

  • @image.alt  - Blog image alt tag

  • @href  - Link to blog post

  • @author.name  - Blog author's name

  • @author.bio  - Blog author's bio

Post Tag

<div gv-blog-post></div>

The gv-blog-post  tag activates the blog-post functionality and enables the use of blog expressions within the tag.

Example: detail.html

<div class="s12 m8 push-m2">
    <div class="blog-post">
        <div gv-blog-post>    
            <div class="blog-hero" style="background-image:url('@image.src')">
                <h2>@title</h2>
            </div>
            <div class="s6 col">
                <small>@postDate</small>
            </div>
            <div class="s6 col">
                <small>@category</small>
            </div>
            <p>
                @content
            </p>
            <small>
                @tags
            </small>
            <div class="author">
                <h5>@author.name</h5>
                <p>
                    @author.bio
                </p>
            </div>
        </div>
    </div>
</div>

Available Post Properties

  • @title  - Title of the blog

  • @postDate  - Date posted

  • @category  - General blog category

  • @tags  - Specific blog tags

  • @content  - Entire blog text content

  • @image.src  - Blog image src

  • @image.alt  - Blog image alt tag

  • @author.name  - Blog author's name

  • @author.bio  - Blog author's bio

Installation instructions

On all new Governor sites the blog module will come pre-installed. When building out a custom Governor theme be sure to include the proper module folder structure.

 

Did this answer your question?