-
Notifications
You must be signed in to change notification settings - Fork 412
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[infra] Add site updates for 2.0.0 (#178)
- Loading branch information
1 parent
185d1e8
commit 8aa512b
Showing
10 changed files
with
92 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- | ||
title: Quicklink | ||
layout: layouts/base.njk | ||
description: Faster subsequent page-loads by prefetching in-viewport links during idle time. | ||
--- | ||
{% include "components/heading.njk" %} | ||
|
||
{% include "components/why-quicklink.njk" %} | ||
|
||
{% include "components/copy-snippet.njk" %} | ||
|
||
{% include "components/download.njk" %} | ||
|
||
{% include "components/trusted-by.njk" %} | ||
|
||
{% include "components/installation.njk" %} | ||
|
||
{% include "components/usage.njk" %} | ||
|
||
{% include "components/over-prefetching.njk" %} | ||
|
||
{% include "components/react.njk" %} | ||
|
||
{% include "components/chrome-extension.njk" %} | ||
|
||
{% include "components/why-prefetch.njk" %} | ||
|
||
{% include "components/use-with.njk" %} |
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{% extends "layouts/highlighted-section-wrapper.njk" %} | ||
{% block section %} | ||
<h1 class="heading text-center"> | ||
Speed up next page navigations by up to <em class="secondary-font-color">1 second</em> and improve conversions by up to <em class="secondary-font-color">10%</em> | ||
"We implemented Quicklink and saw a <em class="secondary-font-color">50%</em> increase in conversions and <em class="secondary-font-color">4x</em> faster page transitions" - NewEgg | ||
</h1> | ||
{% endblock %} |
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,44 @@ | ||
{% extends "layouts/normal-section-wrapper.njk" %} | ||
{% block section %} | ||
{% sectionTitle "Single page apps (React)" %} | ||
{% markdownConvert %} | ||
|
||
### Installation | ||
|
||
First, install the packages with [node](https://nodejs.org) and [npm](https://npmjs.com): | ||
|
||
```sh | ||
npm install quicklink webpack-route-manifest --save-dev | ||
``` | ||
|
||
Then, configure Webpack route manifest into your project, as explained [here](https://github.com/lukeed/webpack-route-manifest). | ||
This will generate a map of routes and chunks called `rmanifest.json`. It can be obtained at: | ||
|
||
* URL: `site_url/rmanifest.json` | ||
* Window object: `window.__rmanifest` | ||
|
||
### Usage | ||
|
||
Import `quicklink` React HOC where want to add prefetching functionality. | ||
Wrap your routes with the `withQuicklink()` HOC. | ||
|
||
Example: | ||
|
||
```sh | ||
import { withQuicklink } from 'quicklink/dist/react/hoc.js'; | ||
|
||
const options = { | ||
origins: [] | ||
}; | ||
|
||
<Suspense fallback={<div>Loading...</div>}> | ||
<Route path="/" exact component={withQuicklink(Home, options)} /> | ||
<Route path="/blog" exact component={withQuicklink(Blog, options)} /> | ||
<Route path="/blog/:title" component={withQuicklink(Article, options)} /> | ||
<Route path="/about" exact component={withQuicklink(About, options)} /> | ||
</Suspense> | ||
``` | ||
|
||
{% endmarkdownConvert %} | ||
{% endblock %} | ||
|
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,8 @@ | ||
{% extends "layouts/normal-section-wrapper.njk" %} | ||
{% block section %} | ||
{% sectionTitle "Why Quicklink\'s prefetch?" %} | ||
|
||
<div class="center"> | ||
<img src="/assets/images/graphs/prefetch-improve-svgomg.svg" alt="Prefetch pages a user may need in the future to improve subsequent page loads"/> | ||
</div> | ||
{% endblock %} |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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