Developer Center website. https://developers.write.as
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
272 B

  1. package main
  2. import (
  3. "html/template"
  4. "path/filepath"
  5. )
  6. func getTemplate(siteDir string, name string) (*template.Template, error) {
  7. return template.New("").ParseFiles(
  8. filepath.Join(pagesDir, siteDir, name+".tmpl"),
  9. filepath.Join(templatesDir, "base.tmpl"),
  10. )
  11. }