No description
Find a file
2021-12-26 12:04:50 +01:00
.github/workflows Add golangci-lint as Github action 2021-12-26 12:04:50 +01:00
api Split slides first before rendering them 2021-12-22 22:31:45 +01:00
assets Add golangci-lint 2021-12-22 20:27:43 +01:00
build/docker Add container image and document usage 2021-12-23 12:20:10 +01:00
cmd/goveal Add container image and document usage 2021-12-23 12:20:10 +01:00
config Cleanup 2021-12-22 23:05:59 +01:00
events Live update Reveal config 2021-12-22 20:19:05 +01:00
examples Cleanup 2021-12-22 23:05:59 +01:00
fs Add golangci-lint 2021-12-22 20:27:43 +01:00
rendering Split slides first before rendering them 2021-12-22 22:31:45 +01:00
web Split slides first before rendering them 2021-12-22 22:31:45 +01:00
.gitattributes First draft of new fiber based server 2021-12-22 11:52:02 +01:00
.gitignore First draft of new fiber based server 2021-12-22 11:52:02 +01:00
.golangci.yml Add golangci-lint 2021-12-22 20:27:43 +01:00
.goreleaser.yml Add container image and document usage 2021-12-23 12:20:10 +01:00
.pre-commit-config.yaml Add golangci-lint 2021-12-22 20:27:43 +01:00
go.mod First draft of new fiber based server 2021-12-22 11:52:02 +01:00
go.sum First draft of new fiber based server 2021-12-22 11:52:02 +01:00
LICENSE Initial commit 2019-04-19 14:29:55 +02:00
README.md Add container image and document usage 2021-12-23 12:20:10 +01:00
renovate.json chore(deps): add renovate.json 2021-11-12 12:21:27 +00:00
Taskfile.yml Cleanup 2021-12-22 23:05:59 +01:00

Goveal

Actions Status

Goveal is very small and very simple tool that reads Markdown from a given file, renders it into an HTML template and serves it as local HTTP server. Right now Goveal uses Reveal.js 4.2.1 to create presentations and therefore also includes all features of Reveal.js 4.2.1.

In contrary to Reveal.js goveal ships with its own Markdown parser and renderer which is why some features are working slightly different from Reveal.js. See Markdown for further details.

Besides all features from Reveal.js goveal comes with first class support for mermaid-js. Just inline your diagrams as code and enjoy!

Install

The easiest and fastest way to install Goveal is to use a pre-built binary from the releases.

There's also a pre-built container image available you can use if you don't want to download the binary.

Build from source

If you have Go in the latest version installed you can also build your own version of Goveal:

task build

Requirements:

  • task
  • Optional: goreleaser (for task snapshot-release to build all binaries)

Note: All script tasks in the Taskfile.yml are meant to be executed with Linux/MacOS. Binaries for Windows are provided but not tested!

Usage

Local installation

goveal serve ./slides.md
Param Description Default value
--host Hostname the binary is listening on 127.0.0.1
--port Port the binary is listening on 2233
--config Path to the config file see config $HOME/goveal:./goveal
--open-browser Open a browser after starting the web server true
-h / --help shows help

Container

Assuming your slides are in a file called slides.md in the current directory, you can start the presentation like this:

podman/docker run --rm -ti -v `pwd`:/work -w /work -p 2233:2233 ghcr.io/baez90/goveal:0 serve --host 0.0.0.0 slides.md

By default goveal only listens on 127.0.0.1. To allow traffic from outside of the container you've to change the binding to 0.0.0.0.

Config

Goveal supports multiple configuration mechanisms. It tries to load a configuration file from $HOME or from . i.e. $HOME/goveal.yaml or $HOME/goveal.yml or ./goveal.yaml and so on.

The config allows setting a lot of options exposed by Reveal.js. There are still a few missing, and I won't guarantee to support all options in the future.

Furthermore, goveal supports configuration hot reloading i.e. you can play around with different themes and the rendered theme will be changed whenever you hit the save button!

See also an example at ./examples/goveal.yaml. I try to keep the example up to date to cover all supported config options as kind of documentation.

Markdown

A good point to start is the slides.md in the examples directory. I try to showcase everyting possible with goveal in this presentation.

The most remarkable difference between goveal and the marked driven Reveal.js markdown is how line numbers in listings are working:

Reveal.js:

```cs [1-2|3|4]
var i = 10;
for (var j = 0; j < i; j++) {
    Console.WriteLine($"{j}");
}
```

goveal:


{line-numbers="1-2|3|4"}
```cs
var i = 10;
for (var j = 0; j < i; j++) {
    Console.WriteLine($"{j}");
}
```

This is because the Markdown parser used in goveal currently does not support additional attributes for code blocks.

Custom CSS

To add custom CSS as theme overrides use a config file and add the stylesheets property. It takes a list of relative ( mandatory!) paths to CSS files that are included automatacally after the page was loaded so that they really overload everything added by Reveal and plugins.

Changes in the custom CSS files are monitored and propagated via SSE to the presentation immediately. No page reload necessary!

The sample configuration file ./examples/goveal.yaml also contains a sample how to add custom CSS.