FranklinTemplates.addtemplateMethod
addtemplate(path)

Assuming you're working with FranklinTemplates on development mode (i.e. ] dev FranklinTemplates this function takes a path where you would have worked on a template and incorporates it into FranklinTemplates, putting files at the right place; this makes iterations and PRs easier.

Note: if you use this without FranklinTemplates on dev mode, bad things will likely occur.

FranklinTemplates.deduplicateMethod
deduplicate(src, dest)

Consider the files provided by src and remove all identical files from dest to avoid duplication.

FranklinTemplates.filecmpMethod
filecmp(path1, path2)

Take 2 absolute paths and check if the files are different (return false if different and true otherwise). This code was suggested by Steven J. Johnson on discourse: https://discourse.julialang.org/t/how-to-obtain-the-result-of-a-diff-between-2-files-in-a-loop/23784/4

FranklinTemplates.mergefoldersMethod
mergefolders(src, dst)

Internal function to looks at what's inside src/ and put it in dst/. If there are paths that match, the files are merged. It is assumed that files will not clash, if they clash files in dst are replaced. See also newsite.

FranklinTemplates.modifyMethod
modify(template_name)

Convenience function to quickly instantiate a directory with a given template once satisfied with the changes, they can be added to the repo by doing addtemplate(path).

FranklinTemplates.newsiteFunction
newsite(topdir; template="basic", cd=true)

Generate a new folder (an error is thrown if it already exists) that contains the skeleton of a website that can be processed by Franklin. The user can specify a template out of the list of available templates. If topdir is specified as "." then the current directory is used.

  • template="basic": name of the template to use,
  • cd=true: whether to change the current directory to the newly created folder or not.
  • verbose=true: whether to display information or not.

Example

newsite("MyNewWebsite", template="pure-sm")