-
Notifications
You must be signed in to change notification settings - Fork 155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
外部的.md无法生成 #93
Comments
@Nataila 别胡闹,默认 title 怎么定?你写个脚本改一下啊…… |
@tankywoo 默认文件名? |
其实可以考虑做迁移插件 |
@Nataila windows 可以试试这个(在文章目录下保存为bat);需要有sed iconv,安装git设置环境变量就有. 把文件名作为标题,格式化为utf-8,且末尾添个.md;日期格式可能因不同格式有差异需要微调。 Because of different date format on various platform, date might need some adjustment. this file works fine when date output looks like 周一 2017/09/01 12:13
|
简单拼凑的一个添加页面头信息的shell脚本,供参考: #! /bin/bash
dir=$1
date_str=`date "+%F %T"`
addFrontMatter(){
for i in `find $1 -name '*'`
do
if [ -d "$i" ]
then
#todo
echo "dir skip"
else
file_name=${i##*\/}
title=${file_name%.*}
sed -i "1i---\ntitle: \"$title\"\ndate: $2\nupdated: $2\n---\n\n[TOC]\n" "$i"
fi
done
}
addFrontMatter $dir "$date_str" 有几个问题:
|
外部转移过来的md文件,没法生成,需要挨个添加title之类的头部信息才能生成,有时间搞个默认的title之类的,糟心啊土豪
The text was updated successfully, but these errors were encountered: