Revert "tpl: Rework to handle both text and HTML templates"

Will have to take another stab at this ...

This reverts commit 5c5efa03d2.

Closes #3260
This commit is contained in:
Bjørn Erik Pedersen
2017-04-02 14:20:34 +02:00
parent c97dae40d9
commit 7eb71ee064
31 changed files with 839 additions and 1248 deletions

View File

@@ -52,6 +52,24 @@ func pageMust(p *Page, err error) *Page {
return p
}
func TestDegenerateRenderThingMissingTemplate(t *testing.T) {
t.Parallel()
cfg, fs := newTestCfg()
writeSource(t, fs, filepath.Join("content", "a", "file.md"), pageSimpleTitle)
s := buildSingleSite(t, deps.DepsCfg{Fs: fs, Cfg: cfg}, BuildCfg{})
require.Len(t, s.RegularPages, 1)
p := s.RegularPages[0]
err := s.renderThing(p, "foobar", nil)
if err == nil {
t.Errorf("Expected err to be returned when missing the template.")
}
}
func TestRenderWithInvalidTemplate(t *testing.T) {
t.Parallel()
cfg, fs := newTestCfg()