mirror of
https://github.com/He4eT/xecut-site.git
synced 2026-05-04 17:37:26 +00:00
11ty: wrapper for Markdown tables
This commit is contained in:
parent
e5f3efea09
commit
ff4faf94a5
2 changed files with 10 additions and 0 deletions
|
|
@ -19,4 +19,10 @@ export default function(eleventyConfig) {
|
||||||
defaultLanguage: 'en',
|
defaultLanguage: 'en',
|
||||||
})
|
})
|
||||||
eleventyConfig.addPlugin(IdAttributePlugin)
|
eleventyConfig.addPlugin(IdAttributePlugin)
|
||||||
|
/* Wrapper for Markdown Tables */
|
||||||
|
eleventyConfig.addTransform('markdownTableWrapper', (content) => {
|
||||||
|
return content.replace(/<table>.*?<\/table>/gs, (table) => {
|
||||||
|
return `<div class='table-wrapper'>${table}</div>`
|
||||||
|
})
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -105,6 +105,10 @@ ul {
|
||||||
|
|
||||||
/* Tables */
|
/* Tables */
|
||||||
|
|
||||||
|
.table-wrapper {
|
||||||
|
overflow-x: auto;
|
||||||
|
}
|
||||||
|
|
||||||
table {
|
table {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
margin-block-end: calc(4 * var(--step));
|
margin-block-end: calc(4 * var(--step));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue