Remove title header from the news.json file content (#56)

* Remove title header from the `news.json` file content.

* Fix regex to match only `h1`.
This commit is contained in:
Alessandro Jean 2023-09-10 18:23:49 -03:00 committed by GitHub
parent fa8f30d6b2
commit 6b7faa105f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -38,6 +38,7 @@ async function generateFeed(config: SiteConfig, hostname: string) {
const markdown = (src ?? "") const markdown = (src ?? "")
.replace(/^---.*---/s, "") .replace(/^---.*---/s, "")
.replace(/]\((\/.*?)\)/g, `](${hostname}$1)`) .replace(/]\((\/.*?)\)/g, `](${hostname}$1)`)
.replace(/^# .*$/m, "")
.trim() .trim()
const post = { const post = {