Skip to content

Commit

Permalink
✨ (social-image) allow to disable from docus.config
Browse files Browse the repository at this point in the history
  • Loading branch information
Tahul committed Jun 15, 2021
1 parent 2d2d1e1 commit 54b9c52
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nuxtjs.org/docus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export default {
url: 'https://nuxtjs.org',
template: 'docs',
credits: true,
socialImage: false,
theme: {
header: {
logo: {
Expand All @@ -13,8 +14,7 @@ export default {
title: false
},
colors: {
primary: '#00DC82',
test: 'red'
primary: '#00DC82'
},
shortcuts: {
'body-bg': 'bg-white dark:bg-secondary-black',
Expand Down
3 changes: 3 additions & 0 deletions src/social-image/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ interface InternalModuleOptions {
export default <Module<SocialImageModuleOptions & InternalModuleOptions>>function socialImageModule(moduleOptions) {
const { nuxt, addPlugin } = this
const { options: nuxtOptions, hook } = nuxt
const settings = this.$docus.settings

if (settings.socialImage === false) return

// Executable path defaults to MacOS
// Supports Linux & Win32 too
Expand Down

0 comments on commit 54b9c52

Please sign in to comment.