Skip to content

Commit

Permalink
✨ (social-image) baseUrl from docus config, and default WS to browser…
Browse files Browse the repository at this point in the history
…less
  • Loading branch information
Tahul committed May 20, 2021
1 parent 3fe4b0b commit bee93de
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
15 changes: 6 additions & 9 deletions src/app/nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@ import { nuxtConfig } from 'nuxt-extend'
const r = (path: any) => resolve(__dirname, path)

export default nuxtConfig({
/**
* Name for nuxt-extend
*/
name: 'docus',
/**
* RootDir
*/
rootDir: __dirname,

/**
Expand Down Expand Up @@ -42,15 +48,6 @@ export default nuxtConfig({
colorMode: {
classSuffix: ''
},
/**
* Social image local generation by default
*/
socialImage: {
baseUrl: 'DOMIN',
chrome: {
browserWSEndpoint: 'wss://chrome.browserless.io/'
}
},

/**
* Modules & plugins
Expand Down
4 changes: 2 additions & 2 deletions src/social-image/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ export default <Module<SocialImageModuleOptions & InternalModuleOptions>>functio
if (process.platform === 'win32') executablePath = 'C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe'

const defaults: SocialImageModuleOptions & InternalModuleOptions = {
baseUrl: undefined,
baseUrl: this?.$docus?.url || undefined,
outDir: '_preview',
_outDir: '',
internalUrl: '',
chrome: {
browserWSEndpoint: undefined,
browserWSEndpoint: 'wss://chrome.browserless.io',
defaultViewport: { width: 1280, height: 640 },
args: [],
headless: true,
Expand Down

1 comment on commit bee93de

@vercel
Copy link

@vercel vercel bot commented on bee93de May 20, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.