From 7d773221e7711c4e534e89264c719b4cc5aabb1f Mon Sep 17 00:00:00 2001 From: Jefferson Julio Date: Wed, 2 Jun 2021 23:38:09 -0300 Subject: support for comments on pages --- pages/article.sh | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) (limited to 'pages/article.sh') diff --git a/pages/article.sh b/pages/article.sh index 3cb5ab7..b7270d8 100755 --- a/pages/article.sh +++ b/pages/article.sh @@ -2,6 +2,8 @@ source $SCRIPT_DIR/utils/parse-article.sh +COMMENTS_FOLDER="$SCRIPT_DIR/pages/$REQUEST_URI/comments" source $SCRIPT_DIR/components/comments.sh + if [ $? -gt 0 ]; then STATUS=404 cat < + +
+
+
+

Deixei o seu comentário sobre este artigo

+
+ + + + + +
+ + + +
+ + + + Campos marcados com asterisco (*) são obrigatórios +
+ +
+ + + + +
+ +
+ +
+
+

Discussão

+
+ + $( + if [ -n "$PARSED_COMMENTS" ]; then + echo "$PARSED_COMMENTS" + else + echo '

Sem mensagens para mostrar.

' + fi + ) +
ARTICLE -- cgit v1.2.3