Improved script tools.
- Allows posts to be placed in subdirectories (#41, #87). - Identify posts file with the suffix ‘.markdown’. **Page creator** - Pass the posts without any categories or tags. - Omit the YAML comments for categories/tags. **Lastmod** - compatible with one-digit month or day post files.
This commit is contained in:
@@ -74,14 +74,12 @@ main() {
|
||||
|
||||
local _count=0
|
||||
|
||||
for _file in $(ls -r "$POST_DIR")
|
||||
for _file in $(find ${POST_DIR} -type f \( -iname \*.md -o -iname \*.markdown \))
|
||||
do
|
||||
_filepath="$POST_DIR/$_file"
|
||||
_filename="${_file%.*}" # jekyll cannot read the extension of a file, so omit it.
|
||||
_filename=${_filename:11} # remove the date
|
||||
_filename=$(basename $_file | sed 's/[0-9]\([0-9]*-\)//g;s/\..*//' ) # remove date and extension
|
||||
|
||||
if _has_changed "$_filepath"; then
|
||||
_dump "$_filename" "$_filepath"
|
||||
if _has_changed "$_file"; then
|
||||
_dump "$_filename" "$_file"
|
||||
((_count=_count+1))
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user