forked from complotti/dataEconomy
Added option to use local images
This commit is contained in:
parent
ebaeea93ca
commit
d0d682a41d
2 changed files with 12 additions and 0 deletions
11
Readme.md
11
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
|
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:
|
||||||
|
```
|
||||||
|
<img src="../../images/demo.png">
|
||||||
|
```
|
||||||
|
|
||||||
Getting Help
|
Getting Help
|
||||||
------------
|
------------
|
||||||
|
|
||||||
|
|
1
main.go
1
main.go
|
@ -31,6 +31,7 @@ func NewApp() *gin.Engine {
|
||||||
|
|
||||||
r.LoadHTMLGlob("templates/*.tmpl")
|
r.LoadHTMLGlob("templates/*.tmpl")
|
||||||
r.Static("/static", "./static")
|
r.Static("/static", "./static")
|
||||||
|
r.Static("/images", "./slides/images")
|
||||||
|
|
||||||
r.GET("/", func(c *gin.Context) {
|
r.GET("/", func(c *gin.Context) {
|
||||||
isNew := c.Query("new")
|
isNew := c.Query("new")
|
||||||
|
|
Loading…
Reference in a new issue