iTranslated by AI

The content below is an AI-generated translation. This is an experimental feature, and may contain errors. View original article
📄

Managing slides with reveal-hugo is fantastic

に公開

reveal.js

I often find reveal.js useful when creating slides, and I even went as far as creating a tool called revealgo, which wraps reveal.js in an HTTP server.

https://github.com/yusukebe/revealgo

In short, reveal.js allows you to write slides in Markdown and view them in a browser. For example, if you write it as follows, it will become three slides using --- as a delimiter.

# Title

---

## Subtitle

This is the body text.

---

## Page 3

This is the body text for the 3rd page.
Hello.

The display looks something like this.

SS

With revealgo, you can launch a local server with a single command and just access http://localhost:3000.

$ revealgo example.md
accepting connections at http://*:3000/

The hassle of management

Well,

  1. Write Markdown locally
  2. Execute revealgo
  3. Present

While this workflow is fine, there was no easy way to archive them and publish them on the Web. No, actually there was, but managing everything was a hassle, so I hadn't done it. As I was looking for a better solution, I found a good one. And if I use this, I don't even need revealgo.

reveal-hugo

Hugo is also convenient and I use it for my personal blog and the Travelbook Tech Blog. It is a so-called SSG, and it has the following two features:

  • It has a built-in preview server
  • The build is fast, so there is no frustration with live reloading

One of the themes for this Hugo is "reveal-hugo". The idea of using a Hugo theme for reveal.js slides is wonderful.

https://github.com/dzello/reveal-hugo

Hugo themes can adjust the appearance of the generated HTML. reveal-hugo is a theme that injects reveal.js JavaScript and CSS into HTML to make it look like slides. If you write your slide content in Markdown just like writing a blog post, it becomes reveal.js slides. With this, I can manage the slide content (Markdown) I have written so far.

That's not all. Since Hugo has "preview and live reload" features, it can be used for creating and presenting slides as well.

"Publishing" is where Hugo excels. Since it generates HTML, you can just host it as is, which is easy. This time, I decided to publish it on GitHub Pages. GitHub Actions builds the HTML and deploys it to the gh-pages branch.

Seamless workflow

So, by using reveal-hugo, you can cover everything related to slides.

  1. Write Markdown locally
  2. Preview
  3. Present
  4. Manage
  5. Publish on the Web

This is amazing.

Slide publication page

And here is the page where I publish my slides. I have posted several slides from a long, long time ago.

https://yusukebe.github.io/slides/

Among them,

was created in 2013!, but I think it is still relevant, so I recommend it.

Discussion