Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Suggestion on additional parameter to the `preCompile` and `postCompile` functions. #24

dnutels opened this Issue · 3 comments

2 participants



It seems to me that there is a use case where the file (as in this.files element) that is being processed right now should be made available to the preCompile and postCompile functions.

The use case is as follows:

  • before processing the files, the metadata for all files is gathered (file names, folder structure) - in order to create some sort of documentation site, with relative paths and so on.

  • in order to create each individual HTML file from the template, it's context should have things like path or size (for example)

Unfortunately, there is no way of knowing, currently, which file is being processed.

I suggest a very simple change. Instead of passing src to the lib/markdown.js module, the entire file should be passed and then populated onto context.

templateContext.file = file;

Thoughts? :)

Also, latest changes are awesome.


I wouldnt want to remove src, but I think adding file to context is a legitimate request.


Beacause of backward compatibility, surely?

@treasonx treasonx closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.