Skip to content

Commit

Permalink
feat: ThemeOptions.globals multiple calls
Browse files Browse the repository at this point in the history
  • Loading branch information
georgesboris committed May 11, 2022
1 parent 2b58297 commit f8f656d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion elm.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "dtwrks/elm-book",
"summary": "Rich documentation builder inspired by Storybook and HexDocs.",
"license": "MPL-2.0",
"version": "1.4.0",
"version": "1.4.1",
"exposed-modules": [
"ElmBook",
"ElmBook.Chapter",
Expand Down
8 changes: 7 additions & 1 deletion src/ElmBook/ThemeOptions.elm
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,13 @@ For instance, if you're using elm-tailwind-modules, this would be really helpful
-}
globals : List html -> ThemeOption html
globals globals_ options =
{ options | globals = Just globals_ }
{ options
| globals =
options.globals
|> Maybe.map ((++) globals_)
|> Maybe.withDefault globals_
|> Just
}


{-| Use this to set the route prefix for your ElmBook's urls. This is useful if you're not hosting it on your root path.
Expand Down

0 comments on commit f8f656d

Please sign in to comment.