Skip to content

Commit

Permalink
feat: add table support in markdown
Browse files Browse the repository at this point in the history
  • Loading branch information
h-enk committed Mar 5, 2021
1 parent 6a2d1ec commit 5ee11a8
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 1 deletion.
1 change: 1 addition & 0 deletions assets/scss/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
@import "components/forms";
@import "components/images";
@import "components/search";
@import "components/tables";
@import "layouts/footer";
@import "layouts/header";
@import "layouts/pages";
Expand Down
4 changes: 4 additions & 0 deletions assets/scss/common/_dark.scss
Original file line number Diff line number Diff line change
Expand Up @@ -291,3 +291,7 @@ body.dark .alert-primary {
body.dark .figure-caption {
color: $body-color-dark;
}

body.dark table {
@extend .table-dark;
}
5 changes: 5 additions & 0 deletions assets/scss/components/_tables.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
table {
@extend .table;

margin: 3rem 0;
}
6 changes: 6 additions & 0 deletions config/_default/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ rel = "sitemap"
[markup.goldmark]
[markup.goldmark.extensions]
linkify = false
[markup.goldmark.parser]
autoHeadingID = true
autoHeadingIDType = "github"
[markup.goldmark.parser.attribute]
block = true
title = true
[markup.goldmark.renderer]
unsafe = true
[markup.highlight]
Expand Down
8 changes: 7 additions & 1 deletion config/postcss.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,16 @@ module.exports = {
purgecss({
content: [
'./layouts/**/*.html',
'./content/**/*.md',
'./content/**/*.md',
],
safelist: [
'lazyloaded',
'table',
'thead',
'tbody',
'tr',
'th',
'td',
...whitelister([
'./assets/scss/components/_code.scss',
'./assets/scss/components/_search.scss',
Expand Down

0 comments on commit 5ee11a8

Please sign in to comment.