TooLoo can export an index page, and details pages, for each of your documented commands.
The current version assumes you're using Hugo with our default site setup , or more likely, some beautifully tweaked variant of it.
A demo of the default site structure and theme is available at demo.tooloo.dev
context/_index.mdis a symlink to
all_commands/_index.mdThis means you'll have a functional home page that links to all your commands by default. However, you'll probably want a custom home page, so feel free to delete that symlink and replace it with a real hugo file to introduce people to your collection of tools.
That's it really. You can customize it like any other Hugo site, just keep in mind that all the commands under the
content/all_commands folder, and the
_index.md file there, will get replaced every time you regenerate the site.
Assuming you're using our default site structure, you'll execute the following to generate your files:
tooloo export hugo ~/path/to/tooloo_blank_hugo_site/content/all_commands
Note that we're telling it to store the files in the
The theme has a concept of "chapters" and "all_commands" is the first "chapter". You can, of course, change this. It's ultimately a variation of the Hugo Learn Theme which has good documentation .
The main table of contents page
all_commands/_index.md starts off with placeholder text.
The first time you run
tooloo export two Markdown templates will be created in
XDG_CONFIG_HOME/toolo/ They are
markdown_index_template.tt is used to customize the main page with the table that links to all the other commands. It's the Markdown equivalent of
markdown_details_template.tt documents the individual commands. It's the markdown equivalent of
tooloo show <some_command>
The files use the Template6 templating language which is based on Perl 5's Template Toolkit . The Template6 docs are fairly thin right now, but Template Toolkit is well documented and should answer any questions you may have.
As with the
template.toml used to document new commands, you don't have to worry about messing things up. If you delete the file it'll just regenerate a new one with the default setup the next time you export.
XDG_CONFIG_HOME defaults to
~/.config on most systems.