From 2004e383e0865952d91f3747181bb2f44ba6071c Mon Sep 17 00:00:00 2001 From: Peter Kurfer Date: Thu, 16 May 2019 09:40:46 +0200 Subject: [PATCH] doc: Extended README to cover new options --- README.md | 31 ++++++++++++++++++++----------- go.sum | 3 +++ internal/app/cmd/root.go | 3 ++- 3 files changed, 25 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 4394123..c018169 100644 --- a/README.md +++ b/README.md @@ -11,16 +11,18 @@ The easiest way to use `goveal` is to download a release, and run it from your ` goveal serve ./slides.md ``` -| Param | Description | Default value | -| ------------------------ | --------------------------------------------- | ----------------------- | -| `--host` | Hostname the binary is listening on | `localhost` | -| `--port` | Port the binary is listening on | `2233` | -| `--code-theme` | highlight.js theme to use | `monokai` | -| `--config` | Path to the config file see [config](#config) | `$HOME/goveal:./goveal` | -| `-h` / `--help` | shows help | | -| `--horizontal-separator` | horizontal separator to split slides | `===` | -| `--vertical-separator` | vertical separator to split slides | `---` | -| `--theme` | reveal.js theme to use | `white` | +| Param | Description | Default value | +| ------------------------ | ---------------------------------------------------------------------------- | ----------------------- | +| `--host` | Hostname the binary is listening on | `localhost` | +| `--port` | Port the binary is listening on | `2233` | +| `--code-theme` | highlight.js theme to use | `monokai` | +| `--transition` | Transition effect to show between slides | `none` | +| `--navigationMode` | Navigation mode to use when using the cursor keys to navigate through slides | `default` | +| `--config` | Path to the config file see [config](#config) | `$HOME/goveal:./goveal` | +| `--horizontal-separator` | horizontal separator to split slides | `===` | +| `--vertical-separator` | vertical separator to split slides | `---` | +| `--theme` | reveal.js theme to use | `white` | +| `-h` / `--help` | shows help | | ## Config @@ -32,4 +34,11 @@ It is more a convenience feature to be able to set a theme and so on and so fort 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`](./examples/goveal.yaml). \ No newline at end of file +See also an example at [`./examples/goveal.yaml`](./examples/goveal.yaml). + +### 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. + +the sample configuration file [`./examples/goveal.yaml`](./examples/goveal.yaml) also contains a sample how to add custom CSS. \ No newline at end of file diff --git a/go.sum b/go.sum index 3eb9641..ac301f2 100644 --- a/go.sum +++ b/go.sum @@ -3,6 +3,7 @@ github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= @@ -62,6 +63,7 @@ github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/9 github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= @@ -86,6 +88,7 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= diff --git a/internal/app/cmd/root.go b/internal/app/cmd/root.go index 93e5133..5ca0470 100644 --- a/internal/app/cmd/root.go +++ b/internal/app/cmd/root.go @@ -16,9 +16,10 @@ package cmd import ( "fmt" + "os" + "github.com/baez90/go-reveal-slides/internal/app/config" "github.com/fsnotify/fsnotify" - "os" "github.com/mitchellh/go-homedir" log "github.com/sirupsen/logrus"