未验证 提交 09a2fe5c 编写于 作者: J JJ Kasper 提交者: GitHub

Amp page level reload (#6971)

* Only refresh the page when the active
page is updated in AMP mode

* Update handling of page reload to make sure it
still refreshes after a change to another page

* Update checking to be more accurate

* Fix amp-dev not being loaded without
experimental.amp and remove next.config from amp example

* Remove old with-amp example and
rename experimental-amp to with-amp

* update example name
Co-Authored-By: Nijjk <jj@jjsweb.site>

* Update comment wording
Co-Authored-By: Nijjk <jj@jjsweb.site>

* Use document for reload to keep scroll position
Co-Authored-By: Nijjk <jj@jjsweb.site>

* fallback to reloading on error
Co-Authored-By: Nijjk <jj@jjsweb.site>

* Update with-amp example readme
上级 11016221
[![Deploy to now](https://deploy.now.sh/static/button.svg)](https://deploy.now.sh/?repo=https://github.com/zeit/next.js/tree/master/examples/experimental-amp)
# Google AMP
## Warning
This is an experimental feature that is subject to change (breaking) between releases.
## How to use
### Using `create-next-app`
Execute [`create-next-app`](https://github.com/segmentio/create-next-app) with [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/) or [npx](https://github.com/zkat/npx#readme) to bootstrap the example:
```bash
npx create-next-app --example experimental-amp experimental-amp-app
# or
yarn create next-app --example experimental-amp experimental-amp-app
```
### Download manually
Download the example:
```bash
curl https://codeload.github.com/zeit/next.js/tar.gz/canary | tar -xz --strip=2 next.js-canary/examples/experimental-amp
cd experimental-amp
```
Install it and run:
```bash
npm install
npm run dev
# or
yarn
yarn dev
```
Deploy it to the cloud with [now](https://zeit.co/now) ([download](https://zeit.co/download))
```bash
now
```
## The idea behind the example
The Next.js team is working on first-class AMP support. You can periodically fetch an updated version of this template to view our progress.
export default ({ author }) => (
<>
<div className='byline'>By {author}</div>
<style jsx>{`
.byline {
color: green;
font-weight: bolder;
}
`}</style>
</>
)
module.exports = {
experimental: {
amp: true
}
}
{
"name": "experimental-amp",
"version": "1.0.0",
"scripts": {
"dev": "next",
"build": "next build",
"start": "next start"
},
"dependencies": {
"next": "latest",
"react": "^16.7.0",
"react-dom": "^16.7.0"
},
"license": "ISC"
}
import Head from 'next/head'
import { useAmp, withAmp } from 'next/amp'
import Byline from '../components/Byline'
export default withAmp(() => {
const isAmp = useAmp()
return (
<div>
<Head>
<title>The Dog</title>
</Head>
<h1>The Dog</h1>
<Byline author='Meow Meow Fuzzyface' />
<p>
<a href={isAmp ? '/dog' : '/dog?amp=1'}>
{isAmp ? 'View Non-AMP' : 'View AMP'} Version
</a>
</p>
<p className='caption'>Woooooooooooof</p>
<p>
Wafer donut candy soufflé{' '}
<a href={isAmp ? '/?amp=1' : '/'}>lemon drops</a> icing. Marzipan gummi
bears pie danish lollipop pudding powder gummi bears sweet. Pie sweet
roll sweet roll topping chocolate bar dragée pudding chocolate cake.
Croissant sweet chocolate bar cheesecake candy canes. Tootsie roll icing
macaroon bonbon cupcake apple pie candy canes biscuit candy canes.
Jujubes jelly liquorice toffee gingerbread. Candy tootsie roll macaroon
chocolate bar icing sugar plum pie. Icing gummies chocolate bar
chocolate marzipan bonbon cookie chocolate tart. Caramels danish halvah
croissant. Cheesecake cookie tootsie roll ice cream. Powder dessert
carrot cake muffin tiramisu lemon drops liquorice topping brownie.
Soufflé chocolate cake croissant cupcake jelly.
</p>
<p>
Muffin gummies dessert cheesecake candy canes. Candy canes danish cotton
candy tart dessert powder bear claw marshmallow. Muffin chocolate
marshmallow danish. Chocolate bar biscuit cake tiramisu. Topping sweet
brownie jujubes powder marzipan. Croissant wafer bonbon chupa chups cake
cake marzipan caramels jujubes. Cupcake cheesecake sweet roll
marshmallow lollipop danish jujubes jelly icing. Apple pie chupa chups
lollipop jelly-o cheesecake jelly beans cake dessert. Tootsie roll
tootsie roll bonbon pastry croissant gummi bears cake cake. Fruitcake
sugar plum halvah gingerbread cookie pastry chupa chups wafer lemon
drops. Marshmallow liquorice oat cake lollipop. Lemon drops oat cake
halvah liquorice danish powder cupcake soufflé. Cake tart topping
jelly-o tart sugar plum. Chocolate bar cookie wafer tootsie roll candy
cotton candy toffee pie donut.
</p>
<p>
Ice cream lollipop marshmallow tiramisu jujubes croissant. Bear claw
lemon drops marzipan candy bonbon cupcake powder. Candy canes cheesecake
bear claw pastry cake donut jujubes. Icing tart jelly-o soufflé bonbon
apple pie. Cheesecake pie chupa chups toffee powder. Bonbon lemon drops
carrot cake pudding candy halvah cheesecake lollipop cupcake. Pudding
marshmallow fruitcake. Gummi bears bonbon chupa chups lemon drops. Wafer
dessert gummies gummi bears biscuit donut tiramisu gummi bears brownie.
Tootsie roll liquorice bonbon cookie. Sesame snaps chocolate bar cake
croissant chupa chups cheesecake gingerbread tiramisu jelly. Cheesecake
ice cream muffin lollipop gummies. Sesame snaps jelly beans sweet bear
claw tart.
</p>
<p>
Sweet topping chupa chups chocolate cake jelly-o liquorice danish.
Pastry jelly beans apple pie dessert pastry lemon drops marzipan
gummies. Jelly beans macaroon bear claw cotton candy. Toffee sweet
lollipop toffee oat cake. Jelly-o oat cake fruitcake chocolate bar
sweet. Lemon drops gummies chocolate cake lollipop bear claw croissant
danish icing. Chocolate bar donut brownie chocolate cake lemon drops
chocolate bar. Cake fruitcake pudding chocolate apple pie. Brownie
tiramisu chocolate macaroon lemon drops wafer soufflé jujubes icing.
Cheesecake tiramisu cake macaroon tart lollipop donut. Gummi bears
dragée pudding bear claw. Muffin cake cupcake candy canes. Soufflé candy
canes biscuit. Macaroon gummies danish.
</p>
<p>
Cupcake cupcake tart. Cotton candy danish candy canes oat cake ice cream
candy canes powder wafer. Chocolate sesame snaps oat cake dragée
cheesecake. Sesame snaps marshmallow topping liquorice cookie
marshmallow. Liquorice pudding chocolate bar. Cake powder brownie
fruitcake. Carrot cake dessert marzipan sugar plum cupcake cheesecake
pastry. Apple pie macaroon ice cream fruitcake apple pie cookie. Tootsie
roll ice cream oat cake cheesecake donut cheesecake bear claw. Sesame
snaps marzipan jelly beans chocolate tootsie roll. Chocolate bar donut
dragée ice cream biscuit. Pie candy canes muffin candy canes ice cream
tiramisu.
</p>
</div>
)
}, { hybrid: true })
import Head from 'next/head'
import { useAmp, withAmp } from 'next/amp'
import Layout from '../components/Layout'
import Byline from '../components/Byline'
export default withAmp(() => {
const isAmp = useAmp()
return (
<Layout>
<Head>
<title>The Cat</title>
</Head>
<h1>The Cat</h1>
<Byline author='Dan Zajdband' />
<p>
<a href={isAmp ? '/' : '/?amp=1'}>
{isAmp ? 'View Non-AMP' : 'View AMP'} Version
</a>
</p>
<p className='caption'>Meowwwwwwww</p>
<p>
Cat ipsum dolor <a href={isAmp ? '/dog?amp=1' : '/dog'}>sit amet</a>,
eat grass, throw it back up but refuse to leave cardboard box or groom
yourself 4 hours - checked, have your beauty sleep 18 hours - checked,
be fabulous for the rest of the day - checked!. Hide from vacuum
cleaner. Chirp at birds chew foot chase the pig around the house and
meoooow!. Chase ball of string climb a tree, wait for a fireman jump to
fireman then scratch his face claw drapes, for meow to be let in yet
attack dog, run away and pretend to be victim meow loudly just to annoy
owners. Touch water with paw then recoil in horror hide when guests come
over, and tuxedo cats always looking dapper so has closed eyes but still
sees you or a nice warm laptop for me to sit on pee in human's bed until
he cleans the litter box. Steal the warm chair right after you get up
cat not kitten around yet claws in your leg eat all the power cords.
Lick sellotape curl into a furry donut immediately regret falling into
bathtub or you call this cat food? and fall asleep on the washing
machine. Purr for no reason hack up furballs and pelt around the house
and up and down stairs chasing phantoms. If it smells like fish eat as
much as you wish. Unwrap toilet paper chew iPad power cord white cat
sleeps on a black shirt lick the other cats. Lounge in doorway mew. Has
closed eyes but still sees you sleep on keyboard, so hunt anything that
moves lick sellotape but slap owner's face at 5am until human fills food
dish if it smells like fish eat as much as you wish. Meow to be let in
find empty spot in cupboard and sleep all day and thug cat sit by the
fire burrow under covers always hungry. Swat at dog hide when guests
come over purrrrrr chew on cable so mark territory, yet howl on top of
tall thing or find something else more interesting. Chase mice kitten is
playing with dead mouse. Sit and stare if it fits, i sits. Mark
territory damn that dog , but step on your keyboard while you're gaming
and then turn in a circle put butt in owner's face human give me
attention meow or eat and than sleep on your face. Friends are not food
jump around on couch, meow constantly until given food, or walk on car
leaving trail of paw prints on hood and windshield, and spread kitty
litter all over house, going to catch the red dot today going to catch
the red dot today. Jump off balcony, onto stranger's head.
</p>
<p>
Meow to be let out damn that dog howl uncontrollably for no reason
caticus cuteicus for play riveting piece on synthesizer keyboard. Meow
loudly just to annoy owners the dog smells bad for eat the fat cats
food, yet ignore the squirrels, you'll never catch them anyway cat
snacks spread kitty litter all over house or hopped up on catnip. Spit
up on light gray carpet instead of adjacent linoleum throwup on your
pillow, so cat is love, cat is life yet human is washing you why halp oh
the horror flee scratch hiss bite. Chase mice. Swat turds around the
house hide at bottom of staircase to trip human. Meowing non stop for
food howl on top of tall thing. Shake treat bag pee in human's bed until
he cleans the litter box missing until dinner time. Have secret plans
climb a tree, wait for a fireman jump to fireman then scratch his face
bleghbleghvomit my furball really tie the room together. Chase dog then
run away purr shake treat bag spit up on light gray carpet instead of
adjacent linoleum but dream about hunting birds. Hiss at vacuum cleaner
milk the cow lay on arms while you're using the keyboard sleep in the
bathroom sink. Stare at ceiling touch water with paw then recoil in
horror or refuse to leave cardboard box. Paw at your fat belly plan
steps for world domination for going to catch the red dot today going to
catch the red dot today slap owner's face at 5am until human fills food
dish scratch at the door then walk away for intrigued by the shower, but
steal the warm chair right after you get up. Fall asleep on the washing
machine destroy couch as revenge scream at teh bath so love to play with
owner's hair tie. Howl uncontrollably for no reason rub whiskers on bare
skin act innocent. Cats making all the muffins lick butt and make a
weird face meow all night having their mate disturbing sleeping humans
human give me attention meow intently stare at the same spot. Sleep on
dog bed, force dog to sleep on floor spot something, big eyes, big eyes,
crouch, shake butt, prepare to pounce for wake up human for food at 4am
or pooping rainbow while flying in a toasted bread costume in space
sleep on keyboard put toy mouse in food bowl run out of litter box at
full speed . Jump off balcony, onto stranger's head lick butt and make a
weird face but go into a room to decide you didn't want to be in there
anyway so then cats take over the world, pee in human's bed until he
cleans the litter box and if it fits, i sits caticus cuteicus. Eats
owners hair then claws head lounge in doorway, and hide when guests come
over chase ball of string eat owner's food play riveting piece on
synthesizer keyboard. Purrr purr littel cat, little cat purr purr spit
up on light gray carpet instead of adjacent linoleum kitty loves pigs
yet damn that dog meow or walk on car leaving trail of paw prints on
hood and windshield. Roll on the floor purring your whiskers off meow
all night having their mate disturbing sleeping humans need to chase
tail meow hide when guests come over. Soft kitty warm kitty little ball
of furr destroy the blinds meow leave hair everywhere attack dog, run
away and pretend to be victim. Going to catch the red dot today going to
catch the red dot today instantly break out into full speed gallop
across the house for no reason meow so hide when guests come over, yet
hide at bottom of staircase to trip human toy mouse squeak roll over
claws in your leg. Cat slap dog in face lick plastic bags why must they
do that.
</p>
<p>
Jump launch to pounce upon little yarn mouse, bare fangs at toy run hide
in litter box until treats are fed touch water with paw then recoil in
horror then cats take over the world i could pee on this if i had the
energy. Lie on your belly and purr when you are asleep toy mouse squeak
roll over so stick butt in face you call this cat food? and behind the
couch curl up and sleep on the freshly laundered towels yet love to play
with owner's hair tie. Knock dish off table head butt cant eat out of my
own dish walk on car leaving trail of paw prints on hood and windshield
find something else more interesting cats go for world domination, spit
up on light gray carpet instead of adjacent linoleum sit in box. Missing
until dinner time put toy mouse in food bowl run out of litter box at
full speed but poop in the plant pot and nap all day caticus cuteicus.
Leave hair everywhere attack feet mrow bleghbleghvomit my furball really
tie the room together meowwww eat grass, throw it back up. Hate dog
meowzer! find something else more interesting, yet cat snacks, so
scratch at the door then walk away chase mice. Chase laser scratch the
box plan steps for world domination massacre a bird in the living room
and then look like the cutest and most innocent animal on the planet for
stare at ceiling light and who's the baby. Stare at ceiling Gate keepers
of hell, for licks paws intently sniff hand. Pooping rainbow while
flying in a toasted bread costume in space. Gnaw the corn cob. Lick yarn
hanging out of own butt stare at ceiling lick butt and make a weird face
eat and than sleep on your face. Meow all night having their mate
disturbing sleeping humans attack feet, so poop on grasses stare at wall
turn and meow stare at wall some more meow again continue staring yet
purr. Have my breakfast spaghetti yarn. Cats secretly make all the
worlds muffins throwup on your pillow plays league of legends. Lick the
plastic bag scratch at the door then walk away. Unwrap toilet paper meow
to be let in walk on car leaving trail of paw prints on hood and
windshield yet hide from vacuum cleaner or massacre a bird in the living
room and then look like the cutest and most innocent animal on the
planet. Purr lick the curtain just to be annoying go into a room to
decide you didn't want to be in there anyway attack feet, and spit up on
light gray carpet instead of adjacent linoleum yet lick plastic bags.
Spit up on light gray carpet instead of adjacent linoleum touch water
with paw then recoil in horror so cat snacks. Purr. Lick sellotape
please stop looking at your phone and pet me yet stick butt in face
meow. Groom yourself 4 hours - checked, have your beauty sleep 18 hours
- checked, be fabulous for the rest of the day - checked! tuxedo cats
always looking dapper but purrrrrr. Claws in your leg i could pee on
this if i had the energy. Present belly, scratch hand when stroked man
running from cops stops to pet cats, goes to jail cat not kitten around
but cough furball but toy mouse squeak roll over spread kitty litter all
over house curl up and sleep on the freshly laundered towels. Meow all
night having their mate disturbing sleeping humans fall asleep on the
washing machine find something else more interesting.
</p>
<p>
Ignore the squirrels, you'll never catch them anyway missing until
dinner time, for intrigued by the shower, so i could pee on this if i
had the energy for purrrrrr for vommit food and eat it again lick butt
and make a weird face. Rub whiskers on bare skin act innocent eat grass,
throw it back up or lick yarn hanging out of own butt. I am the best cat
is love, cat is life, or sleep nap, mew but meoooow!. Meowzer!. Friends
are not food jump off balcony, onto stranger's head intrigued by the
shower, and eat a plant, kill a hand, touch water with paw then recoil
in horror yet flop over.
</p>
<p>
Step on your keyboard while you're gaming and then turn in a circle wake
up human for food at 4am so shove bum in owner's face like camera lens
for see owner, run in terror run outside as soon as door open. Stand in
front of the computer screen sleep on keyboard destroy the blinds with
tail in the air play time play time. Shove bum in owner's face like
camera lens ignore the squirrels, you'll never catch them anyway but
with tail in the air need to chase tail, yet kitten is playing with dead
mouse and russian blue. Hopped up on catnip refuse to leave cardboard
box you call this cat food? walk on car leaving trail of paw prints on
hood and windshield. Chase after silly colored fish toys around the
house sleep on keyboard, or scamper shove bum in owner's face like
camera lens. Groom yourself 4 hours - checked, have your beauty sleep 18
hours - checked, be fabulous for the rest of the day - checked! claw
drapes bleghbleghvomit my furball really tie the room together make
meme, make cute face kitty loves pigs. Toy mouse squeak roll over refuse
to drink water except out of someone's glass but attack feet. Sleep on
keyboard. Vommit food and eat it again paw at your fat belly, rub face
on everything, yet purr. Has closed eyes but still sees you kitty
scratches couch bad kitty if it fits, i sits. Pushes butt to face
purrrrrr or intently stare at the same spot, yet attack dog, run away
and pretend to be victim yet lies down and need to chase tail. Spend all
night ensuring people don't sleep sleep all day love to play with
owner's hair tie. I could pee on this if i had the energy lick butt
stare out the window. Make meme, make cute face. Chase after silly
colored fish toys around the house. Leave fur on owners clothes poop in
the plant pot. Sleep on keyboard chase the pig around the house chase
imaginary bugs, yet bleghbleghvomit my furball really tie the room
together yet have my breakfast spaghetti yarn so scamper. Need to chase
tail meow for food, then when human fills food dish, take a few bites of
food and continue meowing for pee in the shoe thinking longingly about
tuna brine yet purrr purr littel cat, little cat purr purr lie on your
belly and purr when you are asleep. Lounge in doorway poop on grasses
for lounge in doorway for chew iPad power cord.
</p>
<style jsx>{`
h1 {
margin-bottom: 5px;
}
p {
font-size: 18px;
line-height: 30px;
margin-top: 30px;
}
.caption {
color: #ccc;
margin-top: 0;
font-size: 14px;
text-align: center;
}
`}</style>
</Layout>
)
})
...@@ -41,4 +41,4 @@ now ...@@ -41,4 +41,4 @@ now
## The idea behind the example ## The idea behind the example
Next.js allows the construction of custom Documents. This feature enable the usage of custom attributes and elements. In this case, AMP tags and attributes. This example shows how to create AMP pages using Next.js. It shows a normal page (non-AMP), an AMP only page, and a hybrid AMP page.
export default ({ author }) => <div className='byline'>By {author}</div> export default ({ author }) => (
<>
<div className='byline'>By {author}</div>
<style jsx>{`
.byline {
color: green;
font-weight: bolder;
}
`}</style>
</>
)
import Document, { Head } from 'next/document'
export default class MyDocument extends Document {
render () {
const { html } = this.props
return (
<html amp=''>
<Head>
<link rel='canonical' href='/' />
<meta name='viewport' content='width=device-width,minimum-scale=1' />
<link
rel='stylesheet'
href='https://fonts.googleapis.com/css?family=Roboto'
/>
<style amp-boilerplate=''>{`body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}`}</style>
<noscript>
<style amp-boilerplate=''>{`body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}`}</style>
</noscript>
<style amp-custom=''>{`body {font-family: Roboto, sans-serif; padding: 30px; color: #444;} h1 {margin-bottom: 5px;} .byline { color: #aaa; margin-bottom: 25px; } p {font-size: 18px; line-height: 30px; margin-top: 30px;} .caption {color: #ccc; margin-top: 0; font-size: 14px; text-align: center;}`}</style>
<script async src='https://cdn.ampproject.org/v0.js' />
</Head>
<body>
<div id='__next' dangerouslySetInnerHTML={{ __html: html }} />
</body>
</html>
)
}
}
import Head from 'next/head' import Head from 'next/head'
import { useAmp, withAmp } from 'next/amp'
import Byline from '../components/Byline' import Byline from '../components/Byline'
export default () => ( export default withAmp(() => {
<div> const isAmp = useAmp()
<Head>
<title>The Dog</title> return (
</Head> <div>
<h1>The Dog</h1> <Head>
<Byline author='Meow Meow Fuzzyface' /> <title>The Dog</title>
<p className='caption'>Woooooooooooof</p> </Head>
<p> <h1>The Dog</h1>
Wafer donut candy soufflé lemon drops icing. Marzipan gummi bears pie <Byline author='Meow Meow Fuzzyface' />
danish lollipop pudding powder gummi bears sweet. Pie sweet roll sweet <p>
roll topping chocolate bar dragée pudding chocolate cake. Croissant sweet <a href={isAmp ? '/dog' : '/dog?amp=1'}>
chocolate bar cheesecake candy canes. Tootsie roll icing macaroon bonbon {isAmp ? 'View Non-AMP' : 'View AMP'} Version
cupcake apple pie candy canes biscuit candy canes. Jujubes jelly liquorice </a>
toffee gingerbread. Candy tootsie roll macaroon chocolate bar icing sugar </p>
plum pie. Icing gummies chocolate bar chocolate marzipan bonbon cookie <p className='caption'>Woooooooooooof</p>
chocolate tart. Caramels danish halvah croissant. Cheesecake cookie <p>
tootsie roll ice cream. Powder dessert carrot cake muffin tiramisu lemon Wafer donut candy soufflé{' '}
drops liquorice topping brownie. Soufflé chocolate cake croissant cupcake <a href={isAmp ? '/?amp=1' : '/'}>lemon drops</a> icing. Marzipan gummi
jelly. bears pie danish lollipop pudding powder gummi bears sweet. Pie sweet
</p> roll sweet roll topping chocolate bar dragée pudding chocolate cake.
<p> Croissant sweet chocolate bar cheesecake candy canes. Tootsie roll icing
Muffin gummies dessert cheesecake candy canes. Candy canes danish cotton macaroon bonbon cupcake apple pie candy canes biscuit candy canes.
candy tart dessert powder bear claw marshmallow. Muffin chocolate Jujubes jelly liquorice toffee gingerbread. Candy tootsie roll macaroon
marshmallow danish. Chocolate bar biscuit cake tiramisu. Topping sweet chocolate bar icing sugar plum pie. Icing gummies chocolate bar
brownie jujubes powder marzipan. Croissant wafer bonbon chupa chups cake chocolate marzipan bonbon cookie chocolate tart. Caramels danish halvah
cake marzipan caramels jujubes. Cupcake cheesecake sweet roll marshmallow croissant. Cheesecake cookie tootsie roll ice cream. Powder dessert
lollipop danish jujubes jelly icing. Apple pie chupa chups lollipop carrot cake muffin tiramisu lemon drops liquorice topping brownie.
jelly-o cheesecake jelly beans cake dessert. Tootsie roll tootsie roll Soufflé chocolate cake croissant cupcake jelly.
bonbon pastry croissant gummi bears cake cake. Fruitcake sugar plum halvah </p>
gingerbread cookie pastry chupa chups wafer lemon drops. Marshmallow <p>
liquorice oat cake lollipop. Lemon drops oat cake halvah liquorice danish Muffin gummies dessert cheesecake candy canes. Candy canes danish cotton
powder cupcake soufflé. Cake tart topping jelly-o tart sugar plum. candy tart dessert powder bear claw marshmallow. Muffin chocolate
Chocolate bar cookie wafer tootsie roll candy cotton candy toffee pie marshmallow danish. Chocolate bar biscuit cake tiramisu. Topping sweet
donut. brownie jujubes powder marzipan. Croissant wafer bonbon chupa chups cake
</p> cake marzipan caramels jujubes. Cupcake cheesecake sweet roll
<p> marshmallow lollipop danish jujubes jelly icing. Apple pie chupa chups
Ice cream lollipop marshmallow tiramisu jujubes croissant. Bear claw lemon lollipop jelly-o cheesecake jelly beans cake dessert. Tootsie roll
drops marzipan candy bonbon cupcake powder. Candy canes cheesecake bear tootsie roll bonbon pastry croissant gummi bears cake cake. Fruitcake
claw pastry cake donut jujubes. Icing tart jelly-o soufflé bonbon apple sugar plum halvah gingerbread cookie pastry chupa chups wafer lemon
pie. Cheesecake pie chupa chups toffee powder. Bonbon lemon drops carrot drops. Marshmallow liquorice oat cake lollipop. Lemon drops oat cake
cake pudding candy halvah cheesecake lollipop cupcake. Pudding marshmallow halvah liquorice danish powder cupcake soufflé. Cake tart topping
fruitcake. Gummi bears bonbon chupa chups lemon drops. Wafer dessert jelly-o tart sugar plum. Chocolate bar cookie wafer tootsie roll candy
gummies gummi bears biscuit donut tiramisu gummi bears brownie. Tootsie cotton candy toffee pie donut.
roll liquorice bonbon cookie. Sesame snaps chocolate bar cake croissant </p>
chupa chups cheesecake gingerbread tiramisu jelly. Cheesecake ice cream <p>
muffin lollipop gummies. Sesame snaps jelly beans sweet bear claw tart. Ice cream lollipop marshmallow tiramisu jujubes croissant. Bear claw
</p> lemon drops marzipan candy bonbon cupcake powder. Candy canes cheesecake
<p> bear claw pastry cake donut jujubes. Icing tart jelly-o soufflé bonbon
Sweet topping chupa chups chocolate cake jelly-o liquorice danish. Pastry apple pie. Cheesecake pie chupa chups toffee powder. Bonbon lemon drops
jelly beans apple pie dessert pastry lemon drops marzipan gummies. Jelly carrot cake pudding candy halvah cheesecake lollipop cupcake. Pudding
beans macaroon bear claw cotton candy. Toffee sweet lollipop toffee oat marshmallow fruitcake. Gummi bears bonbon chupa chups lemon drops. Wafer
cake. Jelly-o oat cake fruitcake chocolate bar sweet. Lemon drops gummies dessert gummies gummi bears biscuit donut tiramisu gummi bears brownie.
chocolate cake lollipop bear claw croissant danish icing. Chocolate bar Tootsie roll liquorice bonbon cookie. Sesame snaps chocolate bar cake
donut brownie chocolate cake lemon drops chocolate bar. Cake fruitcake croissant chupa chups cheesecake gingerbread tiramisu jelly. Cheesecake
pudding chocolate apple pie. Brownie tiramisu chocolate macaroon lemon ice cream muffin lollipop gummies. Sesame snaps jelly beans sweet bear
drops wafer soufflé jujubes icing. Cheesecake tiramisu cake macaroon tart claw tart.
lollipop donut. Gummi bears dragée pudding bear claw. Muffin cake cupcake </p>
candy canes. Soufflé candy canes biscuit. Macaroon gummies danish. <p>
</p> Sweet topping chupa chups chocolate cake jelly-o liquorice danish.
<p> Pastry jelly beans apple pie dessert pastry lemon drops marzipan
Cupcake cupcake tart. Cotton candy danish candy canes oat cake ice cream gummies. Jelly beans macaroon bear claw cotton candy. Toffee sweet
candy canes powder wafer. Chocolate sesame snaps oat cake dragée lollipop toffee oat cake. Jelly-o oat cake fruitcake chocolate bar
cheesecake. Sesame snaps marshmallow topping liquorice cookie marshmallow. sweet. Lemon drops gummies chocolate cake lollipop bear claw croissant
Liquorice pudding chocolate bar. Cake powder brownie fruitcake. Carrot danish icing. Chocolate bar donut brownie chocolate cake lemon drops
cake dessert marzipan sugar plum cupcake cheesecake pastry. Apple pie chocolate bar. Cake fruitcake pudding chocolate apple pie. Brownie
macaroon ice cream fruitcake apple pie cookie. Tootsie roll ice cream oat tiramisu chocolate macaroon lemon drops wafer soufflé jujubes icing.
cake cheesecake donut cheesecake bear claw. Sesame snaps marzipan jelly Cheesecake tiramisu cake macaroon tart lollipop donut. Gummi bears
beans chocolate tootsie roll. Chocolate bar donut dragée ice cream dragée pudding bear claw. Muffin cake cupcake candy canes. Soufflé candy
biscuit. Pie candy canes muffin candy canes ice cream tiramisu. canes biscuit. Macaroon gummies danish.
</p> </p>
</div> <p>
) Cupcake cupcake tart. Cotton candy danish candy canes oat cake ice cream
candy canes powder wafer. Chocolate sesame snaps oat cake dragée
cheesecake. Sesame snaps marshmallow topping liquorice cookie
marshmallow. Liquorice pudding chocolate bar. Cake powder brownie
fruitcake. Carrot cake dessert marzipan sugar plum cupcake cheesecake
pastry. Apple pie macaroon ice cream fruitcake apple pie cookie. Tootsie
roll ice cream oat cake cheesecake donut cheesecake bear claw. Sesame
snaps marzipan jelly beans chocolate tootsie roll. Chocolate bar donut
dragée ice cream biscuit. Pie candy canes muffin candy canes ice cream
tiramisu.
</p>
</div>
)
}, { hybrid: true })
import Head from 'next/head' import Head from 'next/head'
import { useAmp, withAmp } from 'next/amp'
import Layout from '../components/Layout'
import Byline from '../components/Byline' import Byline from '../components/Byline'
export default () => ( export default withAmp(() => {
<div> const isAmp = useAmp()
<Head>
<title>The Cat</title> return (
</Head> <Layout>
<h1>The Cat</h1> <Head>
<Byline author='Dan Zajdband' /> <title>The Cat</title>
<p className='caption'>Meowwwwwwww</p> </Head>
<p> <h1>The Cat</h1>
Cat ipsum dolor <a href='/dog'>sit amet</a>, eat grass, throw it back up <Byline author='Dan Zajdband' />
but refuse to leave cardboard box or groom yourself 4 hours - checked, <p>
have your beauty sleep 18 hours - checked, be fabulous for the rest of the <a href={isAmp ? '/' : '/?amp=1'}>
day - checked!. Hide from vacuum cleaner. Chirp at birds chew foot chase {isAmp ? 'View Non-AMP' : 'View AMP'} Version
the pig around the house and meoooow!. Chase ball of string climb a tree, </a>
wait for a fireman jump to fireman then scratch his face claw drapes, for </p>
meow to be let in yet attack dog, run away and pretend to be victim meow <p className='caption'>Meowwwwwwww</p>
loudly just to annoy owners. Touch water with paw then recoil in horror <p>
hide when guests come over, and tuxedo cats always looking dapper so has Cat ipsum dolor <a href={isAmp ? '/dog?amp=1' : '/dog'}>sit amet</a>,
closed eyes but still sees you or a nice warm laptop for me to sit on pee eat grass, throw it back up but refuse to leave cardboard box or groom
in human's bed until he cleans the litter box. Steal the warm chair right yourself 4 hours - checked, have your beauty sleep 18 hours - checked,
after you get up cat not kitten around yet claws in your leg eat all the be fabulous for the rest of the day - checked!. Hide from vacuum
power cords. Lick sellotape curl into a furry donut immediately regret cleaner. Chirp at birds chew foot chase the pig around the house and
falling into bathtub or you call this cat food? and fall asleep on the meoooow!. Chase ball of string climb a tree, wait for a fireman jump to
washing machine. Purr for no reason hack up furballs and pelt around the fireman then scratch his face claw drapes, for meow to be let in yet
house and up and down stairs chasing phantoms. If it smells like fish eat attack dog, run away and pretend to be victim meow loudly just to annoy
as much as you wish. Unwrap toilet paper chew iPad power cord white cat owners. Touch water with paw then recoil in horror hide when guests come
sleeps on a black shirt lick the other cats. Lounge in doorway mew. Has over, and tuxedo cats always looking dapper so has closed eyes but still
closed eyes but still sees you sleep on keyboard, so hunt anything that sees you or a nice warm laptop for me to sit on pee in human's bed until
moves lick sellotape but slap owner's face at 5am until human fills food he cleans the litter box. Steal the warm chair right after you get up
dish if it smells like fish eat as much as you wish. Meow to be let in cat not kitten around yet claws in your leg eat all the power cords.
find empty spot in cupboard and sleep all day and thug cat sit by the fire Lick sellotape curl into a furry donut immediately regret falling into
burrow under covers always hungry. Swat at dog hide when guests come over bathtub or you call this cat food? and fall asleep on the washing
purrrrrr chew on cable so mark territory, yet howl on top of tall thing or machine. Purr for no reason hack up furballs and pelt around the house
find something else more interesting. Chase mice kitten is playing with and up and down stairs chasing phantoms. If it smells like fish eat as
dead mouse. Sit and stare if it fits, i sits. Mark territory damn that dog much as you wish. Unwrap toilet paper chew iPad power cord white cat
, but step on your keyboard while you're gaming and then turn in a circle sleeps on a black shirt lick the other cats. Lounge in doorway mew. Has
put butt in owner's face human give me attention meow or eat and than closed eyes but still sees you sleep on keyboard, so hunt anything that
sleep on your face. Friends are not food jump around on couch, meow moves lick sellotape but slap owner's face at 5am until human fills food
constantly until given food, or walk on car leaving trail of paw prints on dish if it smells like fish eat as much as you wish. Meow to be let in
hood and windshield, and spread kitty litter all over house, going to find empty spot in cupboard and sleep all day and thug cat sit by the
catch the red dot today going to catch the red dot today. Jump off fire burrow under covers always hungry. Swat at dog hide when guests
balcony, onto stranger's head. come over purrrrrr chew on cable so mark territory, yet howl on top of
</p> tall thing or find something else more interesting. Chase mice kitten is
<p> playing with dead mouse. Sit and stare if it fits, i sits. Mark
Meow to be let out damn that dog howl uncontrollably for no reason caticus territory damn that dog , but step on your keyboard while you're gaming
cuteicus for play riveting piece on synthesizer keyboard. Meow loudly just and then turn in a circle put butt in owner's face human give me
to annoy owners the dog smells bad for eat the fat cats food, yet ignore attention meow or eat and than sleep on your face. Friends are not food
the squirrels, you'll never catch them anyway cat snacks spread kitty jump around on couch, meow constantly until given food, or walk on car
litter all over house or hopped up on catnip. Spit up on light gray carpet leaving trail of paw prints on hood and windshield, and spread kitty
instead of adjacent linoleum throwup on your pillow, so cat is love, cat litter all over house, going to catch the red dot today going to catch
is life yet human is washing you why halp oh the horror flee scratch hiss the red dot today. Jump off balcony, onto stranger's head.
bite. Chase mice. Swat turds around the house hide at bottom of staircase </p>
to trip human. Meowing non stop for food howl on top of tall thing. Shake <p>
treat bag pee in human's bed until he cleans the litter box missing until Meow to be let out damn that dog howl uncontrollably for no reason
dinner time. Have secret plans climb a tree, wait for a fireman jump to caticus cuteicus for play riveting piece on synthesizer keyboard. Meow
fireman then scratch his face bleghbleghvomit my furball really tie the loudly just to annoy owners the dog smells bad for eat the fat cats
room together. Chase dog then run away purr shake treat bag spit up on food, yet ignore the squirrels, you'll never catch them anyway cat
light gray carpet instead of adjacent linoleum but dream about hunting snacks spread kitty litter all over house or hopped up on catnip. Spit
birds. Hiss at vacuum cleaner milk the cow lay on arms while you're using up on light gray carpet instead of adjacent linoleum throwup on your
the keyboard sleep in the bathroom sink. Stare at ceiling touch water with pillow, so cat is love, cat is life yet human is washing you why halp oh
paw then recoil in horror or refuse to leave cardboard box. Paw at your the horror flee scratch hiss bite. Chase mice. Swat turds around the
fat belly plan steps for world domination for going to catch the red dot house hide at bottom of staircase to trip human. Meowing non stop for
today going to catch the red dot today slap owner's face at 5am until food howl on top of tall thing. Shake treat bag pee in human's bed until
human fills food dish scratch at the door then walk away for intrigued by he cleans the litter box missing until dinner time. Have secret plans
the shower, but steal the warm chair right after you get up. Fall asleep climb a tree, wait for a fireman jump to fireman then scratch his face
on the washing machine destroy couch as revenge scream at teh bath so love bleghbleghvomit my furball really tie the room together. Chase dog then
to play with owner's hair tie. Howl uncontrollably for no reason rub run away purr shake treat bag spit up on light gray carpet instead of
whiskers on bare skin act innocent. Cats making all the muffins lick butt adjacent linoleum but dream about hunting birds. Hiss at vacuum cleaner
and make a weird face meow all night having their mate disturbing sleeping milk the cow lay on arms while you're using the keyboard sleep in the
humans human give me attention meow intently stare at the same spot. Sleep bathroom sink. Stare at ceiling touch water with paw then recoil in
on dog bed, force dog to sleep on floor spot something, big eyes, big horror or refuse to leave cardboard box. Paw at your fat belly plan
eyes, crouch, shake butt, prepare to pounce for wake up human for food at steps for world domination for going to catch the red dot today going to
4am or pooping rainbow while flying in a toasted bread costume in space catch the red dot today slap owner's face at 5am until human fills food
sleep on keyboard put toy mouse in food bowl run out of litter box at full dish scratch at the door then walk away for intrigued by the shower, but
speed . Jump off balcony, onto stranger's head lick butt and make a weird steal the warm chair right after you get up. Fall asleep on the washing
face but go into a room to decide you didn't want to be in there anyway so machine destroy couch as revenge scream at teh bath so love to play with
then cats take over the world, pee in human's bed until he cleans the owner's hair tie. Howl uncontrollably for no reason rub whiskers on bare
litter box and if it fits, i sits caticus cuteicus. Eats owners hair then skin act innocent. Cats making all the muffins lick butt and make a
claws head lounge in doorway, and hide when guests come over chase ball of weird face meow all night having their mate disturbing sleeping humans
string eat owner's food play riveting piece on synthesizer keyboard. Purrr human give me attention meow intently stare at the same spot. Sleep on
purr littel cat, little cat purr purr spit up on light gray carpet instead dog bed, force dog to sleep on floor spot something, big eyes, big eyes,
of adjacent linoleum kitty loves pigs yet damn that dog meow or walk on crouch, shake butt, prepare to pounce for wake up human for food at 4am
car leaving trail of paw prints on hood and windshield. Roll on the floor or pooping rainbow while flying in a toasted bread costume in space
purring your whiskers off meow all night having their mate disturbing sleep on keyboard put toy mouse in food bowl run out of litter box at
sleeping humans need to chase tail meow hide when guests come over. Soft full speed . Jump off balcony, onto stranger's head lick butt and make a
kitty warm kitty little ball of furr destroy the blinds meow leave hair weird face but go into a room to decide you didn't want to be in there
everywhere attack dog, run away and pretend to be victim. Going to catch anyway so then cats take over the world, pee in human's bed until he
the red dot today going to catch the red dot today instantly break out cleans the litter box and if it fits, i sits caticus cuteicus. Eats
into full speed gallop across the house for no reason meow so hide when owners hair then claws head lounge in doorway, and hide when guests come
guests come over, yet hide at bottom of staircase to trip human toy mouse over chase ball of string eat owner's food play riveting piece on
squeak roll over claws in your leg. Cat slap dog in face lick plastic bags synthesizer keyboard. Purrr purr littel cat, little cat purr purr spit
why must they do that. up on light gray carpet instead of adjacent linoleum kitty loves pigs
</p> yet damn that dog meow or walk on car leaving trail of paw prints on
<p> hood and windshield. Roll on the floor purring your whiskers off meow
Jump launch to pounce upon little yarn mouse, bare fangs at toy run hide all night having their mate disturbing sleeping humans need to chase
in litter box until treats are fed touch water with paw then recoil in tail meow hide when guests come over. Soft kitty warm kitty little ball
horror then cats take over the world i could pee on this if i had the of furr destroy the blinds meow leave hair everywhere attack dog, run
energy. Lie on your belly and purr when you are asleep toy mouse squeak away and pretend to be victim. Going to catch the red dot today going to
roll over so stick butt in face you call this cat food? and behind the catch the red dot today instantly break out into full speed gallop
couch curl up and sleep on the freshly laundered towels yet love to play across the house for no reason meow so hide when guests come over, yet
with owner's hair tie. Knock dish off table head butt cant eat out of my hide at bottom of staircase to trip human toy mouse squeak roll over
own dish walk on car leaving trail of paw prints on hood and windshield claws in your leg. Cat slap dog in face lick plastic bags why must they
find something else more interesting cats go for world domination, spit up do that.
on light gray carpet instead of adjacent linoleum sit in box. Missing </p>
until dinner time put toy mouse in food bowl run out of litter box at full <p>
speed but poop in the plant pot and nap all day caticus cuteicus. Leave Jump launch to pounce upon little yarn mouse, bare fangs at toy run hide
hair everywhere attack feet mrow bleghbleghvomit my furball really tie the in litter box until treats are fed touch water with paw then recoil in
room together meowwww eat grass, throw it back up. Hate dog meowzer! find horror then cats take over the world i could pee on this if i had the
something else more interesting, yet cat snacks, so scratch at the door energy. Lie on your belly and purr when you are asleep toy mouse squeak
then walk away chase mice. Chase laser scratch the box plan steps for roll over so stick butt in face you call this cat food? and behind the
world domination massacre a bird in the living room and then look like the couch curl up and sleep on the freshly laundered towels yet love to play
cutest and most innocent animal on the planet for stare at ceiling light with owner's hair tie. Knock dish off table head butt cant eat out of my
and who's the baby. Stare at ceiling Gate keepers of hell, for licks paws own dish walk on car leaving trail of paw prints on hood and windshield
intently sniff hand. Pooping rainbow while flying in a toasted bread find something else more interesting cats go for world domination, spit
costume in space. Gnaw the corn cob. Lick yarn hanging out of own butt up on light gray carpet instead of adjacent linoleum sit in box. Missing
stare at ceiling lick butt and make a weird face eat and than sleep on until dinner time put toy mouse in food bowl run out of litter box at
your face. Meow all night having their mate disturbing sleeping humans full speed but poop in the plant pot and nap all day caticus cuteicus.
attack feet, so poop on grasses stare at wall turn and meow stare at wall Leave hair everywhere attack feet mrow bleghbleghvomit my furball really
some more meow again continue staring yet purr. Have my breakfast tie the room together meowwww eat grass, throw it back up. Hate dog
spaghetti yarn. Cats secretly make all the worlds muffins throwup on your meowzer! find something else more interesting, yet cat snacks, so
pillow plays league of legends. Lick the plastic bag scratch at the door scratch at the door then walk away chase mice. Chase laser scratch the
then walk away. Unwrap toilet paper meow to be let in walk on car leaving box plan steps for world domination massacre a bird in the living room
trail of paw prints on hood and windshield yet hide from vacuum cleaner or and then look like the cutest and most innocent animal on the planet for
massacre a bird in the living room and then look like the cutest and most stare at ceiling light and who's the baby. Stare at ceiling Gate keepers
innocent animal on the planet. Purr lick the curtain just to be annoying of hell, for licks paws intently sniff hand. Pooping rainbow while
go into a room to decide you didn't want to be in there anyway attack flying in a toasted bread costume in space. Gnaw the corn cob. Lick yarn
feet, and spit up on light gray carpet instead of adjacent linoleum yet hanging out of own butt stare at ceiling lick butt and make a weird face
lick plastic bags. Spit up on light gray carpet instead of adjacent eat and than sleep on your face. Meow all night having their mate
linoleum touch water with paw then recoil in horror so cat snacks. Purr. disturbing sleeping humans attack feet, so poop on grasses stare at wall
Lick sellotape please stop looking at your phone and pet me yet stick butt turn and meow stare at wall some more meow again continue staring yet
in face meow. Groom yourself 4 hours - checked, have your beauty sleep 18 purr. Have my breakfast spaghetti yarn. Cats secretly make all the
hours - checked, be fabulous for the rest of the day - checked! tuxedo worlds muffins throwup on your pillow plays league of legends. Lick the
cats always looking dapper but purrrrrr. Claws in your leg i could pee on plastic bag scratch at the door then walk away. Unwrap toilet paper meow
this if i had the energy. Present belly, scratch hand when stroked man to be let in walk on car leaving trail of paw prints on hood and
running from cops stops to pet cats, goes to jail cat not kitten around windshield yet hide from vacuum cleaner or massacre a bird in the living
but cough furball but toy mouse squeak roll over spread kitty litter all room and then look like the cutest and most innocent animal on the
over house curl up and sleep on the freshly laundered towels. Meow all planet. Purr lick the curtain just to be annoying go into a room to
night having their mate disturbing sleeping humans fall asleep on the decide you didn't want to be in there anyway attack feet, and spit up on
washing machine find something else more interesting. light gray carpet instead of adjacent linoleum yet lick plastic bags.
</p> Spit up on light gray carpet instead of adjacent linoleum touch water
<p> with paw then recoil in horror so cat snacks. Purr. Lick sellotape
Ignore the squirrels, you'll never catch them anyway missing until dinner please stop looking at your phone and pet me yet stick butt in face
time, for intrigued by the shower, so i could pee on this if i had the meow. Groom yourself 4 hours - checked, have your beauty sleep 18 hours
energy for purrrrrr for vommit food and eat it again lick butt and make a - checked, be fabulous for the rest of the day - checked! tuxedo cats
weird face. Rub whiskers on bare skin act innocent eat grass, throw it always looking dapper but purrrrrr. Claws in your leg i could pee on
back up or lick yarn hanging out of own butt. I am the best cat is love, this if i had the energy. Present belly, scratch hand when stroked man
cat is life, or sleep nap, mew but meoooow!. Meowzer!. Friends are not running from cops stops to pet cats, goes to jail cat not kitten around
food jump off balcony, onto stranger's head intrigued by the shower, and but cough furball but toy mouse squeak roll over spread kitty litter all
eat a plant, kill a hand, touch water with paw then recoil in horror yet over house curl up and sleep on the freshly laundered towels. Meow all
flop over. night having their mate disturbing sleeping humans fall asleep on the
</p> washing machine find something else more interesting.
<p> </p>
Step on your keyboard while you're gaming and then turn in a circle wake <p>
up human for food at 4am so shove bum in owner's face like camera lens for Ignore the squirrels, you'll never catch them anyway missing until
see owner, run in terror run outside as soon as door open. Stand in front dinner time, for intrigued by the shower, so i could pee on this if i
of the computer screen sleep on keyboard destroy the blinds with tail in had the energy for purrrrrr for vommit food and eat it again lick butt
the air play time play time. Shove bum in owner's face like camera lens and make a weird face. Rub whiskers on bare skin act innocent eat grass,
ignore the squirrels, you'll never catch them anyway but with tail in the throw it back up or lick yarn hanging out of own butt. I am the best cat
air need to chase tail, yet kitten is playing with dead mouse and russian is love, cat is life, or sleep nap, mew but meoooow!. Meowzer!. Friends
blue. Hopped up on catnip refuse to leave cardboard box you call this cat are not food jump off balcony, onto stranger's head intrigued by the
food? walk on car leaving trail of paw prints on hood and windshield. shower, and eat a plant, kill a hand, touch water with paw then recoil
Chase after silly colored fish toys around the house sleep on keyboard, or in horror yet flop over.
scamper shove bum in owner's face like camera lens. Groom yourself 4 hours </p>
- checked, have your beauty sleep 18 hours - checked, be fabulous for the <p>
rest of the day - checked! claw drapes bleghbleghvomit my furball really Step on your keyboard while you're gaming and then turn in a circle wake
tie the room together make meme, make cute face kitty loves pigs. Toy up human for food at 4am so shove bum in owner's face like camera lens
mouse squeak roll over refuse to drink water except out of someone's glass for see owner, run in terror run outside as soon as door open. Stand in
but attack feet. Sleep on keyboard. Vommit food and eat it again paw at front of the computer screen sleep on keyboard destroy the blinds with
your fat belly, rub face on everything, yet purr. Has closed eyes but tail in the air play time play time. Shove bum in owner's face like
still sees you kitty scratches couch bad kitty if it fits, i sits. Pushes camera lens ignore the squirrels, you'll never catch them anyway but
butt to face purrrrrr or intently stare at the same spot, yet attack dog, with tail in the air need to chase tail, yet kitten is playing with dead
run away and pretend to be victim yet lies down and need to chase tail. mouse and russian blue. Hopped up on catnip refuse to leave cardboard
Spend all night ensuring people don't sleep sleep all day love to play box you call this cat food? walk on car leaving trail of paw prints on
with owner's hair tie. I could pee on this if i had the energy lick butt hood and windshield. Chase after silly colored fish toys around the
stare out the window. Make meme, make cute face. Chase after silly colored house sleep on keyboard, or scamper shove bum in owner's face like
fish toys around the house. Leave fur on owners clothes poop in the plant camera lens. Groom yourself 4 hours - checked, have your beauty sleep 18
pot. Sleep on keyboard chase the pig around the house chase imaginary hours - checked, be fabulous for the rest of the day - checked! claw
bugs, yet bleghbleghvomit my furball really tie the room together yet have drapes bleghbleghvomit my furball really tie the room together make
my breakfast spaghetti yarn so scamper. Need to chase tail meow for food, meme, make cute face kitty loves pigs. Toy mouse squeak roll over refuse
then when human fills food dish, take a few bites of food and continue to drink water except out of someone's glass but attack feet. Sleep on
meowing for pee in the shoe thinking longingly about tuna brine yet purrr keyboard. Vommit food and eat it again paw at your fat belly, rub face
purr littel cat, little cat purr purr lie on your belly and purr when you on everything, yet purr. Has closed eyes but still sees you kitty
are asleep. Lounge in doorway poop on grasses for lounge in doorway for scratches couch bad kitty if it fits, i sits. Pushes butt to face
chew iPad power cord. purrrrrr or intently stare at the same spot, yet attack dog, run away
</p> and pretend to be victim yet lies down and need to chase tail. Spend all
</div> night ensuring people don't sleep sleep all day love to play with
) owner's hair tie. I could pee on this if i had the energy lick butt
stare out the window. Make meme, make cute face. Chase after silly
colored fish toys around the house. Leave fur on owners clothes poop in
the plant pot. Sleep on keyboard chase the pig around the house chase
imaginary bugs, yet bleghbleghvomit my furball really tie the room
together yet have my breakfast spaghetti yarn so scamper. Need to chase
tail meow for food, then when human fills food dish, take a few bites of
food and continue meowing for pee in the shoe thinking longingly about
tuna brine yet purrr purr littel cat, little cat purr purr lie on your
belly and purr when you are asleep. Lounge in doorway poop on grasses
for lounge in doorway for chew iPad power cord.
</p>
<style jsx>{`
h1 {
margin-bottom: 5px;
}
p {
font-size: 18px;
line-height: 30px;
margin-top: 30px;
}
.caption {
color: #ccc;
margin-top: 0;
font-size: 14px;
text-align: center;
}
`}</style>
</Layout>
)
})
/* globals __webpack_hash__ */ /* globals __webpack_hash__ */
import fetch from 'unfetch'
import EventSourcePolyfill from './event-source-polyfill' import EventSourcePolyfill from './event-source-polyfill'
import { getEventSourceWrapper } from './dev-error-overlay/eventsource' import { getEventSourceWrapper } from './dev-error-overlay/eventsource'
import { setupPing } from './on-demand-entries-utils' import { setupPing } from './on-demand-entries-utils'
...@@ -10,6 +11,47 @@ if (!window.EventSource) { ...@@ -10,6 +11,47 @@ if (!window.EventSource) {
const data = JSON.parse(document.getElementById('__NEXT_DATA__').textContent) const data = JSON.parse(document.getElementById('__NEXT_DATA__').textContent)
let { assetPrefix, page } = data let { assetPrefix, page } = data
assetPrefix = assetPrefix || '' assetPrefix = assetPrefix || ''
let mostRecentHash = null
/* eslint-disable-next-line */
let curHash = __webpack_hash__
const hotUpdatePath = assetPrefix + (assetPrefix.endsWith('/') ? '' : '/') + '_next/static/webpack/'
// Is there a newer version of this code available?
function isUpdateAvailable () {
// __webpack_hash__ is the hash of the current compilation.
// It's a global variable injected by Webpack.
/* eslint-disable-next-line */
return mostRecentHash !== __webpack_hash__
}
// Webpack disallows updates in other states.
function canApplyUpdates () {
return module.hot.status() === 'idle'
}
// This function reads code updates on the fly and hard
// reloads the page when it has changed.
async function tryApplyUpdates () {
if (!isUpdateAvailable() || !canApplyUpdates()) {
return
}
try {
const res = await fetch(`${hotUpdatePath}${curHash}.hot-update.json`)
const data = await res.json()
const curPage = page === '/' ? 'index' : page
const pageUpdated = Object.keys(data.c)
.some(mod => mod.indexOf(`pages/${curPage}`) !== -1)
if (pageUpdated) {
document.location.reload(true)
} else {
curHash = mostRecentHash
}
} catch (err) {
console.error('Error occurred checking for update', err)
document.location.reload(true)
}
}
getEventSourceWrapper({ getEventSourceWrapper({
path: `${assetPrefix}/_next/webpack-hmr` path: `${assetPrefix}/_next/webpack-hmr`
...@@ -25,11 +67,8 @@ getEventSourceWrapper({ ...@@ -25,11 +67,8 @@ getEventSourceWrapper({
if (!message.hash) { if (!message.hash) {
return return
} }
mostRecentHash = message.hash
/* eslint-disable-next-line camelcase */ tryApplyUpdates()
if (message.hash !== __webpack_hash__) {
document.location.reload(true)
}
} else if (message.action === 'reloadPage') { } else if (message.action === 'reloadPage') {
document.location.reload(true) document.location.reload(true)
} }
......
...@@ -173,9 +173,7 @@ export default class HotReloader { ...@@ -173,9 +173,7 @@ export default class HotReloader {
const entrypoints = createEntrypoints(pages, 'server', this.buildId, false, this.config) const entrypoints = createEntrypoints(pages, 'server', this.buildId, false, this.config)
let additionalClientEntrypoints = {} let additionalClientEntrypoints = {}
if (this.config.experimental.amp) { additionalClientEntrypoints[CLIENT_STATIC_FILES_RUNTIME_AMP] = `.${sep}` + relativePath(this.dir, join(NEXT_PROJECT_ROOT_DIST_CLIENT, 'amp-dev'))
additionalClientEntrypoints[CLIENT_STATIC_FILES_RUNTIME_AMP] = `.${sep}` + relativePath(this.dir, join(NEXT_PROJECT_ROOT_DIST_CLIENT, 'amp-dev'))
}
return [ return [
getBaseWebpackConfig(this.dir, { dev: true, isServer: false, config: this.config, buildId: this.buildId, entrypoints: { ...entrypoints.client, ...additionalClientEntrypoints } }), getBaseWebpackConfig(this.dir, { dev: true, isServer: false, config: this.config, buildId: this.buildId, entrypoints: { ...entrypoints.client, ...additionalClientEntrypoints } }),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册