How i can add logo to nav bar.
any suggestion.
you can define a logo property in your theme config
For example
themeConfig: {
logo: '/logo.png',
}
thanks @dyhpoon , but title text still appear with logo, how i can display only logo, if i remove the title from module.exports the logo appear only but no title in head pages
I dont think you can do so with the default theme. Perhaps you need to create your own theme.
Yeah, we don't want to make everything config based for the default theme. You can eject and tweak it yourself though.
I added the pageClass to the root README.md's YAML.
And defined a _custom CSS_ rule in the override.styl afterwards to hide the span.
Actually there seem to be an autohide in default-theme navbar component (https://github.com/vuejs/vuepress/blob/master/lib/default-theme/Navbar.vue)
if a logo is defined, but this didn't work for me, too.
unfortunately it seems you have to add the custom CSS to every page.
I did this by setting the title to a single space:
heroText: " "
I did this by adding this to index.styl:
.site-name.can-hide
display: none
Most helpful comment
you can define a
logoproperty in your theme configFor example