Skip to content
This repository has been archived by the owner on Dec 23, 2020. It is now read-only.

Time element is empty for blog posted date #34

Closed
brewpuppy opened this issue Aug 15, 2014 · 9 comments
Closed

Time element is empty for blog posted date #34

brewpuppy opened this issue Aug 15, 2014 · 9 comments
Labels

Comments

@brewpuppy
Copy link

The time element which should contain the post date is empty. Example below is from a new instance of Octopress directly after Octostrap3 is installed.

image

@paskal
Copy link
Contributor

paskal commented Aug 15, 2014

Can you please provide us with source of this post? Does it have "updated" empty string in it?

@brewpuppy
Copy link
Author

Below is the main index page created in the public directory. I'm not sure I understand what you're referring to for the "updated" empty string.

<!DOCTYPE html>
<html class="no-js" lang="en">
  <head>
    <meta charset="utf-8">
    <title>My Octopress Blog</title>
    <meta name="author" content="Your Name">
    <!-- http://t.co/dKP3o1e -->
    <meta name="HandheldFriendly" content="True">
    <meta name="MobileOptimized" content="320">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="canonical" href="http://yoursite.com">
    <link href="/favicon.png" type="image/png" rel="icon">
    <link href="/atom.xml" rel="alternate" title="My Octopress Blog" type="application/atom+xml">
    <script src="/javascripts/libs/jquery/jquery-2.0.3.min.js"></script>
    <link href="/assets/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet" type="text/css">
    <link href="/assets/bootstrap/dist/css/bootstrap-theme.min.css" rel="stylesheet" type="text/css">
    <link href="/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css">
  </head>
  <body   >
    <div id="wrap">
      <header role="banner">
        <nav class="navbar navbar-default" role="navigation">
          <div class="container">
            <div class="navbar-header">
              <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
              <span class="icon-bar"></span>
              <span class="icon-bar"></span>
              <span class="icon-bar"></span>
              </button>
              <a class="navbar-brand" href="/">My Octopress Blog</a>
            </div>
            <div class="navbar-collapse collapse">
              <ul class="nav navbar-nav">
                <li class="active">
                  <a rel="index" href="/">Blog</a>
                </li>
                <li >
                  <a href="/blog/archives">Archives</a>
                </li>
              </ul>
              <ul class="nav navbar-nav navbar-right">
                <li>
                  <a class="subscribe-rss" href="/atom.xml" title="subscribe via RSS">
                  <span class="visible-xs">RSS</span>
                  <img class="hidden-xs" src="/images/rss.png" alt="RSS">
                  </a>
                </li>
              </ul>
              <form class="search navbar-form navbar-right" action="https://www.google.com/search" method="GET">
                <input type="hidden" name="q" value="site:yoursite.com">
                <div class="form-group">
                  <input class="form-control" type="text" name="q" placeholder="Search">
                </div>
              </form>
            </div>
          </div>
        </nav>
      </header>
      <div id="main" class="container">
        <div id="content">
          <div class="row">
            <div class="page-content col-md-9">
              <div class="blog-index" itemscope itemtype="http://schema.org/Blog">
                <meta itemprop="name" content="My Octopress Blog" />
                <meta itemprop="description" content="" />
                <meta itemprop="url" content="http://yoursite.com" />
                <article class="post" itemprop="blogPost" itemscope itemtype="http://schema.org/BlogPosting">
                  <header class="page-header">
                    <p class="meta text-muted text-uppercase">
                      <span class="glyphicon glyphicon-calendar"></span> <time datetime="2014-08-14T00:00:00-05:00"  data-updated="true" itemprop="datePublished dateCreated"></time>
                    </p>
                    <h1 class="entry-title" itemprop="name headline"><a href="/blog/2014/08/14/test/" itemprop="url">Test</a></h1>
                  </header>
                  <div class="entry-content clearfix" itemprop="articleBody description"></div>
                </article>
              </div>
              <ul class="pager">
                <li class="previous disabled"><a href="#">&larr;&nbsp;Older</a></li>
                <li><a href="/blog/archives">Blog Archives</a></li>
                <li class="next disabled"><a href="#">Newer&nbsp;&rarr;</a></li>
              </ul>
            </div>
            <aside class="sidebar col-md-3">
              <section class="panel panel-default">
                <div class="panel-heading">
                  <h3 class="panel-title">Recent Posts</h3>
                </div>
                <div id="recent_posts" class="list-group">
                  <a class="list-group-item " href="/blog/2014/08/14/test/">Test</a>
                </div>
              </section>
            </aside>
          </div>
        </div>
      </div>
    </div>
    <footer role="contentinfo">
      <div class="container">
        <p class="text-muted credits">
          Copyright &copy; 2014 - Your Name<br>
          <small>
          <span class="credit">Powered by <a href="http://octopress.org">Octopress</a></span>,
          <span class="credit">customized with <a href="https://github.com/kAworu/octostrap3">octostrap3</a></span>.
          </small>
        </p>
      </div>
    </footer>
    <script type="text/javascript">
      (function(){
        var twitterWidgets = document.createElement('script');
        twitterWidgets.type = 'text/javascript';
        twitterWidgets.async = true;
        twitterWidgets.src = '//platform.twitter.com/widgets.js';
        document.getElementsByTagName('head')[0].appendChild(twitterWidgets);
      })();
    </script>
    <script src="/assets/bootstrap/dist/js/bootstrap.min.js"></script>
    <script src="/javascripts/modernizr-2.0.js"></script>
  </body>
</html>

@kaworu
Copy link
Owner

kaworu commented Aug 17, 2014

Hi @brewpuppy

Thank you for reporting. This issue seems odd, could you provide the source that generated the "Test" post please (so we can try to reproduce your bug) ? I guess it should be something like source/_posts/2014-08-14-test.markdown.

@kaworu kaworu added the bug label Aug 17, 2014
@brewpuppy
Copy link
Author

These are the steps I took to recreate the bug in a new instance:

git clone git://github.com/imathis/octopress.git octopress
cd octopress
rake install
git clone https://github.com/kAworu/octostrap3 .themes/octostrap3
rake 'install[octostrap3]'
rake new_post['test']
rake generate

Below is the source of the post. Date element is also empty on the main page. Any new page I create does not generate the time element correctly.

---
layout: post
title: "test"
date: 2014-08-14 15:51:00 -0500
comments: true
categories: 
---

@kaworu
Copy link
Owner

kaworu commented Aug 18, 2014

@brewpuppy
Thank you for the info. I've been able to reproduce the bug and it doesn't show with the default theme, so it's definitely a theme issue. I'll try a fix tomorrow otherwise it will have to wait until I get back from vacations in sept. Thank you for your patience :)

@tombola
Copy link

tombola commented Aug 22, 2014

@brewpuppy
In the meantime, if you just wanted to get the date working, you could replace {{ date_formatted }} with {{ date | date_to_string }} in .themes/octobola/source/_includes/post/date.html

Other liquid filters for dates are listed here.

@brewpuppy
Copy link
Author

Thank you @tombola; that fix works perfectly. I even think I like the date formatted this way better.

@spasticninja
Copy link

I was having this issue too. I found a solution here. Submitted a pull request for the Octopress solution #37

@kaworu kaworu closed this as completed in 6ee75db Sep 1, 2014
@kaworu
Copy link
Owner

kaworu commented Sep 11, 2014

The fix is perfectible, we have now "The element time must not appear as a descendant of the time element." validation error.

@kaworu kaworu reopened this Sep 11, 2014
@kaworu kaworu closed this as completed in a719bb0 Oct 14, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants