-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[builtin] add support for apply template in templates.
- New builtin function `apply` for apply template in templates. - Improve generator and event handler for the HTTP server. - Fix errors about `funcMap` - Update logo for Pagine v2
- Loading branch information
1 parent
9e19025
commit 29a15b7
Showing
11 changed files
with
119 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,15 @@ | ||
// Copyright 2024 Jelly Terra | ||
// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0 | ||
// that can be found in the LICENSE file and https://mozilla.org/MPL/2.0/. | ||
|
||
package render | ||
|
||
import "fmt" | ||
|
||
type NoRendererFoundError struct { | ||
type NotFoundError struct { | ||
Path string | ||
} | ||
|
||
func (e *NoRendererFoundError) Error() string { | ||
func (e *NotFoundError) Error() string { | ||
return fmt.Sprint("no renderer found for the content type: ", e.Path) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// Copyright 2024 Jelly Terra | ||
// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0 | ||
// that can be found in the LICENSE file and https://mozilla.org/MPL/2.0/. | ||
|
||
package structure | ||
|
||
var emptyFuncMap = map[string]any{ | ||
"add": add, | ||
"sub": sub, | ||
"mul": mul, | ||
"div": div, | ||
"mod": mod, | ||
|
||
"getAttr": empty, | ||
|
||
"apply": __empty, | ||
"embed": _empty, | ||
"render": _empty, | ||
"renderMarkdown": _empty, | ||
"renderAsciidoc": _empty, | ||
} | ||
|
||
func empty() any { return "" } | ||
|
||
func _empty(_ any) any { return "" } | ||
|
||
func __empty(_ any, _ any) any { return "" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters