question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Format <head> correctly

See original GitHub issue

This mostly means generating a ton of icons, and being smart about it. But from the looks of it we can do this from 3 required resources:

  • icon-512x512.png for manifest.json
  • safari-icon.svg for safari-pinned-tab (needs to be black/white square, see this tutorial)
  • a twitter / fb card in .png with dimensions of1500x1120

In addition we’ll need the following values:

  • title - used to describe the page in the browser’s tabs
  • description - used to describe what the page is, in long form; used by search engines and the like. Can be derived from manifest.json
  • themeColor - used to change the color of the header on mobile. Can be derived from manifest.json
  • twitterName - name of the organization on twitter. Useful for shares.
  • mainUrl - the homepage for the site

Reference

<head>
  <link rel="preload" href="/bundle.js" as="script">
  <link rel="preload" as="style" href="/bundle.css" onload="this.rel='stylesheet'">
  <link rel="preload" as="font" href="/assets/font_gt_america_mono.woff "crossorigin="crossorigin">
  <link rel="manifest" href="/manifest.json">

  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">

  <meta name="description" content=${description}>
  <meta name="theme-color" content="${themeColor}">
  <title>${title}</title>

  <meta name="twitter:card" content="summary_large_image">
  <meta name="twitter:site" content="@${twitterName}">
  <meta name="twitter:image" content="/assets/card-1500x1120.png">

  <meta name="og:title" content="${name}">
  <meta name="og:url" content="${mainUrl}">
  <meta name="og:description" content="${mainUrl}">
  <meta name="og:image" content="/assets/card-1500x1120.png">

  <link rel="apple-touch-icon" sizes="57x57" href="/assets/apple-touch-icon-57x57.png">
  <link rel="apple-touch-icon" sizes="60x60" href="/assets/apple-touch-icon-60x60.png">
  <link rel="apple-touch-icon" sizes="72x72" href="/assets/apple-touch-icon-72x72.png">
  <link rel="apple-touch-icon" sizes="76x76" href="/assets/apple-touch-icon-76x76.png">
  <link rel="apple-touch-icon" sizes="114x114" href="/assets/apple-touch-icon-114x114.png">
  <link rel="apple-touch-icon" sizes="120x120" href="/assets/apple-touch-icon-120x120.png">
  <link rel="apple-touch-icon" sizes="144x144" href="/assets/apple-touch-icon-144x144.png">
  <link rel="apple-touch-icon" sizes="152x152" href="/assets/apple-touch-icon-152x152.png">
  <link rel="apple-touch-icon" sizes="180x180" href="/assets/apple-touch-icon-180x180.png">
  <link rel="icon" type="image/png" href="/assets/favicon-16x16.png" sizes="16x16">
  <link rel="icon" type="image/png" href="/assets/favicon-32x32.png" sizes="32x32">
  <link rel="icon" type="image/png" href="/assets/favicon-96x96.png" sizes="96x96">
  <link rel="icon" type="image/png" href="/assets/favicon-192x192.png" sizes="192x192">
  <link rel="shortcut icon" href="/assets/favicon.ico">

  <style>.critical-css {}</style>
</head>

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:13 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
yoshuawuytscommented, Aug 11, 2017

Ohh, another cool one is <link> dns-prefetching; allows warming up the cache for external requests. String matching on a JS bundle should get us a longgg wayyyy C:

1reaction
yoshuawuytscommented, Aug 11, 2017

@YerkoPalma woah, thanks for sharing! - that link is both super useful, and mad daunting. There’s so much stuff ;_;

Read more comments on GitHub >

github_iconTop Results From Across the Web

Running heads - APA Style 6th Edition Blog
The page header should now be correctly formatted for APA Style on all pages of your paper. You can also see examples of...
Read more >
Page header - APA Style - American Psychological Association
Type the running head in all-capital letters. Ensure the running head is no more than 50 characters, including spaces and punctuation. Avoid using...
Read more >
APA Running Head | Example + Instructions for Word & Docs
An APA running head can be up to 50 characters and is written in all capital letters. It appears in the header of...
Read more >
How to Create a Running Head (APA)
6) Type “Running head: TITLE IN CAPS” and click the Tab key twice. 7) Click “Close Header and Footer”. 8) Go to the...
Read more >
General Format - Purdue OWL
To create a page header/running head, insert page numbers flush right. Then type "TITLE OF YOUR PAPER" in the header flush left using...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found