MCPcopy
hub / github.com/11ty/buildawesome / getCompiledTemplate

Method getCompiledTemplate

src/TemplateRender.js:275–289  ·  view source on GitHub ↗
(str)

Source from the content-addressed store, hash-verified

273 }
274
275 async getCompiledTemplate(str) {
276 // TODO refactor better, move into TemplateEngine logic
277 if (this.engineName === "md") {
278 return this.engine.compile(
279 str,
280 this.engineNameOrPath,
281 this.parseMarkdownWith,
282 !this.useMarkdown,
283 );
284 } else if (this.engineName === "html") {
285 return this.engine.compile(str, this.engineNameOrPath, this.parseHtmlWith);
286 } else {
287 return this.engine.compile(str, this.engineNameOrPath);
288 }
289 }
290}
291
292export default TemplateRender;

Calls 1

compileMethod · 0.45

Tested by

no test coverage detected