| | |
| | | </item>` |
| | | |
| | | const items = Array.from(idx) |
| | | .sort(([_, f1], [__, f2]) => { |
| | | if (f1.date && f2.date) { |
| | | return f2.date.getTime() - f1.date.getTime() |
| | | } else if (f1.date && !f2.date) { |
| | | return -1 |
| | | } else if (!f1.date && f2.date) { |
| | | return 1 |
| | | } |
| | | |
| | | return f1.title.localeCompare(f2.title) |
| | | }) |
| | | .map(([slug, content]) => createURLEntry(simplifySlug(slug), content)) |
| | | .slice(0, limit ?? idx.size) |
| | | .join("") |
| | |
| | | <channel> |
| | | <title>${escapeHTML(cfg.pageTitle)}</title> |
| | | <link>${root}</link> |
| | | <description>${!!limit ? `Last ${limit} notes` : "Recent notes"} on ${ |
| | | cfg.pageTitle |
| | | }</description> |
| | | <description>${!!limit ? `Last ${limit} notes` : "Recent notes"} on ${escapeHTML( |
| | | cfg.pageTitle, |
| | | )}</description> |
| | | <generator>Quartz -- quartz.jzhao.xyz</generator> |
| | | ${items} |
| | | </channel> |