Skip to content

Commit

Permalink
fix(title): fixed cheatsheet title issue. (#6)
Browse files Browse the repository at this point in the history
* Replace custom component with CSS when VitePress wrap title in span tag

* fix(title): fixed title for cheatsheet

---------

Co-authored-by: Deep Kumbhare <kumbharedeep85@gmail.com>
  • Loading branch information
Usman Liaqat and DeepKumbhare85 authored Feb 20, 2024
1 parent 506318a commit 1c5154b
Show file tree
Hide file tree
Showing 6 changed files with 354 additions and 191 deletions.
2 changes: 1 addition & 1 deletion content/.vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export default defineConfig({
themeConfig: {
logo: { src: '/vue-cheatsheet-logo.png', alt: 'Vue Cheatsheet' },

siteTitle: false,
siteTitle: 'Vue Cheatsheet',
search: {
provider: 'local',
options: {
Expand Down
12 changes: 0 additions & 12 deletions content/.vitepress/theme/components/SiteTitle.vue

This file was deleted.

7 changes: 3 additions & 4 deletions content/.vitepress/theme/custom.scss
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
}
}


/* Style home logo */
.VPContent.is-home .VPHomeHero .VPImage {
width: 100%;
Expand Down Expand Up @@ -74,6 +73,6 @@
}

// Enable below after: https://github.com/vuejs/vitepress/pull/3522
// .VPNav:has(~ .is-home) .title > span {
// display: none;
// }
.VPNav:has(~ .is-home) .title > span {
display: none;
}
2 changes: 0 additions & 2 deletions content/.vitepress/theme/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import DefaultTheme from 'vitepress/theme';
import { h } from 'vue';
import DocFooter from './components/DocFooter.vue';
import SiteTitle from './components/SiteTitle.vue';
import SubscribeAlert from './components/SubscribeAlert.vue';
import HomeVueThemesCallOut from './components/VueThemesCallOut.vue';
import './custom.scss';
Expand All @@ -13,7 +12,6 @@ export default {
return h(DefaultTheme.Layout, null, {
'home-features-before': h(HomeVueThemesCallOut),
'doc-after': h(DocFooter),
'nav-bar-title-after': h(SiteTitle),
'home-hero-before': h(SubscribeAlert)
})
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"postcss": "^8.4.33",
"sass": "^1.69.7",
"tailwindcss": "^3.4.1",
"vitepress": "1.0.0-rc.36"
"vitepress": "1.0.0-rc.44"
},
"dependencies": {
"markdown-it-mathjax3": "^4.3.2",
Expand Down
Loading

0 comments on commit 1c5154b

Please sign in to comment.