Serge Bazanski | 4915425 | 2020-10-24 20:22:08 +0200 | [diff] [blame] | 1 | load("//tools/gostatic:rules.bzl", "gostatic_tarball") |
2 | |||||
3 | gostatic_tarball( | ||||
4 | name = "example", | ||||
5 | templates = [ | ||||
6 | "site.tmpl", | ||||
7 | ], | ||||
8 | source_dir = "src", | ||||
9 | extra_config = """ | ||||
10 | TITLE = Example Site | ||||
11 | URL = https://example.com | ||||
12 | AUTHOR = Your Name | ||||
13 | |||||
14 | blog/*.md: | ||||
15 | config | ||||
16 | ext .html | ||||
17 | directorify | ||||
18 | tags tags/*.tag | ||||
19 | markdown | ||||
20 | template post | ||||
21 | template page | ||||
22 | |||||
23 | *.tag: blog/*.md | ||||
24 | ext .html | ||||
25 | directorify | ||||
26 | template tag | ||||
27 | markdown | ||||
28 | template page | ||||
29 | |||||
30 | blog.atom: blog/*.md | ||||
31 | inner-template | ||||
32 | |||||
33 | index.html: blog/*.md | ||||
34 | config | ||||
35 | inner-template | ||||
36 | template page | ||||
37 | |||||
38 | """, | ||||
39 | srcs = [ | ||||
40 | "src/blog/first.md", | ||||
41 | "src/static/style.css", | ||||
42 | "src/blog.atom", | ||||
43 | "src/index.html", | ||||
44 | ], | ||||
45 | ) |