-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add git repo link and edit links #55
Conversation
bd68705
to
57edeca
Compare
@sin-tanaka Hi! So sorry for the late reply. Thanks for the PR! Could you:
module.exports = {
themeConfig: {
repo: 'vuejs/vuex',
docsDir: 'docs',
docsBranch: 'dev',
editLinkText: 'Edit me!!'
}
}
|
57edeca
to
924fa05
Compare
@kiaking Thanks for the review!
https://github.com/vuejs/vitepress/blob/master/src/client/theme-default/config.ts#L7 export interface Config {
logo?
nav?: NavItem[] | false
sidebar?: SideBarConfig | MultiSideBarConfig
search?
editLink?: EditLinkConfig | false
lastUpdated?
prevLink?
nextLink?
} Would you prefer to be able to set it to the first level of themeConfig, just like VuePress?
|
@sin-tanaka Thanks for the rebase 🙌
Yeah I think that would be better. For example having configs as close as VuePress will make migration from VuePress to VitePress a lot easier 👍 Would you mind doing that 😃 ? |
f35073a
to
b3cab2e
Compare
@kiaking I changed the edit config but then realized it already had a different structure than before. So I'm wondering if I should revert those changes to keep the original new editconfig type |
@posva Nice! I think the current config is desired one, since it matches the VuePress config. So I would say we should keep it this way 👍 |
@@ -43,6 +43,7 @@ export function createMarkdownToVueRenderFn( | |||
title: inferTitle(frontmatter, content), | |||
frontmatter, | |||
headers: data.headers, | |||
relativePath: file.replace(/\\/g, '/'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sin-tanaka What does this represent? Why are you replacing /
with /
? is it for Windows? I saw it in the vuepress code base too
Resolves #52
config file: https://github.com/sin-tanaka/vitepress-playground/blob/master/docs/.vitepress/config.js
with locales