-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #75 from nzzdev/release-2.6.0
v 2.6.0
- Loading branch information
Showing
13 changed files
with
2,038 additions
and
1,062 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,7 +39,7 @@ a:hover { | |
} | ||
|
||
header, main, footer { | ||
max-width: 760px; | ||
max-width: 900px; | ||
margin: 0 auto; | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
--- | ||
title: Plugins | ||
--- | ||
|
||
## screenshot | ||
To use the screenshot plugin you have to configure it. | ||
You do this by passing these settings in the `hapi` object in the config object passed to Q server init function: | ||
```javascript | ||
init({ | ||
hapi: { | ||
plugins: { | ||
'q-screenshot': { | ||
methods: { | ||
getScripts: function(renderingInfo) { | ||
const scripts = []; | ||
// implement your specific loader logic here, turning whatever your tools return as renderingInfo | ||
// into an array of scripts. every object in this array needs to have one of two properties: content, url | ||
return scripts; | ||
}, | ||
getStylesheets: function(renderingInfo) { | ||
const stylesheets = []; | ||
// implement your specific loader logic here, turning whatever your tools return as renderingInfo | ||
// into an array of stylesheets. every object in this array needs to have one of two properties: content, url | ||
return stylesheets; | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
config: { | ||
// ... | ||
} | ||
} | ||
``` | ||
You need to have a _config/targets.js_ in your Q server implementation that configures the targets to be used with the screenshot api as `type: 'web'`. | ||
This gives you an endpoint `/screenshot/{id}.png?target=your_target&width=600&dpr=2&background=white&padding=20` where `dpr` (default: `1`), `background` (default: no background) and `padding` (default: `0`) are optional. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.