public-file-list directive
Generates a list of the files found at a given path in the out dir. Useful for example for creating indexes or lists of files generated automatically by generate-from-files directive.
The public-file-list directive expects two arguments:
<!-- public-file-list="[publicPathToScan]" renderer="JsFunctionToElaborateTheList" -->
publicPathToScan [required: string]: a path in theoutdir. Note that only files in the subfolders will be scanned, but not immediate childs of the provided folder. So for/blog, only files under, for example,/blog/2020will be scanned, whileblog/index.htmlwill not be scanned.renderer [required: string]name of the function passed as a value ofcustomRenderersin the options. If no renderer is provided nothing will be done. To the renderer is passed a Object of typeFilePathsForPublicFileList, wich contains the currentlangand assourcean Array of{ absolutePath: string; absoluteUrl: string }for each file, where:absolutePathis the path to the file on diskabsoluteUrlis the full url to the page, to be used for example ashrefin a link