File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -164,6 +164,7 @@ function RenderReadmeForGroup {
164164
165165 [hashtable ]$Options = @ {
166166 TOC = $true
167+ SortBy = ' RelativePath'
167168 }
168169 )
169170 [string ]$finalDocRender = ' '
@@ -175,7 +176,7 @@ function RenderReadmeForGroup {
175176 }
176177
177178 if ($Options.TOC ) {
178- $GroupedBy.Name
179+ # $GroupedBy.Name
179180
180181 # $finalDocRender += @(
181182 # "`n`n"
@@ -188,15 +189,32 @@ function RenderReadmeForGroup {
188189 | Sort-Object
189190 | % {
190191 MdFormat- Link - Name $_ - Url (Join-String -f ' #{0}' - Inp $_ )
191- | Join-String -f ' - {0}'
192+ | Join-String -f ' - {0}'
192193 } | Join-String - sep " `n "
193194
195+ $finalDocRender += @ (
196+ " `n "
197+ ' <div><small>'
198+ ' Updated: {0}' -f @ (
199+ (Get-Date ).ToShortDateString()
200+ )
201+ ' , Groups: {0}' -f @ (
202+ $GroupedBy.Count
203+ )
204+ ' , Files: {0}' -f @ (
205+ $GroupedBy.Group.Name.Count
206+ )
207+ ' </small></div>'
208+ # "`n"
209+ ) -join ' '
194210 $finalDocRender += @ (
195211 " `n`n "
196212 " ## Table of Contents"
197213 " `n "
198- $renderTOC
214+ ' - [Table of Contents](#table-of-contents) '
199215 " `n "
216+ $renderTOC
217+ # "`n"
200218 ) -join ' '
201219
202220 }
@@ -206,6 +224,9 @@ function RenderReadmeForGroup {
206224 $curGroup = $_
207225
208226 $groupName = $curGroup.Name
227+ if ($GroupName -eq ' alias' ) {
228+ $null = 0
229+ }
209230 $rendStr += @ (
210231 " `n`n "
211232 " ### ${GroupName} "
@@ -214,7 +235,9 @@ function RenderReadmeForGroup {
214235 " `n "
215236 ) -join ' '
216237
217- $curGroup.Group | % {
238+ $curGroup.Group
239+ | Sort-Object - p $Options.SortBy
240+ | % {
218241 $curItem = $_
219242 $itemName = $CurItem.Name
220243 $itemRelPath = $CurItem.RelativePath
You can’t perform that action at this time.
0 commit comments