/* Config.js This script handle the save and restore of the 1) Blog post source 2) Blog post release (Merged with template) */ //Create the blog table if not exists requirelib("filelib"); newDBTableIfNotExists("blog"); function getBlogPostStore(){ var blogPostStorage = readDBItem("blog", "post-store"); if (blogPostStorage == ""){ //The blog post storage is not set. Use default blogPostStorage = "user:/Document/Blog/"; } //Create folder if not exists if (!filelib.fileExists(blogPostStorage)){ filelib.mkdir(blogPostStorage) } return blogPostStorage; } function setBlogPostStore(newpath){ return writeDBItem("blog", "post-store", newpath); } //Get blog release path relative to the webroot. //If not defined, it will be {webroot}/blog/ function getBlogReleasePath(){ var releasePath = readDBItem("blog", "post-release"); if (releasePath ==""){ releasePath = "blog/" } return } function setBlogReleasePath(newpath){ return writeDBItem("blog", "post-release", newpath); }