Add option to configure date string format

This commit is contained in:
yhu266
2020-12-28 17:27:54 -08:00
committed by Tinmarino
parent 8c7937c765
commit 036a7d24f9
3 changed files with 18 additions and 2 deletions
+1 -1
View File
@@ -1803,7 +1803,7 @@ function! s:convert_file_to_lines(wikifile, current_html_file) abort
let result['template_name'] = template_name
let result['title'] = s:process_title(placeholders, fnamemodify(a:wikifile, ':t:r'))
let result['date'] = s:process_date(placeholders, strftime('%Y-%m-%d'))
let result['date'] = s:process_date(placeholders, strftime(vimwiki#vars#get_wikilocal('template_date_format')))
let result['wiki_path'] = strpart(s:current_wiki_file, strlen(vimwiki#vars#get_wikilocal('path')))
return result
+1
View File
@@ -522,6 +522,7 @@ function! s:get_default_wikilocal() abort
\ 'template_default': {'type': type(''), 'default': 'default', 'min_length': 1},
\ 'template_ext': {'type': type(''), 'default': '.tpl'},
\ 'template_path': {'type': type(''), 'default': $HOME . '/vimwiki/templates/'},
\ 'template_date_format': {'type': type(''), 'default': '%Y-%m-%d'},
\ 'text_ignore_newline': {'type': type(0), 'default': 1, 'min': 0, 'max': 1},
\ 'tag_format': {'type': type({}), 'default': {
\ 'pre': '^\|\s',