四开中是否有一种方法可以包含另一个文件中的代码片段并将其呈现为源代码?
就像是
{{< include-as-code src/file.py >}}
可以将内容嵌入到```python块中
它不是很四开,但由于可以在四开中使用任何 pandoc 过滤器,因此您可以使用include-code-filespandoc 过滤器集合中的过滤器。将Lua代码下载到文件中并通过添加来使用它
filters:
- include-code-files.lua
Run Code Online (Sandbox Code Playgroud)
在您的 YAML 标头中。
| 归档时间: |
|
| 查看次数: |
1343 次 |
| 最近记录: |