A blog plugin.
This module only exposes one function, which is used to create the actual module with bound state data.
plated_plugin_copy = require("./plated_plugin_copy.js").create(opts,plated)
This is called automatically when the plated module is created and the returned plugin functions are added to the plugin call stack. Note that all of these modules are bound together and operate as a group with shared data.
This plugin is intended to duplicate part of a site into another directory with possibly tweaked chunks, this is primarily intended for text translations. We produce for instance pure text chunks containing just english text and replace these chunks with french versions inside a fra directory.
Note that we only copy chunkfiles not all data files, so this is only about duplicating files that are rendered from chunks.
dirs = plated_plugin_copy.process_dirs(dirs)
Remember all the _copy_json chunks we can find inside our plated_plugin_copy.chunks array. This will be used later to replicated output into other locations with slight chunk tweaks.
chunks = plated_plugin_copy.process_file(chunks)
Auto magically parse _copy_json chunks as json.
Compare this output file with cached copy chunks and duplicate it into these directories with slightly tweaked chunks if it matches.