publish.js 513 B

12345678910111213141516171819202122232425
  1. /*
  2. Publish.js
  3. This script publish the blog post object to a static HTML into the webroot
  4. Require paramter:
  5. filepath //The filepath of the post object
  6. webroot //The webroot of the current ArozOS user
  7. */
  8. requirelib("filelib");
  9. includes("config.js");
  10. //Inject content into template
  11. function inject(template, key, value){
  12. template = template.split("{{" + key + "}}").join(value);
  13. return template;
  14. }
  15. //Main function to publish the file to webroot
  16. function publish(){
  17. }
  18. publish();