1
0
mirror of https://github.com/cotes2020/jekyll-theme-chirpy.git synced 2025-06-08 00:27:58 +00:00

Standardize posts' file name in tool scripts.

This commit is contained in:
Cotes Chung 2020-08-08 01:30:46 +08:00
parent ad7d8ac1c9
commit c242cf8455

View File

@ -76,7 +76,7 @@ main() {
for _file in $(find ${POST_DIR} -type f \( -iname \*.md -o -iname \*.markdown \))
do
_filename=$(basename $_file | sed 's/[0-9]\([0-9]*-\)//g;s/\..*//' ) # remove date and extension
_filename=$(basename $_file | sed 's/-\-\+/-/;s/[[:digit:]]\([[:digit:]]*-\)//g;s/\..*//' ) # remove date and extension
if _has_changed "$_file"; then
_dump "$_filename" "$_file"