Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow manually setting amphtml and canonical links #8129

Merged
merged 1 commit into from
Jul 29, 2019

Conversation

ijjk
Copy link
Member

@ijjk ijjk commented Jul 26, 2019

To allow users to incrementally implement Next.js' AMP support and also handle extra cases, this allows manually adding amphtml and canonical links in AMP mode.

Closes: #7706
Closes: #8074

@github-actions
Copy link
Contributor

Stats from current PR

Click to expand stats
zeit/next.js canary ijjk/next.js amp/allow-manual-rels Change
Build Duration 13.4s 13s -395ms
node_modules Size 45.5 MB 45.5 MB ⚠️ +379 B
Total Bundle (main, webpack, commons) Size 206 kB 206 kB
Total Bundle (main, webpack, commons) gzip Size 67.9 kB 67.9 kB
Client _app Size 2.39 kB 2.39 kB
Client _app gzip Size 1.08 kB 1.08 kB
Client _error Size 8.22 kB 8.22 kB
Client _error gzip Size 3.16 kB 3.16 kB
Client pages/index Size 343 B 343 B
Client pages/index gzip Size 246 B 246 B
Client pages/link Size 4.08 kB 4.08 kB
Client pages/link gzip Size 1.8 kB 1.8 kB
Client pages/routerDirect Size 423 B 423 B
Client pages/routerDirect gzip Size 306 B 306 B
Client pages/withRouter Size 435 B 435 B
Client pages/withRouter gzip Size 301 B 301 B
Client main Size 20 kB 20 kB
Client main gzip Size 6.86 kB 6.86 kB
Client commons Size 184 kB 184 kB
Client commons gzip Size 59.7 kB 59.7 kB
Client webpack Size 1.49 kB 1.49 kB
Client webpack gzip Size 770 B 770 B
Base Rendered Size 1.35 kB 1.35 kB
Build Dir Size 704 kB 704 kB ⚠️ +382 B
Click to expand serverless stats
zeit/next.js canary ijjk/next.js amp/allow-manual-rels Change
Build Duration 14.5s 14.9s ⚠️ +342ms
node_modules Size 45.5 MB 45.5 MB ⚠️ +379 B
Total Bundle (main, webpack, commons) Size 206 kB 206 kB
Total Bundle (main, webpack, commons) gzip Size 67.9 kB 67.9 kB
Client _app Size 2.39 kB 2.39 kB
Client _app gzip Size 1.08 kB 1.08 kB
Client _error Size 8.22 kB 8.22 kB
Client _error gzip Size 3.16 kB 3.16 kB
Client pages/index Size 343 B 343 B
Client pages/index gzip Size 246 B 246 B
Client pages/link Size 4.08 kB 4.08 kB
Client pages/link gzip Size 1.8 kB 1.8 kB
Client pages/routerDirect Size 423 B 423 B
Client pages/routerDirect gzip Size 306 B 306 B
Client pages/withRouter Size 435 B 435 B
Client pages/withRouter gzip Size 301 B 301 B
Client main Size 20 kB 20 kB
Client main gzip Size 6.86 kB 6.86 kB
Client commons Size 184 kB 184 kB
Client commons gzip Size 59.7 kB 59.7 kB
Client webpack Size 1.49 kB 1.49 kB
Client webpack gzip Size 770 B 770 B
Serverless pages/link Size 252 kB 252 kB ⚠️ +190 B
Serverless pages/link gzip Size 67.9 kB 67.9 kB ⚠️ +42 B
Serverless pages/index Size 245 kB 245 kB ⚠️ +190 B
Serverless pages/index gzip Size 65.7 kB 65.8 kB ⚠️ +39 B
Serverless pages/_error Size 244 kB 244 kB ⚠️ +190 B
Serverless pages/_error gzip Size 65.5 kB 65.5 kB ⚠️ +40 B
Serverless pages/routerDirect Size 245 kB 245 kB ⚠️ +190 B
Serverless pages/routerDirect gzip Size 65.7 kB 65.7 kB ⚠️ +39 B
Serverless pages/withRouter Size 245 kB 245 kB ⚠️ +190 B
Serverless pages/withRouter gzip Size 65.8 kB 65.9 kB ⚠️ +40 B
Build Dir Size 1.89 MB 1.89 MB ⚠️ +1.14 kB

Copy link
Member

@timneutkens timneutkens left a comment

Choose a reason for hiding this comment

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

This looks fine, what do you think @sebastianbenz?

Copy link
Contributor

@sebastianbenz sebastianbenz left a comment

Choose a reason for hiding this comment

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

👍 That totally makes sense. It's common for AMP pages to be served from a different sub-domain.

@timneutkens timneutkens merged commit 4bcf6aa into vercel:canary Jul 29, 2019
@ijjk ijjk deleted the amp/allow-manual-rels branch July 29, 2019 15:53
@vercel vercel locked as resolved and limited conversation to collaborators Feb 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AMP pages include the query string in the canonical URL AMP - Override Canonical
3 participants