bsc

Comprehensive codebase and cou...
Log | Files | Refs | Activity | README | LICENSE

commit 12c54a0a527a50280c2007a9d54354b7a60c521c
parent 25d7e3952be826ccba29559a42fac3e65245a3de
Author: Amit Dutta <mail@amit.is-a.dev>
Date:   Mon, 24 Aug 2026 15:56:59 +0530

Merge pull request #70 from notamitgamer/chore/remove-related-pages

chore: remove related pages feature
Diffstat:
Ddocs/.vitepress/theme/components/RelatedPages.vue | 85-------------------------------------------------------------------------------
Mdocs/.vitepress/theme/index.ts | 4+---
2 files changed, 1 insertion(+), 88 deletions(-)

diff --git a/docs/.vitepress/theme/components/RelatedPages.vue b/docs/.vitepress/theme/components/RelatedPages.vue @@ -1,85 +0,0 @@ -<script setup> -import { computed } from 'vue' -import { useData, useRoute } from 'vitepress' -import { data as tagsData } from '../../tags.data.ts' - -const MAX_RELATED = 6 - -const { frontmatter } = useData() -const route = useRoute() - -function stripTitleIcon(title) { - if (!title) return title - return title.replace(/<svg[\s\S]*?<\/svg>\s*/i, '').trim() -} - -const related = computed(() => { - const tags = frontmatter.value.tags - if (!Array.isArray(tags) || tags.length === 0) return [] - - const currentPath = route.path - - const seen = new Map() - - for (const tag of tags) { - const pages = tagsData[tag] - if (!pages) continue - for (const p of pages) { - if (seen.has(p.url)) continue - if (p.url === currentPath) continue - seen.set(p.url, { title: stripTitleIcon(p.title), url: p.url, tag }) - } - } - - return Array.from(seen.values()).slice(0, MAX_RELATED) -}) -</script> - -<template> - <div v-if="related.length" class="bsc-related"> - <h3 class="bsc-related-heading">Related pages</h3> - <ul class="bsc-related-list"> - <li v-for="item in related" :key="item.url"> - <a :href="item.url">{{ item.title }}</a> - </li> - </ul> - </div> -</template> - -<style scoped> -.bsc-related { - margin-top: 24px; - margin-bottom: 24px; - padding-top: 16px; - border-top: 1px solid var(--vp-c-divider); -} - -.bsc-related-heading { - margin: 0 0 8px; - font-size: 13px; - font-weight: 600; - color: var(--vp-c-text-2); - border: none; - padding: 0; -} - -.bsc-related-list { - margin: 0; - padding-left: 0; - list-style: none; - display: flex; - flex-direction: column; - gap: 4px; -} - -.bsc-related-list a { - font-size: 14px; - color: var(--vp-c-text-1); - text-decoration: none; -} - -.bsc-related-list a:hover { - color: var(--vp-c-brand-1); - text-decoration: underline; -} -</style> diff --git a/docs/.vitepress/theme/index.ts b/docs/.vitepress/theme/index.ts @@ -9,7 +9,6 @@ import CopyLinkButton from './components/CopyLinkButton.vue' import MarkdownMenu from './components/MarkdownMenu.vue' import Breadcrumbs from './components/Breadcrumbs.vue' import Labels from './components/Labels.vue' -import RelatedPages from './components/RelatedPages.vue' import SidebarTags from './components/SidebarTags.vue' import './style.css' @@ -28,8 +27,7 @@ export default { ]), 'doc-footer-before': () => h(Fragment, [ h(MarkdownMenu), - h(Labels), - h(RelatedPages) + h(Labels) ]), 'doc-after': () => h(Footer), 'sidebar-nav-after': () => h(SidebarTags),
© notamitgamer • Site Built: 2026-09-05 01:53:16 UTC • git-mirror commit: c170d72 [view raw info]
Originally created with stagit • modified by notamitgamer
Forked from github.com/notamitgamer/git-mirror