diff --git a/_includes/footer.gmi b/_includes/footer.gmi new file mode 100644 index 0000000..9e170f0 --- /dev/null +++ b/_includes/footer.gmi @@ -0,0 +1,3 @@ + + +© %%year%% Erick Ruiz de Chavez diff --git a/_layouts/article.gmi b/_layouts/article.gmi index 2a05df5..85e7f08 100644 --- a/_layouts/article.gmi +++ b/_layouts/article.gmi @@ -3,3 +3,4 @@ ## %%title%% %%body%% %%links%% +%%footer%% diff --git a/_layouts/home.gmi b/_layouts/home.gmi index a40c528..69ba4c9 100644 --- a/_layouts/home.gmi +++ b/_layouts/home.gmi @@ -3,3 +3,4 @@ %%articles%% %%drafts%% %%links%% +%%footer%% diff --git a/generate_capsule.sh b/generate_capsule.sh index 4d870eb..40ccb0b 100755 --- a/generate_capsule.sh +++ b/generate_capsule.sh @@ -4,7 +4,9 @@ mkdir -p _capsule articles_list="" +current_year=$(date +%Y) header_body=$(cat _includes/header.gmi) +footer_body=$(cat _includes/footer.gmi) links_body=$(cat _includes/links.gmi) for post in $(ls _posts/*.md); do @@ -23,6 +25,8 @@ for post in $(ls _posts/*.md); do | perl -pe "s|%%links%%|${links_body}|" \ | perl -pe "s|%%title%%|${article_title}\n${article_date}\n|" \ | perl -pe "s|%%body%%|${article_body}|" \ + | perl -pe "s|%%footer%%|${footer_body}|" \ + | perl -pe "s|%%year%%|${current_year}|" \ > $gemfile articles_list="$articles_list=> ${gemfile/_capsule\//} $article_date $article_title\n" @@ -46,6 +50,8 @@ if [ "${GEMINI_ENV}" != 'production' ]; then | perl -pe "s|%%links%%|${links_body}|" \ | perl -pe "s|%%title%%|${article_title}|" \ | perl -pe "s|%%body%%|${article_body}|" \ + | perl -pe "s|%%footer%%|${footer_body}|" \ + | perl -pe "s|%%year%%|${current_year}|" \ > $gemfile drafts_list="$drafts_list=> ${gemfile/_capsule\//} $article_title\n" @@ -72,6 +78,8 @@ cat _layouts/home.gmi \ | perl -pe "s|%%body%%|${index_body}|" \ | perl -pe "s|%%articles%%|${articles}|" \ | perl -pe "s|%%drafts%%|${drafts}|" \ + | perl -pe "s|%%footer%%|${footer_body}|" \ + | perl -pe "s|%%year%%|${current_year}|" \ > _capsule/index.gmi echo "Done"