def METHOD_NAME(self, source, dest, is_two_file=True, post=None, lang=None):
    """Compile the source file into HTML and save as dest."""
    makedirs(os.path.dirname(dest))
    with io.open(dest, "w+", encoding="utf8") as out_file:
        with io.open(source, "r", encoding="utf8") as in_file:
            data = in_file.read()
            output, error_level, deps, shortcode_deps = self.compile_string(data, source, is_two_file, post, lang)
            out_file.write(output)
        if post is None:
            if deps.list:
                self.logger.error(
                    "Cannot save dependencies for post {0} (post unknown)",
                    source)
        else:
            post._depfile[dest] += shortcode_deps
    if error_level == 0:
        return True
    else:
        return False