Fix sortedBlogPostList to handle paths containing a '.', and strip the '/./' used as a sort delimiter from output
This commit is contained in:
parent
2a9dbdbfe9
commit
43b5151215
1 changed files with 3 additions and 2 deletions
|
|
@ -76,9 +76,10 @@ fn gensidebar {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn sortedBlogPostList {
|
fn sortedBlogPostList {
|
||||||
# the /./ is added so we can sort -t. and order only the file name
|
# the /./->/|/ are added so we can sort -t| and order only the file name
|
||||||
|
# NOTE: this breaks if any path element in blogDirs contain '/./' or '|'
|
||||||
if (! ~ $#* 0)
|
if (! ~ $#* 0)
|
||||||
ls $*^'/./' | grep '/[0-9]+.*\.md$'| sort -r -t. +1
|
ls $*^'/./' | sed -n 's,/\./,/|/,; /\/[0-9]+.*\.md$/p' | sort -r '-t|' +1 | sed 's,/\|/,,'
|
||||||
}
|
}
|
||||||
|
|
||||||
fn gen_blog_post_title {
|
fn gen_blog_post_title {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue