mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-15 04:30:25 +00:00
Convert the markdown_middleware example to a release
This commit is contained in:
parent
4769412daa
commit
36ba174224
9 changed files with 1614 additions and 46 deletions
|
@ -22,8 +22,8 @@ maybe_generate_markdown(Path) ->
|
|||
end.
|
||||
|
||||
resource_path(Path) ->
|
||||
{ok, Cwd} = file:get_cwd(),
|
||||
filename:join([Cwd, "priv", Path]).
|
||||
PrivDir = code:priv_dir(markdown_middleware),
|
||||
filename:join([PrivDir, Path]).
|
||||
|
||||
source_path(Path) ->
|
||||
<< (filename:rootname(Path))/binary, ".md" >>.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue