blob: b50d922f0619795d629df219b34a2b2adf077743 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
#!/bin/bash
source $SCRIPT_DIR/utils/parse-article.sh
if [ $? -gt 0 ]; then
STATUS=404
cat <<ERR
<p class="err-404">404: $ARTICLE_FILE: Arquivo ou diretório inexistente</p>
ERR
exit 0
fi
cat <<ARTICLE
<article class="container">
<section>
<div class="post-header">
<h4 class="post-title">$ stat -c "%s %w %z" \\ <br/> > $ARTICLE_FILE</h4>
<small>$ARTICLE_BYTES</small> <br/>
<time>$ARTICLE_TIME</time> <br/>
<ul class="tags">
$(
for i in "${ARTICLE_TAGS[@]}"; do
echo "<li class="tag">$i</li>"
done
)
</ul>
</div>
<div class="post-content">
<p>
${ARTICLE_CONTENT}
</p>
</div>
</section>
</article>
ARTICLE
|