diff --git a/docs/_js/tablesort.js b/docs/_js/tablesort.js new file mode 100644 index 00000000..6a5afcf2 --- /dev/null +++ b/docs/_js/tablesort.js @@ -0,0 +1,6 @@ +document$.subscribe(function() { + var tables = document.querySelectorAll("article table:not([class])") + tables.forEach(function(table) { + new Tablesort(table) + }) +}) diff --git a/mkdocs.yml b/mkdocs.yml index b23d142e..4a46afc5 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -57,6 +57,9 @@ markdown_extensions: alternate_style: true - pymdownx.snippets +extra_javascript: + - https://unpkg.com/tablesort@5.3.0/dist/tablesort.min.js + - _js/tablesort.js extra_css: - _css/extra.css @@ -73,6 +76,4 @@ nav: - Google Dataset Search: 'google-dataset-search.md' - CLI: 'cli.md' - Configuration reference: 'configuration.md' -# - CHANGELOG: 'https://github.com/ckan/ckanext-dcat/blob/master/CHANGELOG.md' - - CHANGELOG: 'changelog.md'