-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d08bccd
commit 45f4d69
Showing
2 changed files
with
32 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,5 @@ | ||
module.exports = { | ||
depth: 3, | ||
sitemap: [ | ||
"/wiki/development", | ||
"/wiki/projects", | ||
"/wiki/release-notes" | ||
] | ||
depth: 5, | ||
inlineDynamicImports: true, | ||
sitemap:["/sitemap"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<script> | ||
import { url, isActive, node as nodeHelper } from '@roxi/routify' | ||
export let node | ||
node = node || $nodeHelper.root | ||
/** | ||
* Basic unstyled navigation. Feel free to style it as you wish. | ||
* | ||
* _node is the current node. | ||
* _node.linkableChildren is the current node's children. | ||
* $url creates an URL from a node path. | ||
* $isActive checks if a node is part of the current URL. | ||
**/ | ||
</script> | ||
|
||
<ul> | ||
<!-- iterates over each child page --> | ||
{#each node.linkableChildren as childNode} | ||
<!-- if the child is active, adds the isActive class --> | ||
<li class:isActive={$isActive(childNode.path)}> | ||
<a href={$url(childNode.path)}> | ||
<!-- title can be overwritten using `meta.title` --> | ||
{childNode.title} | ||
</a> | ||
{#if childNode.linkableChildren.length > 0} | ||
<svelte:self node={childNode} /> | ||
{/if} | ||
</li> | ||
{/each} | ||
</ul> |