You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: template/source/ink-blog-tool-en.md
+13Lines changed: 13 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -133,6 +133,19 @@ site:
133
133
134
134
> then the variable must be referenced in the page by `{{.Site.Config.MYVAR_aaa}}`.
135
135
136
+
#### Use Functions (Experimental)
137
+
138
+
InkPaper defines a minimal set of functions that can be used in HTML pages (except for `.md` source files), such as
139
+
140
+
``` yaml
141
+
{{ readFile "path/to/file" }}
142
+
```
143
+
144
+
This will read the content of the file `path/to/file` and include it in the page without any processing.
145
+
146
+
For file-related functions, when executed in the `source` directory, the file path is relative to the `source` directory; when executed in other directories, the file path is relative to the theme (such as `theme`).
147
+
148
+
See the source file `funcs.go` for a list of all functions.
0 commit comments