diff --git a/{{cookiecutter.project_name}}/mkdocs.yml b/{{cookiecutter.project_name}}/mkdocs.yml index 4a01fff..c4380a8 100644 --- a/{{cookiecutter.project_name}}/mkdocs.yml +++ b/{{cookiecutter.project_name}}/mkdocs.yml @@ -16,6 +16,11 @@ nav: - About: about.md site_url: https://{{cookiecutter.github_org}}.github.io/{{cookiecutter.project_name}} repo_url: https://github.com/{{cookiecutter.github_org}}/{{cookiecutter.project_name}} +markdown_extensions: + - tables +extra_javascript: + - https://unpkg.com/tablesort@5.3.0/dist/tablesort.min.js + - javascripts/tablesort.js # Uncomment this block to enable use of Google Analytics. # Replace the property value with your own ID. diff --git a/{{cookiecutter.project_name}}/tablesort.js b/{{cookiecutter.project_name}}/tablesort.js new file mode 100644 index 0000000..c916015 --- /dev/null +++ b/{{cookiecutter.project_name}}/tablesort.js @@ -0,0 +1,6 @@ +document$.subscribe(function() { + var tables = document.querySelectorAll("article table:not([class])") + tables.forEach(function(table) { + new Tablesort(table) + }) + }) \ No newline at end of file