Skip to content

Commit 5b99a88

Browse files
authored
fix sitemap.sh when markdown title in chinese (#10)
修复markdown中文标题执行异常: ERROR: ./sitemap.sh: line 34: -3: substring expression < 0
1 parent db01d34 commit 5b99a88

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: docs/sitemap.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ items=""
2828
for file in ${files[@]}; do
2929
[[ ${ignore[@]/${file}/} != ${ignore[@]} ]] && continue
3030
echo $file
31-
encode=$(urlencode "${file::-3}")
31+
encode=$(urlencode "${file%.*}")
3232
link="$website_link/#/$encode"
3333
date=$(git log -1 --format="%ad" --date="iso-strict-local" -- $file)
3434
item="

0 commit comments

Comments
 (0)