Skip to content

Commit

Permalink
🔥 (playground) remove playground content
Browse files Browse the repository at this point in the history
  • Loading branch information
Tahul committed May 22, 2021
1 parent 6452e37 commit 61cedc2
Show file tree
Hide file tree
Showing 31 changed files with 17 additions and 173 deletions.
9 changes: 0 additions & 9 deletions playground/content/en/1.index.md

This file was deleted.

3 changes: 0 additions & 3 deletions playground/content/en/10.about.md

This file was deleted.

13 changes: 0 additions & 13 deletions playground/content/en/2.hello.md

This file was deleted.

10 changes: 0 additions & 10 deletions playground/content/en/3.docs/0.index.md

This file was deleted.

79 changes: 0 additions & 79 deletions playground/content/en/3.docs/1.get-started/0.index.md

This file was deleted.

This file was deleted.

7 changes: 0 additions & 7 deletions playground/content/en/3.docs/2.configuration/0.index.md

This file was deleted.

1 change: 0 additions & 1 deletion playground/content/en/3.docs/2.configuration/1.website.md

This file was deleted.

1 change: 0 additions & 1 deletion playground/content/en/3.docs/2.configuration/2.theme.md

This file was deleted.

1 change: 0 additions & 1 deletion playground/content/en/3.docs/2.configuration/3.windi.md

This file was deleted.

1 change: 0 additions & 1 deletion playground/content/en/3.docs/2.configuration/4.nuxt.md

This file was deleted.

7 changes: 0 additions & 7 deletions playground/content/en/3.docs/3.pages/0.index.md

This file was deleted.

Empty file.
Empty file.
8 changes: 0 additions & 8 deletions playground/content/en/3.docs/4.components/0.index.md

This file was deleted.

Empty file.
Empty file.
Empty file.
Empty file.
7 changes: 0 additions & 7 deletions playground/content/en/3.docs/5.examples/0.index.md

This file was deleted.

Empty file.
Empty file.
Empty file.
Empty file.
7 changes: 0 additions & 7 deletions playground/content/en/3.docs/6.deployment/0.index.md

This file was deleted.

6 changes: 0 additions & 6 deletions playground/content/en/4.blog/0.index.md

This file was deleted.

1 change: 0 additions & 1 deletion playground/content/en/5.test/1.foo/1.bar.md

This file was deleted.

3 changes: 0 additions & 3 deletions playground/content/fr/1.index.md

This file was deleted.

5 changes: 0 additions & 5 deletions playground/content/fr/2.hello.md

This file was deleted.

5 changes: 5 additions & 0 deletions playground/pages/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
template: landing
---

# Hello :)
15 changes: 12 additions & 3 deletions src/core/runtime/composables/navigation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export const useDocusNavigation = ({ $nuxt, context, state, api }: DocusAddonCon
const { app, route } = context

const { locale } = app.i18n

if (!state.navigation) state.navigation = {}

// compute `currentNav` on every route change
Expand All @@ -28,7 +29,9 @@ export const useDocusNavigation = ({ $nuxt, context, state, api }: DocusAddonCon

const fetchNavigation = async () => {
const { body } = await api.data('/docus/navigation/' + locale)

state.navigation[locale] = body

fetchCounter.value += 1
}

Expand All @@ -37,13 +40,18 @@ export const useDocusNavigation = ({ $nuxt, context, state, api }: DocusAddonCon
let items = nav

if (from) {
console.log('from:', from)

const paths = from.split('/')

from = paths.slice(0, paths.length - 1).join('/')

console.log('from, then:', from)

const link = items.find(link => link.to === from)
if (link && (link.navigation as NavItemNavigationConfig).exclusive) {
items = [link]
}

if (link && (link.navigation as NavItemNavigationConfig).exclusive) items = [link]

items = items.map(_ => _)
}

Expand All @@ -65,6 +73,7 @@ export const useDocusNavigation = ({ $nuxt, context, state, api }: DocusAddonCon
return node
})
}

return filterLinks(items, 1)
}

Expand Down

1 comment on commit 61cedc2

@vercel
Copy link

@vercel vercel bot commented on 61cedc2 May 22, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.