Skip to content

Commit

Permalink
Reverted (#59)
Browse files Browse the repository at this point in the history
  • Loading branch information
robertnitu02 authored Oct 23, 2024
1 parent fb3444d commit a39bc0d
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 102 deletions.
39 changes: 0 additions & 39 deletions docs/.vitepress/config.mts
Original file line number Diff line number Diff line change
@@ -1,41 +1,5 @@
import { defineConfig } from 'vitepress'

import Git from 'simple-git'

const git = Git({
maxConcurrentProcesses: 200
})

async function getContributorsAt(path: string) {
try {
const list = (
await git.raw(['log', '--pretty=format:"%an|%ae"', '--', path])
)
.split('\n')
.map((i) => i.slice(1, -1).split('|') as [string, string])
const map: Record<string, { name: string; count: number }> = {}

list
.filter((i) => i[1])
.forEach((i) => {
if (!map[i[1]]) {
map[i[1]] = {
name: i[0],
count: 0
}
}
map[i[1]].count++
})

return Object.values(map)
.sort((a, b) => b.count - a.count)
.map((i) => i.name)
} catch (e) {
console.error(e)
return []
}
}

export default defineConfig({
title: "B-Zone V Wiki",
description: "Wiki page - B-Zone V Roleplay",
Expand Down Expand Up @@ -173,8 +137,5 @@ export default defineConfig({
footer: {
copyright: 'Copyright © 2024 B-Zone V'
}
},
async transformPageData({ relativePath }) {
return { contributors: await getContributorsAt(relativePath) }
}
})
8 changes: 0 additions & 8 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
<script setup>
import { useData } from 'vitepress'
import { computed } from 'vue'

const { page } = useData()
const contributors = computed(() => page.value.contributors)
</script>

# B-Zone V Wiki

## Bun venit!
Expand Down
53 changes: 1 addition & 52 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,5 @@
"docs:dev": "vitepress dev docs",
"docs:build": "vitepress build docs",
"docs:preview": "vitepress preview docs"
},
"dependencies": {
"simple-git": "^3.27.0"
}
}

0 comments on commit a39bc0d

Please sign in to comment.