Locate and serve files for the Examples menu as well as examples included from overview notebooks. The examples come from two sources:
examples
. Such files are
distributed with SWISH.example
. Such files can be created by the
users.This module also makes the known examples available through swish_provides/1 for supporting conditional statements on example overview notebooks.
swish_examples('index.json')
.example
.
index.json
is
provided, use this file and add the not-described files as
examples that are not included in the menu. If no index.json
is present, all files are added as example files.href
key pointing at the example. Also removes all items
that are not dicts or have no file
key.:- if(swish_provides(example('chat80.pl',_,_))). ... :- endif.