Inderator User Manual:

Inderator stands for Website Index File Generator. As the name implies, it is a utility program to generate static index files for websites.

Download Inderator here

Inderator is written in C#. .NET Framework 4.6.1 or Mono Project is required to run Inderator.

Inderator walks a directory tree, given by a root folder that you specify in the program, and generates an index.html file in every non-empty folder. The root folder itself is not indexed.

Each index.html file is generated based on a “master” template file in the root folder. A “master” header and a “master” content file can be placed in each sub-folder, which will be included in the final index.html file, which is written to each folder. In case the current folder does not have a header and/or a content file, then the header and content files from the root folder are used.

Inderator can also be configured to ignore certain filenames, so that they will not be included inside the listings of the generated index.html files.

index.html files are not generated in empty folders. An empty folder is a folder that does not contain any listable files, either because all the ignored files in it have been filtered out, or because it does not contain any files or sub-folders on the file system. However, empty folders are still listed in their parent folders, but no anchor link is generated in the parent folder’s listing, to enter the empty folder, and neither is an index.html generated in the empty folder, as previously stated.

Inderator’s settings file uses a nice and simple JSON configuration format. The name of the settings file is hardcoded as inderator.json, and the file should be placed in the root folder to be indexed. An example of inderator.json:

 "ignoreFiles": ["index.htm", "index.html", "_header.html", "_content.html", "desktop.ini"]

Description of configuration settings:

  • ignoreFiles: an array of filenames to ignore as part of the generated listing in index.html

When you run the program and start the indexing process, the path to the root folder is saved to the Windows registry, and loaded when Inderator is started again at a later time, for convenience.

Template engine:

Inderator uses a basic template engine to generate index.html files.

A single master index template file is used by the engine, and its name is hardcoded as _template.html. This file must be located in the root folder that is being indexed.

Inside _template.html, you can place four placeholder sections, which will automatically be substituted with the appropriate generated information, for the current folder being indexed. This process generates and writes an index.html file for each folder that is indexed.

The placeholder sections are:

  • [HEADER]
    • The content of _header.html in the root folder or in the current folder, is substituted into this placeholder in the final index.html file
    • The content of _content.html in the root folder or in the current folder, is substituted into this placeholder in the final index.html file
    • A breadcrumb trail to the current folder being indexed is generated, by splitting the path of the current folder into portions divided by the \ character, and writing each portion as a navigation link. For example,
      • Root folder: C:\My Websites\around.co.za\Webroot
      • Sub-folder: C:\My Websites\around.co.za\Webroot\Projects\Test Project\Source
      • Navigation generated:
        • <li><a href=”/Projects/”>Projects</a></li>
        • <li><a href=”/Projects/Test%20Project/”>Test Project</a></li>
        • <li><a href=”/Projects/Test%20Project/Source/”>Source</a></li>
  • [LINK]
    • A listing of the files and folders in the current folder being indexed. An example listing:
      • <li class=”folder empty”>Empty folder</li>
      • <li class=”folder”><a href=”Non-empty%20folder/”>Non-empty folder</a></li>
      • <li class=”file”><a href=”file.txt”>file.txt</a></li>