daviddarnes / alembic

⚗️ A Jekyll boilerplate theme designed to be a starting point for any Jekyll website
https://alembic.darn.es
MIT License
765 stars 901 forks source link

[Question]: Show Tables ? #170

Open fjolublar opened 3 years ago

fjolublar commented 3 years ago

Working with md files you can create table like:

Col_Name_1 Col_Name_2
Value_1 Value_2

Trying this in a post doesn't show the table (lines of the table). It just does the sorting.

Any help on how to show also the table?

daviddarnes commented 3 years ago

Looks like my theme is missing some table styles! I think this is the first time it's been requested though. For now you could add some styles to add a background to the heading row and every other row to help with readability. Here's some example code:

thead tr,
tr:nth-of-type(2) {
  background: #f4f4f4;
}

td {
  border: 1px solid #f4f4f4;
}
fjolublar commented 3 years ago

I found this workaround on Stack and it worked for me:

Adding this at the beginning of the post:

<style>
.tablelines table, .tablelines td, .tablelines th {
        border: 1px solid black;
        }
</style>

and this after the tables:

{: .tablelines}
daviddarnes commented 3 years ago

Really nice solution @fjolublar, I'm going to add table styles into the latest update. Thanks for highlighting this issue