Function: write_text_file

Function: write_text_file


 write_text_file(some_string, file: filename)

Write a string to a file in the output directory. If a file with the given name already exists it is overwritten.

Returns the name of the file written.

This function can only be used in an export template, when create directory is true.


Parameter Type Description
input string Text to write to the file.
file string Name of the file to write to


 write_text_file(file:"index.html", lots_of_html_code) == "index.html" # index.html now contains the given text

See also

write_image_file Write an image file to the output directory.