Vuepress: Logo

Created on 17 Apr 2018  路  7Comments  路  Source: vuejs/vuepress

How i can add logo to nav bar.
any suggestion.

Most helpful comment

you can define a logo property in your theme config

For example

themeConfig: {
    logo: '/logo.png',
}

All 7 comments

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
Was this page helpful?
0 / 5 - 0 ratings

Related issues

AleksejDix picture AleksejDix  路  3Comments

zeke picture zeke  路  3Comments

cfjedimaster picture cfjedimaster  路  3Comments

herrbischoff picture herrbischoff  路  3Comments

higuoxing picture higuoxing  路  3Comments