Octopress has been very cool for the 2 weeks since I began using.
My first hiccup came when I tried using table in this post. Firstly, I have to figure out how to create table in Octopress. Yet after figuring out, the table doesn’t get displayed! It’s just not working.
The first problem is with understanding how to create table in Octopress. They didn’t really document that, because they expect you to know markdown inline HTML can be used. That means writing:
<table> <tr> <td>Column1</td> <td>Column2</td> </tr> <tr> <td>foo</td> <td>foo</td> </tr> </table>
However, that’s not really nice, and defeats the point of not writing in HTML.
Fortunately, you can do the same using extended markdown syntax like this:
| Column1 | Column2 | | ----------- | ------------ | | foo | foo
But that still does not work. You will not see the table borders..
I would say that’s a bug with Octopress.
As I inspect the generated HTML, the table tags are present, and correct.
They are not showing because of the css stylesheet.
border-width of ZERO! This post in chinese provides a solution. Translated, it means:
Step 1. Add data-table.css
Add data-table.css to
Step 2. Add link header
source/_includes/head.html insert this:
<link href="/stylesheets/data-table.css" media="screen, projection" rel="stylesheet" type="text/css" />
And now the table appears!
PS: I am puzzled why Octopress does not ship with a default table stylesheet.