blob: 5b13f92c569bf445eac713742e2258988be0a054 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
---
slug: table-shortcode-for-hugo
title: "Table Shortcode for Hugo"
date: "2021-10-25T18:29:42-04:00"
---
I just posted [`hugo-shortcode-table`][git], a [shortcode][] for
[Hugo][] which allows you to generate [CSS][]-only (no inline `style`
attributes) tables.
**Features:**
* Much more powerful than built-in [Markdown][] table syntax.
* Emits [CSS][] classes for alignment rather than inline `style`
attributes (no more `style-src unsafe-inline`).
* Table can be defined as [front matter][front matter] or [site data][].
* Column tooltips.
* Cell-specific overrides (alignment, tooltip, etc).
* [HTML][] and [Markdown][] markup support.
* Easy to configure emitted [CSS][] classes for a variety of frameworks,
including [Bulma][] and [Bootstrap][].
**Links:**
* [Github Repository][git]
* [Documentation and Examples][doc]
[site data]: https://gohugo.io/templates/data-templates/#the-data-folder
"Site data directory."
[front matter]: https://gohugo.io/content-management/front-matter/
"Hugo page metadata."
[css]: https://en.wikipedia.org/wiki/CSS
"Cascading Style Sheets"
[bulma]: https://bulma.io/
"Bulma CSS framework."
[bootstrap]: https://getbootstrap.com/
"Bootstrap CSS framework."
[json]: https://json.org/
"JavaScript Object Notation"
[yaml]: https://yaml.org/
"YAML Ain't a Markup Language"
[toml]: https://github.com/toml-lang/toml
"Tom's Obvious Markup Language"
[hugo]: https://gohugo.io/
"Hugo static site generator"
[goldmark]: https://github.com/yuin/goldmark/
"Goldmark Markdown renderer."
[html]: https://en.wikipedia.org/wiki/HTML
"HyperText Markup Language"
[markdown]: https://en.wikipedia.org/wiki/Markdown
"Markdown markup language"
[doc]: {{< relref "articles/table-shortcode-examples.md" >}}
"Table shortcode documentation and examples."
[git]: https://github.com/pablotron/hugo-shortcode-table
"hugo-shortcode-table github repository"
[shortcode]: https://gohugo.io/content-management/shortcodes/
"Hugo shortcode"
|