Skip to content

Commit

Permalink
docs: add nested properties (#1639)
Browse files Browse the repository at this point in the history
* build: deploy to multiple regions

* docs: add nested properties

* build: update dependencies
  • Loading branch information
Kikobeats committed Jun 27, 2023
1 parent 42b891b commit 03ee18b
Show file tree
Hide file tree
Showing 14 changed files with 33 additions and 30 deletions.
32 changes: 16 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,27 +101,27 @@
"@microlink/mql": "~0.10.33",
"@microlink/react": "~5.5.15",
"@microlink/recipes": "~1.8.0",
"@react-spring/web": "~9.7.2",
"@stripe/react-stripe-js": "~2.1.0",
"@stripe/stripe-js": "~1.54.0",
"@react-spring/web": "~9.7.3",
"@stripe/react-stripe-js": "~2.1.1",
"@stripe/stripe-js": "~1.54.1",
"@styled-system/prop-types": "~5.1.5",
"@tippyjs/react": "~4.2.6",
"@vercel/analytics": "~1.0.1",
"beauty-error": "~1.2.15",
"cssnano": "~6.0.1",
"cssnano-preset-advanced": "~6.0.1",
"dlv": "~1.1.3",
"gatsby": "~5.10.0",
"gatsby": "~5.11.0",
"gatsby-plugin-advanced-sitemap": "~2.1.0",
"gatsby-plugin-canonical-urls": "~5.10.0",
"gatsby-plugin-catch-links": "~5.10.0",
"gatsby-plugin-sass": "~6.10.0",
"gatsby-plugin-styled-components": "~6.10.0",
"gatsby-source-filesystem": "~5.10.0",
"gatsby-transformer-javascript-frontmatter": "~5.10.0",
"gatsby-transformer-json": "~5.10.0",
"gatsby-transformer-remark": "~6.10.0",
"gatsby-transformer-yaml": "~5.10.0",
"gatsby-plugin-canonical-urls": "~5.11.0",
"gatsby-plugin-catch-links": "~5.11.0",
"gatsby-plugin-sass": "~6.11.0",
"gatsby-plugin-styled-components": "~6.11.0",
"gatsby-source-filesystem": "~5.11.0",
"gatsby-transformer-javascript-frontmatter": "~5.11.0",
"gatsby-transformer-json": "~5.11.0",
"gatsby-transformer-remark": "~6.11.0",
"gatsby-transformer-yaml": "~5.11.0",
"github-slugger": "~2.0.0",
"got": "~11.8.6",
"humanize-url": "~3.0.0",
Expand All @@ -148,12 +148,12 @@
"react-timeago": "~7.1.0",
"react-twitter-widgets": "~1.11.0",
"remark-slug": "~7.0.1",
"sass": "~1.62.1",
"sass": "~1.63.6",
"styled-components": "~5.3.11",
"styled-is": "~1.3.0",
"styled-system": "~5.1.5",
"swr": "~2.1.5",
"tldts": "~6.0.5",
"swr": "~2.2.0",
"tldts": "~6.0.8",
"unique-random-array": "~3.0.0"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/docs/api/parameters/pdf/format.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ It sets the paper format for the [pdf](/docs/api/parameters/pdf) over the target

<Iframe src="https://cdn.microlink.io/docs/caffeine.pdf" />

<MultiCodeEditor languages={mqlCode('https://keygen.sh/blog/i-quit/', { pdf: true, format: 'A4' })} />
<MultiCodeEditor languages={mqlCode('https://keygen.sh/blog/i-quit/', { pdf: { format: 'A4' } })} />

The format options are:

Expand Down
2 changes: 1 addition & 1 deletion src/pages/docs/api/parameters/pdf/height.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ It sets the paper height for the [pdf](/docs/api/parameters/pdf) over the target

<Iframe src="https://cdn.microlink.io/docs/oxide.pdf" />

<MultiCodeEditor languages={mqlCode('https://oxide.computer', { pdf: true, height: '480px' })} />
<MultiCodeEditor languages={mqlCode('https://oxide.computer', { pdf: { height: '480px' } })} />

The value accepts values labeled with units.
2 changes: 1 addition & 1 deletion src/pages/docs/api/parameters/pdf/landscape.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ It sets landscape orientation for the [pdf](/docs/api/parameters/pdf) over the t

<Iframe src="https://cdn.microlink.io/docs/algolia.pdf" />

<MultiCodeEditor languages={mqlCode('https://www.algolia.com', { pdf: true, landscape: true })} />
<MultiCodeEditor languages={mqlCode('https://www.algolia.com', { pdf: { landscape: true } })} />
2 changes: 1 addition & 1 deletion src/pages/docs/api/parameters/pdf/margin.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ It sets the paper margins for the [pdf](/docs/api/parameters/pdf) over the targe

<Iframe src="https://cdn.microlink.io/pdf/basecamp.pdf" />

<MultiCodeEditor languages={mqlCode('https://basecamp.com/shapeup/0.3-chapter-01', { pdf: true, margin: '4mm' })} />
<MultiCodeEditor languages={mqlCode('https://basecamp.com/shapeup/0.3-chapter-01', { pdf: { margin: '4mm' } })} />

All possible units are:

Expand Down
2 changes: 1 addition & 1 deletion src/pages/docs/api/parameters/pdf/pageRanges.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ It specifies the page range for generating the [pdf](/docs/api/parameters/pdf) o

<Iframe src="https://cdn.microlink.io/docs/stripe.pdf" />
<MultiCodeEditor languages={mqlCode('https://stripe.com', { pdf: true, landscape: true, pageRanges: '1-1' })} />
<MultiCodeEditor languages={mqlCode('https://stripe.com', { pdf: { landscape: { pageRanges: '1-1' } } })} />
Any interval can be defined, such as, `'1-5, 8, 11-13'`. If you want to print just one page, specify it as range, e.g., `'1-1'`.
2 changes: 1 addition & 1 deletion src/pages/docs/api/parameters/pdf/scale.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ It sets the scale for the [pdf](/docs/api/parameters/pdf) over the target [url](

<Iframe src="https://cdn.microlink.io/pdf/varnis-cache.pdf" />

<MultiCodeEditor languages={mqlCode('https://varnish-cache.org/docs/trunk/phk/thatslow.html', { pdf: true, scale: 1 })} />
<MultiCodeEditor languages={mqlCode('https://varnish-cache.org/docs/trunk/phk/thatslow.html', { pdf: { scale: 1 } })} />

Scale amount must be between <Type children='0.1'/> and <Type children='2'/>.
2 changes: 1 addition & 1 deletion src/pages/docs/api/parameters/pdf/width.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ It sets the paper width for the [pdf](/docs/api/parameters/pdf) over the target

<Iframe src="https://cdn.microlink.io/docs/raycast.pdf" />

<MultiCodeEditor languages={mqlCode('https://www.raycast.com/', { pdf: true, width: '640px' })} />
<MultiCodeEditor languages={mqlCode('https://www.raycast.com/', { pdf: { width: '640px' } })} />

The value accepts values labeled with units.
2 changes: 1 addition & 1 deletion src/pages/docs/api/parameters/screenshot/element.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ It captures the DOM element matching the given [CSS selector](https://developer.

![](https://cdn.microlink.io/docs/codepen.png)

<MultiCodeEditor languages={mqlCode('https://codepen.io/fossheim/full/oNjxrZa', { screenshot: true, element: '#result-iframe-wrap' })} />
<MultiCodeEditor languages={mqlCode('https://codepen.io/fossheim/full/oNjxrZa', { screenshot: { element: '#result-iframe-wrap' } })} />

It will wait for the element to appear in the page and to be visible.
2 changes: 1 addition & 1 deletion src/pages/docs/api/parameters/screenshot/fullPage.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ It takes a full scrollable page [screenshot](/docs/api/parameters/screenshot) ov

<Image maxWidth='40%' src="https://cdn.microlink.io/docs/recipes.png" />

<MultiCodeEditor languages={mqlCode('https://microlink.io/recipes', { screenshot: true, fullPage: true })} />
<MultiCodeEditor languages={mqlCode('https://microlink.io/recipes', { screenshot: { fullPage: true } })} />

The response time could be slower since the browser has to wait more elements before taking the screenshot.

2 changes: 1 addition & 1 deletion src/pages/docs/api/parameters/screenshot/omitBackground.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ Default: <Type children='false'/>

It omits the white background for the [screenshot](/docs/api/parameters/screenshot) over the target [url](/docs/api/parameters/url).

<MultiCodeEditor languages={mqlCode('https://kikobeats.com', { screenshot: true, omitBackground: true })} />
<MultiCodeEditor languages={mqlCode('https://kikobeats.com', { screenshot: { omitBackground: true } })} />
8 changes: 5 additions & 3 deletions src/pages/docs/api/parameters/screenshot/overlay.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ It creates a beauty [screenshot](/docs/api/parameters/screenshot) composition us

<Image src="https://cdn.microlink.io/docs/overlay.png" />

<MultiCodeEditor languages={mqlCode('{{demolinks.apple.url}}', { screenshot: true, overlay: {
background: 'linear-gradient(225deg, #FF057C 0%, #8D0B93 50%, #321575 100%)',
browser: 'dark'
<MultiCodeEditor languages={mqlCode('{{demolinks.apple.url}}', { screenshot: {
overlay: {
background: 'linear-gradient(225deg, #FF057C 0%, #8D0B93 50%, #321575 100%)',
browser: 'dark'
}
} })} />

An overlay is specified as `browser` theme, being <Type children="'light'"/>` and <Type children="'dark'"/> supported.
Expand Down
2 changes: 1 addition & 1 deletion src/pages/docs/api/parameters/screenshot/type.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Values: <TypeContainer><Type children="'jpeg'"/> | <Type children="'png'"/></Typ

It specifies the screenshot file type for the [screenshot](/docs/api/parameters/screenshot) over the target [url](/docs/api/parameters/url).

<MultiCodeEditor languages={mqlCode('https://microlink.io', { screenshot: true, type: 'jpeg' })} />
<MultiCodeEditor languages={mqlCode('https://microlink.io', { screenshot: { type: 'jpeg' } })} />

This query parameter just defines the file format to be used at asset generation.

Expand Down
1 change: 1 addition & 0 deletions vercel.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"regions": ["sfo1", "iad1", "fra1"],
"redirects": [
{
"source": "/adblock",
Expand Down

2 comments on commit 03ee18b

@vercel
Copy link

@vercel vercel bot commented on 03ee18b Jun 27, 2023

Choose a reason for hiding this comment

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

Deployment failed with the following error:

Because your Team is on the Pro plan and your Project was created after July 10th 2020, deploying Serverless Functions to multiple regions is restricted to the Enterprise plan.

Learn More: https://vercel.link/multiple-function-regions

@vercel
Copy link

@vercel vercel bot commented on 03ee18b Jun 27, 2023

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

www – ./

www-git-master-microlink.vercel.app
www.microlink.io
www-microlink.vercel.app
microlink.io

Please sign in to comment.