Skip to content

Commit

Permalink
add jekyll table-wrapper plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
dev-jonghoonpark committed Oct 30, 2024
1 parent 136f406 commit 6b2828e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions _plugins/table_wrapper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Jekyll::Hooks.register :documents, :post_render do |doc|
doc.output.gsub! /<table>/, '<div class="table-wrapper" markdown="block"><table>'
doc.output.gsub! /<\/table>/, '</table></div>'
end
5 changes: 5 additions & 0 deletions _sass/_main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -340,12 +340,17 @@ section {
section.post .toc {
border: 1px solid #ccc;
font-size: 15px;
margin: 1rem 0 1.5rem;
}

section.post .toc a {
text-decoration: none;
}

section.post .table-wrapper {
overflow-x: auto;
}

figcaption {
font-size: smaller;
}
Expand Down

0 comments on commit 6b2828e

Please sign in to comment.