我正在使用cookiecutter为Reveal.js演示文稿创建一个项目模板(仅用于上下文)
给定的template
有多个themes
可供选择,但并非所有模板的主题列表都相同
有没有办法根据所选的template_name
修改主题列表
不是有效的json,但需要说明:
{
"template_name": ["default", "brand"],
"theme_name": ["default", "dark", "blue"], # if template_name == "default"
"theme_name": ["magenta"] # if template_name == "brand"
}
任何其他建议,以实现这一点是赞赏的。谢谢
您可以将“switch”元素设置为字典而不是列表
输出:
相关问题 更多 >
编程相关推荐