mirror of
https://github.com/alrayyes/wiki.git
synced 2025-05-20 14:52:13 +00:00
base path refactor, more docs
This commit is contained in:
parent
08f8e3b4a4
commit
906f91f8ee
37 changed files with 1861 additions and 156 deletions
quartz/components
|
@ -1,7 +1,7 @@
|
|||
import { QuartzComponentConstructor, QuartzComponentProps } from "./types"
|
||||
import style from "./styles/backlinks.scss"
|
||||
import { relativeToRoot } from "../path"
|
||||
import { stripIndex } from "./scripts/util"
|
||||
import { clientSideSlug } from "./scripts/util"
|
||||
|
||||
function Backlinks({ fileData, allFiles }: QuartzComponentProps) {
|
||||
const slug = fileData.slug!
|
||||
|
@ -10,7 +10,7 @@ function Backlinks({ fileData, allFiles }: QuartzComponentProps) {
|
|||
<h3>Backlinks</h3>
|
||||
<ul class="overflow">
|
||||
{backlinkFiles.length > 0 ?
|
||||
backlinkFiles.map(f => <li><a href={stripIndex(relativeToRoot(slug, f.slug!))} class="internal">{f.frontmatter?.title}</a></li>)
|
||||
backlinkFiles.map(f => <li><a href={clientSideSlug(relativeToRoot(slug, f.slug!))} class="internal">{f.frontmatter?.title}</a></li>)
|
||||
: <li>No backlinks found</li>}
|
||||
</ul>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue