mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-20 21:31:32 +02:00
Add render template hooks for links and images
This commit also * revises the change detection for templates used by content files in server mode. * Adds a Page.RenderString method Fixes #6545 Fixes #4663 Closes #6043
This commit is contained in:
@@ -93,12 +93,6 @@ Summary Next Line. {{<figure src="/not/real" >}}.
|
||||
More text here.
|
||||
|
||||
Some more text
|
||||
`
|
||||
|
||||
simplePageWithEmbeddedScript = `---
|
||||
title: Simple
|
||||
---
|
||||
<script type='text/javascript'>alert('the script tags are still there, right?');</script>
|
||||
`
|
||||
|
||||
simplePageWithSummaryDelimiterSameLine = `---
|
||||
@@ -325,6 +319,7 @@ func normalizeContent(c string) string {
|
||||
}
|
||||
|
||||
func checkPageTOC(t *testing.T, page page.Page, toc string) {
|
||||
t.Helper()
|
||||
if page.TableOfContents() != template.HTML(toc) {
|
||||
t.Fatalf("Page TableOfContents is:\n%q.\nExpected %q", page.TableOfContents(), toc)
|
||||
}
|
||||
|
Reference in New Issue
Block a user