Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/tools/cmd/present: export to static site #19119

kaihendry opened this issue Feb 16, 2017 · 2 comments

x/tools/cmd/present: export to static site #19119

kaihendry opened this issue Feb 16, 2017 · 2 comments


Copy link

@kaihendry kaihendry commented Feb 16, 2017

Please answer these questions before submitting your issue. Thanks!

What version of Go are you using (go version)?

go version devel +9cd3c0662a Thu Dec 15 20:06:07 2016 +0000 linux/amd64

What operating system and processor architecture are you using (go env)?


What did you do?

Try to export slideshow via Chrome's Ctrl+S so others can share a static URL of my slide show.

What did you expect to see?

The video embed

What did you see instead?

Missing video has details of the issue

@bradfitz bradfitz added this to the Unreleased milestone Mar 21, 2017
@bradfitz bradfitz changed the title tools/cmd/present: export to static site x/tools/cmd/present: export to static site Mar 21, 2017
Copy link

@bradfitz bradfitz commented Mar 21, 2017

This is more of a Chrome bug than anything.

I suppose you could youtube-dl the video locally and then embed some HTML in the presentation to render the local video the same as a local image.

/cc @broady @campoy

Copy link

@leighmcculloch leighmcculloch commented Apr 27, 2019

I think go present tool lends itself well to offering to generate static output as it makes it much simpler to deploy or share a presentation, and the resulting output if not being used with the play feature is static anyway. We shouldn't need to use Chrome to save a copy. Examples of where this can be handy:

  • To deploy the talk to GitHub Pages, Netlify, any other static file host.
  • To display the talk on a presentation computer that has no internet connectivity and doesn't have present on it to run.
  • To display a talk containing sensitive information that can't be hosted on any public URL and the presentation computer doesn't have present on it to run.

At the moment I use the following commands to save a static version:

curl -s > build/static/notes.js
curl -s | sed -E 's/(\/static\/)/.\1/' > build/static/slides.js
curl -s > build/static/styles.css
curl -s > build/static/notes.css
curl -s | sed -E 's/(\/static\/)/.\1/' | s -E '/play\.js/d' > build/index.html

But the tool could have an argument that generates static files instead of starting a web server. Example possible usage:

present -notes -out=build/
$ present -h
Usage of present:
  -base string
        base path for slide template and static resources
  -content string
        base path for presentation content (default ".")
  -http string
        HTTP service address (e.g., '') (cannot be present with -out) (default "")
        use Native Client environment playground (prevents non-Go code execution) when using local WebSocket transport
        enable presenter notes (press 'N' from the browser to display them)
  -orighost string
        host component of web origin URL (e.g., 'localhost')
  -out string
        output path to generate the presentation as static files (cannot be present with -http)
        enable playground (permit execution of arbitrary user code) (default true)
        run code snippets using; if false, run them locally and deliver results by WebSocket transport

Would the Go team accept a PR adding static output capability? I'd like to to open a PR with it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants