Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 6 additions & 9 deletions .vitepress/genFeed.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
import path from 'path'
import { Feed } from 'feed'
import { createContentLoader, type SiteConfig } from 'vitepress'
import fsExtra from 'fs-extra'
import { createContentLoader, type SiteConfig } from 'vitepress'

const baseUrl = `https://engineering.multividas.com`

const { ensureDirSync, writeFileSync } = fsExtra

export async function genFeed(config: SiteConfig) {
const feed = new Feed({
title: 'Multividas Engineering blog',
description:
'Creative engineers and developers building a world where you can belong anywhere, Multividas Engineering blog is a technical news resource for engineers interested in how we solve large-scale technical challenges at Multividas.',
description: 'Creative engineers and developers building a world where you can belong anywhere, Multividas Engineering blog is a technical news resource for engineers interested in how we solve large-scale technical challenges at Multividas.',
id: baseUrl,
link: baseUrl,
language: 'en',
Expand All @@ -24,9 +25,7 @@ export async function genFeed(config: SiteConfig) {
}).load()

posts.sort(
(a, b) =>
+new Date(b.frontmatter.date as string) -
+new Date(a.frontmatter.date as string)
(a, b) => +new Date(b.frontmatter.date as string) - +new Date(a.frontmatter.date as string)
)

for (const { url, excerpt, frontmatter, html } of posts) {
Expand All @@ -39,9 +38,7 @@ export async function genFeed(config: SiteConfig) {
author: [
{
name: frontmatter.author,
link: frontmatter.twitter
? `https://twitter.com/${frontmatter.twitter}`
: undefined
link: frontmatter.twitter ? `https://twitter.com/${frontmatter.twitter}` : undefined
}
],
date: new Date(frontmatter.date),
Expand Down
17 changes: 0 additions & 17 deletions fetchApi.js

This file was deleted.

38 changes: 0 additions & 38 deletions generateSitemap.js

This file was deleted.

Loading
Loading