diff --git a/README.md b/README.md index aa39611..e3e71f4 100644 --- a/README.md +++ b/README.md @@ -50,82 +50,82 @@ say $renderer.report; ``` ## new - - instantiates object and verifies cache is present - - creates or empties the output directory - - sets up templates from default or over-riding directory +- instantiates object and verifies cache is present +- creates or empties the output directory +- sets up templates from default or over-riding directory ## :path - - location of perl6 compunit cache, as generated by Pod::To::Cached - - defaults to '.pod-cache' +- location of perl6 compunit cache, as generated by Pod::To::Cached +- defaults to '.pod-cache' ## :templates - - location of templates root directory - - defaults to 'resources/templates', which is where a complete set of templates exists +- location of templates root directory +- defaults to 'resources/templates', which is where a complete set of templates exists ## :rendering - - the type of rendering chosen - - default is html, and refers to `templates/html` in which a complete set of templates exists - - any other valid directory name can be used, eg md, so long as `templates/md` contains - a complete set of templates +- the type of rendering chosen +- default is html, and refers to `templates/html` in which a complete set of templates exists +- any other valid directory name can be used, eg md, so long as `templates/md` contains +a complete set of templates >It is possible to specify the template/rendering options with only those templates that need to be over-ridden. ## :output - - the path where output is sent - - if `output` does not exist, then it will be created. +- the path where output is sent +- if `output` does not exist, then it will be created. ## :assets - - path to a directory which may have subdirectories, eg. `js`, `css`, `images` - - the subdirectories/files are copied to the `output` directory, so that `assets/js/file.js` is copied to - `html/assets/js/file.js` assuming that `output` = `html`. - - An exception is the **asset/root** subdirectory. All items in `root` are copied to the `output` directory. - For example, if `PodCache::Render $renderer .=new(:assets, :output)>` and `$?CWD/assets/root/favicon.ico`, - then after rendering `$?CWD/html/` will contain `favicon.ico` +- path to a directory which may have subdirectories, eg. `js`, `css`, `images` +- the subdirectories/files are copied to the `output` directory, so that `assets/js/file.js` is copied to +`html/assets/js/file.js` assuming that `output` = `html`. +- An exception is the **asset/root** subdirectory. All items in `root` are copied to the `output` directory. +For example, if `PodCache::Render $renderer .=new(:assets, :output)>` and `$?CWD/assets/root/favicon.ico`, +then after rendering `$?CWD/html/` will contain `favicon.ico` ## :config - - path to a directory containing configuration files (see below) - - configuration files are rendered into a html files with links to the pod files. +- path to a directory containing configuration files (see below) +- configuration files are rendered into a html files with links to the pod files. ## :collection-unique - - boolean default False - - if true href links in tags must all be relative to collection (podfile appended to local link) - - if false, then links internal to the source need only be unique relative to the source +- boolean default False +- if true href links in tags must all be relative to collection (podfile appended to local link) +- if false, then links internal to the source need only be unique relative to the source ## :highlighter - - code default undefined - - if defined, then the code is expected to receive a String containing perl6 code - and return a String of the same code highlighted in a form consistent with the rendering. +- code default undefined +- if defined, then the code is expected to receive a String containing perl6 code +and return a String of the same code highlighted in a form consistent with the rendering. ## create-collection - - Creates a collection from scratch. - - Erases all previous rendering files, rewrites the rendering database file - - If the file 「/rendering.json」 is absent, then update-collection will do the same - - Generates the index files +- Creates a collection from scratch. +- Erases all previous rendering files, rewrites the rendering database file +- If the file 「/rendering.json」 is absent, then update-collection will do the same +- Generates the index files ## update-collection - - Compares timestamp of sources in cache with timestamp of rendered files - - Regenerates rendered files when source in cache is newer. - - Regenerates the index files based on new files. +- Compares timestamp of sources in cache with timestamp of rendered files +- Regenerates rendered files when source in cache is newer. +- Regenerates the index files based on new files. ## report( :errors, :links , :cache, :rendered ) - - Returns an array of strings containing information - - no adverbs: all link responses, all cache statuses, all files when rendered. - - :errors (default = False): Failed link responses, files with cache status Valid, Failed, Old; no rendering info - - :links-only (default = False): Supply link responses only. - - :cache-only (default = False): ditto for cache reponses. - - :just-rendered (default = False): the sources added by the most recent call to update-collection - - :when-rendered (default = True ): source and time rendered - - If no adverbs are given, then it is assumed all are True +- Returns an array of strings containing information +- no adverbs: all link responses, all cache statuses, all files when rendered. +- :errors (default = False): Failed link responses, files with cache status Valid, Failed, Old; no rendering info +- :links-only (default = False): Supply link responses only. +- :cache-only (default = False): ditto for cache reponses. +- :just-rendered (default = False): the sources added by the most recent call to update-collection +- :when-rendered (default = True ): source and time rendered +- If no adverbs are given, then it is assumed all are True # Usage To render a document cache to HTML: - - place pod sources in `doc`, - - create a writable directory `html/` - - instantiate a Render object, (`$renderer`) - - run create-collection (`$render.create-collection`) - - verify whether there are problems to solve (`$renderer.report`) +- place pod sources in `doc`, +- create a writable directory `html/` +- instantiate a Render object, (`$renderer`) +- run create-collection (`$render.create-collection`) +- verify whether there are problems to solve (`$renderer.report`) ## Customisation