All language subtitles for 033 Using Fallback Pages & Re-deploying_en

af Afrikaans
ak Akan
sq Albanian
am Amharic
ar Arabic
hy Armenian
az Azerbaijani
eu Basque
be Belarusian
bem Bemba
bn Bengali
bh Bihari
bs Bosnian
br Breton
bg Bulgarian
km Cambodian
ca Catalan
ceb Cebuano
chr Cherokee
ny Chichewa
zh-CN Chinese (Simplified)
zh-TW Chinese (Traditional)
co Corsican
hr Croatian
cs Czech
da Danish
nl Dutch
en English
eo Esperanto
et Estonian
ee Ewe
fo Faroese
tl Filipino
fi Finnish
fr French
fy Frisian
gaa Ga
gl Galician
ka Georgian
de German
el Greek
gn Guarani
gu Gujarati
ht Haitian Creole
ha Hausa
haw Hawaiian
iw Hebrew
hi Hindi
hmn Hmong
hu Hungarian
is Icelandic
ig Igbo
id Indonesian
ia Interlingua
ga Irish
it Italian
ja Japanese
jw Javanese
kn Kannada
kk Kazakh
rw Kinyarwanda
rn Kirundi
kg Kongo
ko Korean
kri Krio (Sierra Leone)
ku Kurdish
ckb Kurdish (Soranรฎ)
ky Kyrgyz
lo Laothian
la Latin
lv Latvian
ln Lingala
lt Lithuanian
loz Lozi
lg Luganda
ach Luo
lb Luxembourgish
mk Macedonian
mg Malagasy
ms Malay
ml Malayalam
mt Maltese
mi Maori
mr Marathi
mfe Mauritian Creole
mo Moldavian
mn Mongolian
my Myanmar (Burmese)
sr-ME Montenegrin
ne Nepali
pcm Nigerian Pidgin
nso Northern Sotho
no Norwegian
nn Norwegian (Nynorsk)
oc Occitan
or Oriya
om Oromo
ps Pashto
pl Polish
pt-BR Portuguese (Brazil)
pt Portuguese (Portugal)
pa Punjabi
qu Quechua
ro Romanian
rm Romansh
nyn Runyakitara
ru Russian
sm Samoan
gd Scots Gaelic
sr Serbian
sh Serbo-Croatian
st Sesotho
tn Setswana
crs Seychellois Creole
sn Shona
sd Sindhi
si Sinhalese
sk Slovak
sl Slovenian
so Somali
es Spanish
es-419 Spanish (Latin American)
su Sundanese
sw Swahili
sv Swedish
tg Tajik
ta Tamil
tt Tatar
te Telugu
th Thai
ti Tigrinya
to Tonga
lua Tshiluba
tum Tumbuka
tr Turkish
tk Turkmen
tw Twi
ug Uighur
uk Ukrainian
ur Urdu
uz Uzbek
vi Vietnamese
cy Welsh
wo Wolof
xh Xhosa
yi Yiddish
yo Yoruba
zu Zulu

Original subtitles

The problem here is that,

on the single meetup page,

we do specify which meetup pages should be pre-generated,

and we only set this at build time and never thereafter.

And since we set fallback to false,

we also ensure that any requests to meetups,

for which no page was pre-generated before,

will fail.

Now that worked as long as we didn't add a new meetup,

and it worked during development,

because there the getStaticPaths function ran

for every incoming request,

but it now fails after deployment.

Now fixing it is quite simple though, thankfully.

We can set fallback to true, or even better, to 'blocking'.

When you set fallback to true or to blocking,

you're telling NextJS that the list of paths

which you're specifying here, might not be exhaustive,

there might be more valid pages.

And, therefore, when fallback is set to true or to blocking,

NextJS will not respond with a 404 page

if it can't find the page immediately.

Instead with fallback set to true or blocking,

it will then generate that page on demand,

and thereafter cache it,

so it will pre-generate it when needed.

Now the difference between true and blocking then is that,

with true, it would immediately return an empty page,

and then pull down the dynamically generated content

once that's done.

So you need to handle that case

that the page does not have the data yet.

With blocking, the user will not see anything until

the page was pre-generated,

and the finished page will be served.

And that's the approach I will use here,

since it doesn't require any other extra work from our side.

So if we change fallback to blocking,

we'll not face this problem anymore.

Now we just need to redeploy this.

And for this, all we have to do is create

a new code snapshot with git add,

and then with git commit,

where we say, "fixed fallback", or something like this,

and then simply push our branch again,

push our repository back onto GitHub.

And the great thing is that NextJS will actually watch

this main branch to which we pushed,

and whenever it detects a change there,

it will automatically start building and redeploying.

As you can see here, it's building already again.

So that's very convenient.

If you want to update your page and redeploy,

all you have to do is create a new commit and push it

to your connected GitHub repository,

and that will then automatically trigger a redeployment.

And whilst it's redeploying,

your old page will stay up and running.

But once it's done, the new page will take over,

and hence, now this meetup exists here.

And if we add another meetup here

with this image, and our test address, and some test text.

If we do this, now our change should also be in effect.

And if we now reload the starting page

a couple of times to revalidate it,

if we now visit this meetup,

it's created on the fly and does all the works.

And that is also something, which I wanted to show you,

especially combined with that redeployment feature,

which is also something you should know.

Now, there is, of course, more you can do.

You can connect a custom domain here,

and you can also configure more in your project.

There are more features, which you can add as well,

but I mentioned this before already.

There are simply more things, which you could add.

This tutorial, however, had the goal of giving you

an overview of the most important features and,

therefore, we're now finished with that.

Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.