diff options
author | Jefferson Julio <[email protected]> | 2021-06-02 23:38:09 -0300 |
---|---|---|
committer | Jefferson Julio <[email protected]> | 2021-06-02 23:38:09 -0300 |
commit | 7d773221e7711c4e534e89264c719b4cc5aabb1f (patch) | |
tree | baf59501215d3ee874b865c70c9b9d1408545a16 /config.sh | |
parent | 5caf63d3897f353717fd69be9174d028fd078b23 (diff) | |
download | blog.sh-7d773221e7711c4e534e89264c719b4cc5aabb1f.tar.bz2 blog.sh-7d773221e7711c4e534e89264c719b4cc5aabb1f.zip |
support for comments on pages
Diffstat (limited to 'config.sh')
-rwxr-xr-x | config.sh | 15 |
1 files changed, 11 insertions, 4 deletions
@@ -1,22 +1,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 -ARTICLES_PATH=artigos/ +export ARTICLES_PATH=artigos/ # Supported article file extensions, must be separated by vertical bar # Exemple # ARTICLES_EXTS="txt|html|md" -ARTICLES_EXTS="txt|html|md" +export ARTICLES_EXTS="txt|html|md" # Pages, excluding the index "/"" -PAGES=( +export PAGES=( "/contato" ) -ALLOWED_POST_FOLDERS=( +export ALLOWED_POST_FOLDERS=( "/contato/comments" ) + +for article in "./$ARTICLES_PATH"**/*; do + ALLOWED_POST_FOLDERS+=("${article/./}/comments") +done |