mirror of
https://github.com/streetwriters/notesnook.git
synced 2026-08-29 10:09:26 +02:00
docs(help): fix links ignoring baseUrl on docs index page (#10243)
This commit is contained in:
@@ -7,6 +7,7 @@
|
|||||||
* built from, so it can never drift from the navigation.
|
* built from, so it can never drift from the navigation.
|
||||||
*/
|
*/
|
||||||
import { sidebar } from "../../sidebar.mjs";
|
import { sidebar } from "../../sidebar.mjs";
|
||||||
|
import { withBase } from "vitepress";
|
||||||
|
|
||||||
type Item = { text: string; link?: string; items?: Item[] };
|
type Item = { text: string; link?: string; items?: Item[] };
|
||||||
|
|
||||||
@@ -24,13 +25,19 @@ const pageCount = groups.reduce(
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="nn-index">
|
<div class="nn-index">
|
||||||
<p class="nn-index__count">{{ pageCount }} pages, grouped by what you're trying to do.</p>
|
<p class="nn-index__count">
|
||||||
|
{{ pageCount }} pages, grouped by what you're trying to do.
|
||||||
|
</p>
|
||||||
<div class="nn-index__grid">
|
<div class="nn-index__grid">
|
||||||
<section v-for="group in groups" :key="group.text" class="nn-index__group">
|
<section
|
||||||
|
v-for="group in groups"
|
||||||
|
:key="group.text"
|
||||||
|
class="nn-index__group"
|
||||||
|
>
|
||||||
<h2 class="nn-index__heading">{{ group.text }}</h2>
|
<h2 class="nn-index__heading">{{ group.text }}</h2>
|
||||||
<ul class="nn-index__list">
|
<ul class="nn-index__list">
|
||||||
<li v-for="item in group.items" :key="item.link || item.text">
|
<li v-for="item in group.items" :key="item.link || item.text">
|
||||||
<a v-if="item.link" :href="item.link">{{ item.text }}</a>
|
<a v-if="item.link" :href="withBase(item.link)">{{ item.text }}</a>
|
||||||
<span v-else>{{ item.text }}</span>
|
<span v-else>{{ item.text }}</span>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
Reference in New Issue
Block a user