Skip to content

Commit 50a06c2

Browse files
its-miromaroot
authored andcommitted
use Avatater
1 parent d8b2fc3 commit 50a06c2

File tree

3 files changed

+5
-30
lines changed

3 files changed

+5
-30
lines changed

.vitepress/data/bot.data.ts

Lines changed: 0 additions & 26 deletions
This file was deleted.

credits.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,21 @@ import {
1919
import { computed } from "vue";
2020

2121
import { data as _authors } from "/.vitepress/data/authors.data";
22-
import { data as _bot } from "/.vitepress/data/bot.data";
2322
import { data as _committers } from "/.vitepress/data/committers.data";
2423
import { data as _maintainers } from "/.vitepress/data/maintainers.data";
2524
import { data as _translators } from "/.vitepress/data/translators.data";
2625
import { Fabric } from "/.vitepress/types";
2726

27+
const FALLBACK_AVATAR = "/assets/avatater.png";
28+
2829
const data = useData();
2930
const options = computed(
3031
() => data.theme.value.credits as Fabric.CreditsOptions
3132
);
3233

3334
const authors = _authors.map((author) => ({
3435
...author,
35-
avatar: author.avatar || _bot.avatar,
36+
avatar: author.avatar || FALLBACK_AVATAR,
3637
title:
3738
author.number === 1
3839
? options.value.authors.description.singular
@@ -44,7 +45,7 @@ const authors = _authors.map((author) => ({
4445

4546
const committers = _committers.map((committer) => ({
4647
...committer,
47-
avatar: committer.avatar || _bot.avatar,
48+
avatar: committer.avatar || FALLBACK_AVATAR,
4849
title:
4950
committer.number === 1
5051
? options.value.committers.description.singular
@@ -58,7 +59,7 @@ const maintainers = _maintainers;
5859

5960
const translators = _translators.map((translator) => ({
6061
...translator,
61-
avatar: translator.avatar || _bot.avatar,
62+
avatar: translator.avatar || FALLBACK_AVATAR,
6263
title:
6364
translator.number === 1
6465
? options.value.translators.description.singular

public/assets/avatater.png

115 Bytes
Loading

0 commit comments

Comments
 (0)