Skip to content

Commit

Permalink
Merge branch 'release/v2.0.8' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Stein committed Apr 7, 2021
2 parents 0a90291 + 3d7541b commit fa61ac8
Show file tree
Hide file tree
Showing 7 changed files with 3,502 additions and 10 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## 2.0.8 - 2021-04-07
### Added
- Added `smallerSidebarHeadings` and `widerSidebar` theme config settings that can be enabled to improve class reference sidebar menu headings. [#24](https://github.com/pixelandtonic/vuepress-theme-craftdocs/issues/24)

### Changed
- Updated dependencies to resolve security issues.

## 2.0.7 - 2020-09-18
### Changed
- Updated package requirements to resolve security issues.
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ It makes the following changes over the default VuePress theme:
- Adds support for [code language toggles](#code-toggles) and [split page views](#split-views).
- Disables [interpolation](https://vuepress.vuejs.org/guide/using-vue.html#interpolation) for all inline `<code>` tags.
- Improves `<table>` styling.
- Adds `themeConfig` options to tweak sidebar sizing: `smallerSidebarHeadings` and `widerSidebar`. (Each `false` by default.)

## Setup

Expand Down
2 changes: 2 additions & 0 deletions enhanceApp.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ export default ({ Vue, options, router, siteData }) => {
Object.assign(options, {
data: {
codeLanguage: null,
smallerSidebarHeadings: false,
widerSidebar: false,
},

store: new Vuex.Store({
Expand Down
16 changes: 16 additions & 0 deletions layouts/Layout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,20 @@ export default {
);
},
hasSmallerSidebarHeadings() {
const { themeConfig } = this.$site;
return (
themeConfig.smallerSidebarHeadings === true
);
},
hasWiderSidebar() {
const { themeConfig } = this.$site;
return (
themeConfig.widerSidebar === true
);
},
sidebarItems() {
return resolveSidebarItems(
this.$page,
Expand All @@ -99,6 +113,8 @@ export default {
"no-navbar": !this.shouldShowNavbar,
"sidebar-open": this.isSidebarOpen,
"no-sidebar": !this.shouldShowSidebar,
"smaller-sidebar-headings": this.hasSmallerSidebarHeadings,
"wider-sidebar": this.hasWiderSidebar,
split: this.$page.frontmatter.split,
},
userPageClass,
Expand Down
Loading

0 comments on commit fa61ac8

Please sign in to comment.