From d0d682a41d2cc166fbac02928f224d31866ceceb Mon Sep 17 00:00:00 2001 From: Nico Maas Date: Thu, 22 Feb 2018 18:34:58 +0100 Subject: [PATCH] Added option to use local images --- Readme.md | 11 +++++++++++ main.go | 1 + 2 files changed, 12 insertions(+) diff --git a/Readme.md b/Readme.md index e4d0798..7c74425 100644 --- a/Readme.md +++ b/Readme.md @@ -67,6 +67,17 @@ WARN[0000] Visit http://bob:password1@0.0.0.0:8080 docker run -it -p 8080:8080 -e USER=bob -e PASSWORD=password1 -v $(pwd)/slides:/app/slides msoedov/hacker-slides ``` +Use local images +---- +Store pictures you want to use in the images subfolder, slides/images/ and reference them in the editor as Markdown: +``` +![demoPicture](../../images/demo.png) +``` +or as HTML: +``` + +``` + Getting Help ------------ diff --git a/main.go b/main.go index 1f6ca11..52358fa 100644 --- a/main.go +++ b/main.go @@ -31,6 +31,7 @@ func NewApp() *gin.Engine { r.LoadHTMLGlob("templates/*.tmpl") r.Static("/static", "./static") + r.Static("/images", "./slides/images") r.GET("/", func(c *gin.Context) { isNew := c.Query("new")