forked from gar1t/erlang-patterns
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.erl
24 lines (21 loc) · 1.04 KB
/
index.erl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
-module(index).
data(_) ->
#{project => {eterm, "project.config"},
site => {eterm, "site.config"},
snippets => {markdown, "snippets/*.md"},
contributing => {markdown, "CONTRIBUTING.md"},
methodology => {markdown, "METHODOLOGY.md"},
patterns => {markdown, "patterns/*.md"}}.
site(Data) ->
#{"site/index.html" => {template, "template/index.html"},
"site/methodology.html" => {template, "template/methodology.html"},
"site/patterns.html" => {template, "template/patterns.html"},
"site/contributing.html" => {template, "template/contributing.html"},
"site/{{pattern|basename}}.html" =>
{template_map, "template/pattern.html",
{pattern, plist:value(patterns, Data)}},
"site/css" => {dir, "template/css"},
"site/js" => {dir, "template/js"},
"site/images" => {dir, "template/images"}}.
recent_patterns(Patterns) ->
Patterns.