Skip to content

Conversation

NathanWalker
Copy link
Contributor

Reverts #168

@NathanWalker NathanWalker merged commit 242d859 into main Apr 10, 2025
0 of 2 checks passed
@NathanWalker NathanWalker deleted the revert-168-main branch April 10, 2025 20:30
@sadobass
Copy link
Contributor

sadobass commented Apr 11, 2025

In the current state, clicking NEXT causes the same error.
"Error: vitepress data not properly injected in app"
스크린샷 2025-04-11 오후 5 23 10

/docs/node_modules/vitepress/dist/client/app/index.js
    const data = initData(router.route);
    app.provide(dataSymbol, data); 
/docs/node_modules/vitepress/dist/client/app/data.js
    export function useData() {
        const data = inject(dataSymbol); 
        if (!data) {
            throw new Error('vitepress data not properly injected in app');
        }
        return data;
    }

However, when using vitepress' DefaultTheme.Layout, prev/next worked fine.
I think you should check @nativescript/vitepress-theme.
/docs/.vitepress/theme/index.js

import Theme from '@nativescript/vitepress-theme'
import '@nativescript/vitepress-theme/theme/style.css'
import Layout from './Layout.vue'

export default {
  extends: Theme(),
  Layout,
}

Layout.vue

<script setup>
import DefaultTheme from 'vitepress/theme'
</script>

<template>
    <DefaultTheme.Layout />
</template>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants