3 # Pull in global dependencies.
7 redo-ifchange "$title_file"
15 blog_title=`read_and_escape_file "$title_file" | head -1`
16 printf "<title>%s</title>\n</head>\n<body>\n" "$blog_title"
17 printf "<h1>%s</h1>\n<ul>\n" "$blog_title"
19 # Generate link list entries.
20 mkdir -p index_snippets
21 for file in ./*.rst ./*.md; do
22 if [ -e "$file" ]; then
23 uuid_file="${file%.*}.uuid"
24 redo-ifchange "$uuid_file"
25 published=`stat -c%y "${uuid_file}"`
26 published_unix=$(date -u "+%s%N" -d "${published}")
27 snippet_file="${file%.*}.index_snippet"
28 redo-ifchange "$snippet_file"
29 ln -s "$srcdir/$snippet_file" "./index_snippets/${published_unix}"
34 for file in ./index_snippets/*; do
35 touch ./index_snippets/list
36 cat "$file" ./index_snippets/list > ./index_snippets/tmp
37 mv ./index_snippets/tmp ./index_snippets/list
39 if [ -e "./index_snippets/list" ]; then
40 cat ./index_snippets/list
45 printf "</ul>\n</body>\n</html>"