Skip to content

Commit

Permalink
fixes for sitemap/ssr callers
Browse files Browse the repository at this point in the history
  • Loading branch information
traceypooh committed Jul 9, 2024
1 parent f030bd9 commit 04cdcec
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion bin/sitemap
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ function comments() {


function list-posts() {
find . -mindepth 2 -name index.html | cut -f2- -d/ |sort -r
find . -mindepth 2 -name index.html |cut -f2- -d/ |sort -r |egrep -v ^_blogtini
}


Expand Down
15 changes: 12 additions & 3 deletions bin/ssr.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/zsh -eux
#!/bin/zsh -eu

mydir=${0:a:h}

Expand All @@ -7,8 +7,17 @@ if [ ! -e config.yml ]; then
exit 1
fi


function list-posts() {
find . -mindepth 2 -name index.html |cut -f2- -d/ |sort -r |egrep -v ^_blogtini
}


for FILE in $(
grep -nE '^\-\-\-' $(find . -name '*index.html') |grep -F :1:--- |rev |cut -f3- -d: |rev
grep -nE '^\-\-\-' $(list-posts) |grep -F :1:--- |rev |cut -f3- -d: |rev
); do
deno run -A $mydir/../js/blogtini.js $FILE
(
set -x
deno run -A $mydir/../js/blogtini.js $FILE
)
done

0 comments on commit 04cdcec

Please sign in to comment.