Advertisement
Guest User

Untitled

a guest
Feb 6th, 2016
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. var title = '%filltext:name=Title%';
  2. slug = title.replace(/[^\w\s]/gi, '');
  3. var newslug = title.split(" ").join("-");
  4.  
  5. var dt = new Date();
  6.  
  7. TextExpander.appendOutput("— \n");
  8. TextExpander.appendOutput("layout: post \n");
  9. TextExpander.appendOutput("title: " + title + "\n");
  10. TextExpander.appendOutput("tags: \n");
  11. TextExpander.appendOutput("published: true \n");
  12. TextExpander.appendOutput("permalink: ") +TextExpander.appendOutput(newslug.toLowerCase()); + TextExpander.appendOutput(" \n");
  13. TextExpander.appendOutput("date: ") + TextExpander.appendOutput(dt.getFullYear() + "-" +(dt.getMonth() +1) + "-" + dt.getDate()) + TextExpander.appendOutput("\n");
  14. TextExpander.appendOutput("summary: \n");
  15. TextExpander.appendOutput("— \n");
  16.  
  17. // %filltop%
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement