使用golang的present工具来构建演示文稿。有没有办法覆盖默认模板?

huangapple go评论69阅读模式
英文:

I am using golang present tool to build a presentation. is there a way to override the default templates?

问题

这个工具使用默认模板,其中包含了talks.golang.org的Google Analytics代码。

我想要覆盖/自定义这些模板。

我找不到实现这一点的示例/指南/教程。

如何自定义这些模板?

英文:

the present tool uses default templates that includes google analytics code of talks.golang.org.

I would like to override/customise the templates.

I couldn't find examples/guides/tutorials to achieve this.

How to customise the templates ?

答案1

得分: 2

请按照以下步骤来覆盖默认模板:

  1. $GOPATH/src/golang.org/x/tools/cmd/present文件夹中复制templates文件夹到项目文件夹中。

  2. 编辑templates文件夹:在所有模板中删除Google Analytics脚本。

  3. 使用-base .选项启动演示:present -base .

使用-base .选项,present工具将使用当前项目文件夹中的模板。

英文:

do the following to override the default templates:

copy the templates folder from $GOPATH/src/golang.org/x/tools/cmd/present folder to the project folder.

edit the templates: remove google analytics script in all the templates.

start the presentation with -base option: present -base .

with the -base . option present tool will use the templates in the current project folder.

huangapple
  • 本文由 发表于 2017年2月6日 13:57:56
  • 转载请务必保留本文链接:https://go.coder-hub.com/42061183.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定