Skip to content
Merged
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
16 changes: 12 additions & 4 deletions frontend/src/components/shared/RepoSummary.vue
Original file line number Diff line number Diff line change
Expand Up @@ -166,12 +166,20 @@
};

const fetchData = async () => {
const url = `/${props.repoType}s/${props.namespacePath}/blob/README.md`
let content = null

const { data } = await useFetchApi(url).json()
if (props.repoType === 'skill') {
const result = await useFetchApi(`/${props.repoType}s/${props.namespacePath}/blob/SKILL.md`).json()
content = result.data.value?.data?.content || null
}

if (data.value) {
rawReadmeContent.value = data.value.data.content
if (!content) {
const result = await useFetchApi(`/${props.repoType}s/${props.namespacePath}/blob/README.md`).json()
content = result.data.value?.data?.content || null
}

if (content) {
rawReadmeContent.value = content
resolveReadmeContent()
}
loading.value = false
Expand Down