Allow non-markdown content in content directory

Allow content that is not markdown and does not need to be rendered to
exists in the content directory.  Currently any valid html or xml
document can exist.  Templates are applied to these documents as well.
If you need to have content that doesn't have templates or AbsUrlify
like operations, then continue to put this content in static and it will
be copied over.
This commit is contained in:
Noah Campbell
2013-09-18 14:21:27 -07:00
parent 5374242ff7
commit 311e102223
5 changed files with 97 additions and 13 deletions

View File

@@ -170,7 +170,7 @@ func checkPageDate(t *testing.T, page *Page, time time.Time) {
}
func TestCreateNewPage(t *testing.T) {
p, err := ReadFrom(strings.NewReader(SIMPLE_PAGE), "simple")
p, err := ReadFrom(strings.NewReader(SIMPLE_PAGE), "simple.md")
if err != nil {
t.Fatalf("Unable to create a page with frontmatter and body content: %s", err)
}
@@ -182,7 +182,7 @@ func TestCreateNewPage(t *testing.T) {
}
func TestPageWithDelimiter(t *testing.T) {
p, err := ReadFrom(strings.NewReader(SIMPLE_PAGE_WITH_SUMMARY_DELIMITER), "simple")
p, err := ReadFrom(strings.NewReader(SIMPLE_PAGE_WITH_SUMMARY_DELIMITER), "simple.md")
if err != nil {
t.Fatalf("Unable to create a page with frontmatter and body content: %s", err)
}
@@ -195,7 +195,7 @@ func TestPageWithDelimiter(t *testing.T) {
}
func TestPageWithMoreTag(t *testing.T) {
p, err := ReadFrom(strings.NewReader(SIMPLE_PAGE_WITH_SUMMARY_DELIMITER_SAME_LINE), "simple")
p, err := ReadFrom(strings.NewReader(SIMPLE_PAGE_WITH_SUMMARY_DELIMITER_SAME_LINE), "simple.md")
if err != nil {
t.Fatalf("Unable to create a page with frontmatter and body content: %s", err)
}