File tree 6 files changed +21
-2
lines changed
6 files changed +21
-2
lines changed Original file line number Diff line number Diff line change 85
85
version: "NVIM v0.8.0" # Vim version number
86
86
toc: true # Table of contents
87
87
description: "" # Project description used in title (if empty, uses neovim version and current date)
88
+ titledatepattern: "%Y %B %d" # Pattern for the date that used in the title
88
89
demojify: false # Strip emojis from the vimdoc
89
90
dedupsubheadings: true # Add heading to subheading anchor links to ensure that subheadings are unique
90
91
treesitter: true # Use treesitter for highlighting codeblocks
@@ -185,6 +186,7 @@ Arguments:
185
186
--toc: 'true' if the output should include a table of contents, 'false' otherwise
186
187
--description: a project description used in title (if empty, uses neovim version and current date)
187
188
--dedup-subheadings: 'true' if duplicate subheadings should be removed, 'false' otherwise
189
+ --title-date-pattern: '%Y %B %d' a pattern for the date that used in the title
188
190
--demojify: 'false' if emojis should not be removed, 'true' otherwise
189
191
--treesitter: 'true' if the project uses Tree-sitter syntax highlighting, 'false' otherwise
190
192
--ignore-rawblocks: 'true' if the project should ignore HTML raw blocks, 'false' otherwise
Original file line number Diff line number Diff line change @@ -24,6 +24,10 @@ inputs:
24
24
description : " Project description used in title (if empty, uses neovim version and current date)"
25
25
required : false
26
26
default : " "
27
+ titledatepattern :
28
+ description : " Pattern for the date that used in the title (if empty, uses '%Y %B %d')"
29
+ required : false
30
+ default : " %Y %B %d"
27
31
demojify :
28
32
description : " Strip emojis from the vimdoc"
29
33
required : false
70
74
- ${{ inputs.toc }}
71
75
- --description
72
76
- ${{ inputs.description }}
77
+ - --title-date-pattern
78
+ - ${{ inputs.titledatepattern }}
73
79
- --dedup-subheadings
74
80
- ${{ inputs.dedupsubheadings }}
75
81
- --demojify
Original file line number Diff line number Diff line change @@ -137,6 +137,7 @@ Then add the following to `./.github/workflows/panvimdoc.yml`:
137
137
version: "NVIM v0.8.0" # Vim version number
138
138
toc: true # Table of contents
139
139
description: "" # Project description used in title (if empty, uses neovim version and current date)
140
+ titledatepattern: "%Y %B %d" # Pattern for the date that used in the title
140
141
demojify: false # Strip emojis from the vimdoc
141
142
dedupsubheadings: true # Add heading to subheading anchor links to ensure that subheadings are unique
142
143
treesitter: true # Use treesitter for highlighting codeblocks
@@ -234,6 +235,7 @@ output writer.
234
235
--vim-version: the version of Vim that the project is compatible with
235
236
--toc: 'true' if the output should include a table of contents, 'false' otherwise
236
237
--description: a project description used in title (if empty, uses neovim version and current date)
238
+ --title-date-pattern: '%Y %B %d' a pattern for the date that used in the title
237
239
--dedup-subheadings: 'true' if duplicate subheadings should be removed, 'false' otherwise
238
240
--demojify: 'false' if emojis should not be removed, 'true' otherwise
239
241
--treesitter: 'true' if the project uses Tree-sitter syntax highlighting, 'false' otherwise
Original file line number Diff line number Diff line change 1
1
build :
2
- @ ./ panvimdoc.sh " --project-name" " panvimdoc" " --input-file" " doc/panvimdoc.md" " --vim-version" " NVIM v0.8.0" " --toc" " true" " --description" " " " --dedup-subheadings" " true" " --demojify" " false" " --treesitter" " true" " --ignore-rawblocks" " true" " --doc-mapping" " false" " --doc-mapping-project-name" " true" --shift-heading-level-by 0 --increment-heading-level-by 0
2
+ @ ./ panvimdoc.sh " --project-name" " panvimdoc" " --input-file" " doc/panvimdoc.md" " --vim-version" " NVIM v0.8.0" " --toc" " true" " --description" " " " --title-date-pattern" " %Y %B %d" " -- dedup-subheadings" " true" " --demojify" " false" " --treesitter" " true" " --ignore-rawblocks" " true" " --doc-mapping" " false" " --doc-mapping-project-name" " true" --shift-heading-level-by 0 --increment-heading-level-by 0
3
3
4
4
test :
5
5
julia --project -e ' using Pkg; Pkg.test()'
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ Arguments:
13
13
--vim-version: the version of Vim that the project is compatible with
14
14
--toc: 'true' if the output should include a table of contents, 'false' otherwise
15
15
--description: a project description used in title (if empty, uses neovim version and current date)
16
+ --title-date-pattern: '%Y %B %d' a pattern for the date that used in the title
16
17
--dedup-subheadings: 'true' if duplicate subheadings should be removed, 'false' otherwise
17
18
--demojify: 'false' if emojis should not be removed, 'true' otherwise
18
19
--treesitter: 'true' if the project uses Tree-sitter syntax highlighting, 'false' otherwise
@@ -51,6 +52,11 @@ while [[ $# -gt 0 ]]; do
51
52
shift # past argument
52
53
shift # past value
53
54
;;
55
+ --title-date-pattern)
56
+ TITLE_DATE_PATTERN=" $2 "
57
+ shift # past argument
58
+ shift # past value
59
+ ;;
54
60
--description)
55
61
DESCRIPTION=" $2 "
56
62
shift # past argument
@@ -135,6 +141,7 @@ ARGS=(
135
141
" --metadata=vimversion:${VIM_VERSION:- " " } "
136
142
" --metadata=toc:${TOC:- true} "
137
143
" --metadata=description:${DESCRIPTION:- " " } "
144
+ " --metadata=titledatepattern:${TITLE_DATE_PATTERN:- " %Y %B %d" } "
138
145
" --metadata=dedupsubheadings:${DEDUP_SUBHEADINGS:- true} "
139
146
" --metadata=ignorerawblocks:${IGNORE_RAWBLOCKS:- true} "
140
147
" --metadata=docmapping:${DOC_MAPPING:- false} "
Original file line number Diff line number Diff line change @@ -73,6 +73,7 @@ local IGNORE_RAWBLOCKS = true
73
73
local DOC_MAPPING = true
74
74
local DOC_MAPPING_PROJECT = true
75
75
local DATE = nil
76
+ local TITLE_DATE_PATTERN = " %Y %B %d"
76
77
77
78
local CURRENT_HEADER = nil
78
79
local SOFTBREAK_TO_HARDBREAK = " space"
@@ -116,7 +117,7 @@ local function renderTitle()
116
117
117
118
local date = DATE
118
119
if date == nil then
119
- date = os.date (" %Y %B %d " )
120
+ date = os.date (TITLE_DATE_PATTERN )
120
121
end
121
122
local m = " For " .. vim_version
122
123
local r = " Last change: " .. date
@@ -197,6 +198,7 @@ Writer.Pandoc = function(doc, opts)
197
198
DOC_MAPPING_PROJECT = doc .meta .docmappingproject
198
199
HEADER_COUNT = HEADER_COUNT + doc .meta .incrementheadinglevelby
199
200
DATE = doc .meta .date
201
+ TITLE_DATE_PATTERN = doc .meta .titledatepattern
200
202
local d = blocks (doc .blocks )
201
203
local toc = renderToc ()
202
204
local notes = renderNotes ()
You can’t perform that action at this time.
0 commit comments