style: ensure tex templates uses tex extension
This commit is contained in:
parent
0dac49356c
commit
d04f747efb
3 changed files with 3 additions and 3 deletions
4
main.go
4
main.go
|
@ -12,7 +12,7 @@ import (
|
||||||
|
|
||||||
var (
|
var (
|
||||||
cvDataPath string = "data/cv.json"
|
cvDataPath string = "data/cv.json"
|
||||||
cvTemplateDir string = "template/"
|
cvTemplateDir string = "template/tex/"
|
||||||
cvOutputDir string = "__output/"
|
cvOutputDir string = "__output/"
|
||||||
cvOutputFileName string = "cv.tex"
|
cvOutputFileName string = "cv.tex"
|
||||||
)
|
)
|
||||||
|
@ -62,7 +62,7 @@ func main() {
|
||||||
|
|
||||||
// Execute template engine and produce the resulting TEX file
|
// Execute template engine and produce the resulting TEX file
|
||||||
log.Println("INFO: Attempting template execution...")
|
log.Println("INFO: Attempting template execution...")
|
||||||
t := template.Must(template.New("cv.tex.tmpl").Funcs(fmap).Delims("<<", ">>").ParseGlob(cvTemplateDir + "*.tex.tmpl"))
|
t := template.Must(template.New("cv.tmpl.tex").Funcs(fmap).Delims("<<", ">>").ParseGlob(cvTemplateDir + "*.tmpl.tex"))
|
||||||
|
|
||||||
if err = t.Execute(output, cv); err != nil {
|
if err = t.Execute(output, cv); err != nil {
|
||||||
log.Fatalf("ERROR: Unable to execute the CV template. %s", err.Error())
|
log.Fatalf("ERROR: Unable to execute the CV template. %s", err.Error())
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<<- /* Prepend the setup area */ ->>
|
<<- /* Prepend the setup area */ ->>
|
||||||
<< template "cv_setup.tex.tmpl" .>>
|
<< template "cv_setup.tmpl.tex" .>>
|
||||||
|
|
||||||
\starttext
|
\starttext
|
||||||
\starttitleAndContact
|
\starttitleAndContact
|
Loading…
Reference in a new issue