wimdupont.com

Source code for www.wimdupont.com
git clone git://git.wimdupont.com/wimdupont.com.git
Log | Files | Refs | README | LICENSE

commit bf682081d245f389fc5712c6911746c03241ec20
parent a691728aac9913a91f25235147054bafebf5ec76
Author: Wim Dupont <wim@wimdupont.com>
Date:   Sun, 15 Jun 2025 18:59:09 +0200

more adjustable href pages

Diffstat:
Mgenerate.sh | 17++++++++++-------
Apages/href/software.adoc | 7+++++++
2 files changed, 17 insertions(+), 7 deletions(-)

diff --git a/generate.sh b/generate.sh @@ -12,6 +12,7 @@ readonly BLOG_REPO_DIR=$PAGES_REPO_DIR/blog readonly GUIDE_REPO_DIR=$PAGES_REPO_DIR/guides readonly SOFTWARE_REPO_DIR=$PAGES_REPO_DIR/software readonly ERROR_REPO_DIR=$PAGES_REPO_DIR/error +readonly HREF_REPO_DIR=$PAGES_REPO_DIR/href readonly BOOKLIST_FILE=$REPO_PATH/content/booklist.csv readonly LINKS_FILE=$REPO_PATH/content/links.csv readonly HEADER_FILE=$PAGES_REPO_DIR/header/header.adoc @@ -81,14 +82,13 @@ as_href() { generate_href_page() { name=$1 - title=$2 - ref_dir=$3 - with_date=$4 + ref_dir=$2 + with_date=$3 cd $ref_dir get_page_header "${name}" > "$NGINX_DIR/$name.adoc" - test -n "${title}" && echo -e "[.subheader]\n${title}\n" >> "$NGINX_DIR/$name.adoc" + test -e $HREF_REPO_DIR/$name.adoc && cat $HREF_REPO_DIR/$name.adoc | sed -e '/\/\/content/,$d' >> "$NGINX_DIR/$name.adoc" readarray -t files < <(stat -c '%Y %n' * | sort -n -r) @@ -102,6 +102,9 @@ generate_href_page() { fi echo "* $art_fileref" >> "$NGINX_DIR/$name.adoc" done + + test -e $HREF_REPO_DIR/$name.adoc && cat $HREF_REPO_DIR/$name.adoc | sed -e '1,/\/\/content/d' >> "$NGINX_DIR/$name.adoc" + cd $NGINX_DIR get_page_footer "" >> "$NGINX_DIR/$name.adoc" asciidoctor "$name.adoc" @@ -208,8 +211,8 @@ generate_pages $GUIDE_REPO_DIR $GUIDES_DEST_DIR "../" 1 generate_pages $SOFTWARE_REPO_DIR $SOFTWARE_DEST_DIR "../" 1 generate_pages $BLOG_REPO_DIR $BLOG_DEST_DIR "../" 1 -generate_href_page "guides" "" $GUIDES_DEST_DIR -generate_href_page "software" "Shameless advertisement of some of my easy hackable software" $SOFTWARE_DEST_DIR -generate_href_page "blog" "" $BLOG_DEST_DIR 1 +generate_href_page "guides" $GUIDES_DEST_DIR +generate_href_page "software" $SOFTWARE_DEST_DIR +generate_href_page "blog" $BLOG_DEST_DIR 1 generate_rss diff --git a/pages/href/software.adoc b/pages/href/software.adoc @@ -0,0 +1,7 @@ +[.subheader] +Shameless advertisement of some of my easy hackable software + +//content + +[.center] +Don't forget to check out my link:https://git.wimdupont.com/[git repositories] for more projects!