blob: b29dda04f8ca429bf62d792a09a9907046887c70 (
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
|
#!/bin/bash
# Enable looping through folders and subfolders
shopt -s globstar
# All relatives paths must end with slash and must not be start by dot and/or slash
# Examplo
# VAR_PATH=dir/subdir/
# Folder where posts are stored, must be relative and suffed by a slash
export ARTICLES_PATH=artigos/
# Supported article file extensions, must be separated by vertical bar
# Exemple
# ARTICLES_EXTS="txt|html|md"
export ARTICLES_EXTS="txt|html|md"
# Pages, excluding the index "/""
export PAGES=(
"/contato"
)
export ALLOWED_POST_FOLDERS=(
"/contato/comments"
)
for article in "./$ARTICLES_PATH"**/*; do
ALLOWED_POST_FOLDERS+=("${article/./}/comments")
done
|