Lighthouse Audits and Meta Tags

9 minutes
Share the link to this page
Copied
  Completed
You need to have access to the item to view this lesson.
One-time Fee
$99.99
List Price:  $139.99
You save:  $40
€95.85
List Price:  €134.19
You save:  €38.34
£79.54
List Price:  £111.35
You save:  £31.81
CA$143.73
List Price:  CA$201.23
You save:  CA$57.50
A$159.93
List Price:  A$223.91
You save:  A$63.97
S$135.54
List Price:  S$189.77
You save:  S$54.22
HK$777.83
List Price:  HK$1,089
You save:  HK$311.16
CHF 89.34
List Price:  CHF 125.09
You save:  CHF 35.74
NOK kr1,131.88
List Price:  NOK kr1,584.68
You save:  NOK kr452.80
DKK kr715.08
List Price:  DKK kr1,001.15
You save:  DKK kr286.06
NZ$176.75
List Price:  NZ$247.46
You save:  NZ$70.70
د.إ367.26
List Price:  د.إ514.18
You save:  د.إ146.92
৳11,945.33
List Price:  ৳16,723.94
You save:  ৳4,778.61
₹8,493.77
List Price:  ₹11,891.62
You save:  ₹3,397.85
RM450.75
List Price:  RM631.07
You save:  RM180.32
₦154,938.50
List Price:  ₦216,920.10
You save:  ₦61,981.60
₨27,824.38
List Price:  ₨38,955.25
You save:  ₨11,130.86
฿3,419.79
List Price:  ฿4,787.84
You save:  ฿1,368.05
₺3,519.01
List Price:  ₺4,926.76
You save:  ₺1,407.74
B$608.53
List Price:  B$851.97
You save:  B$243.44
R1,830.80
List Price:  R2,563.19
You save:  R732.39
Лв187.32
List Price:  Лв262.25
You save:  Лв74.93
₩144,627.53
List Price:  ₩202,484.33
You save:  ₩57,856.80
₪365.39
List Price:  ₪511.57
You save:  ₪146.17
₱5,882.91
List Price:  ₱8,236.31
You save:  ₱2,353.40
¥15,643.93
List Price:  ¥21,902.13
You save:  ¥6,258.20
MX$2,007.58
List Price:  MX$2,810.70
You save:  MX$803.11
QR364.41
List Price:  QR510.19
You save:  QR145.78
P1,381.63
List Price:  P1,934.33
You save:  P552.70
KSh12,923.70
List Price:  KSh18,093.70
You save:  KSh5,170
E£5,087.81
List Price:  E£7,123.14
You save:  E£2,035.32
ብር12,764.56
List Price:  ብር17,870.89
You save:  ብር5,106.33
Kz91,790.82
List Price:  Kz128,510.82
You save:  Kz36,720
CLP$98,905.10
List Price:  CLP$138,471.10
You save:  CLP$39,566
CN¥729.56
List Price:  CN¥1,021.42
You save:  CN¥291.85
RD$6,087.13
List Price:  RD$8,522.23
You save:  RD$2,435.09
DA13,485.25
List Price:  DA18,879.89
You save:  DA5,394.64
FJ$231.62
List Price:  FJ$324.28
You save:  FJ$92.66
Q770.23
List Price:  Q1,078.35
You save:  Q308.12
GY$20,913.67
List Price:  GY$29,279.97
You save:  GY$8,366.30
ISK kr13,911.60
List Price:  ISK kr19,476.80
You save:  ISK kr5,565.20
DH1,006.07
List Price:  DH1,408.53
You save:  DH402.46
L1,836.70
List Price:  L2,571.46
You save:  L734.75
ден5,900.06
List Price:  ден8,260.33
You save:  ден2,360.26
MOP$800.26
List Price:  MOP$1,120.39
You save:  MOP$320.13
N$1,840.36
List Price:  N$2,576.58
You save:  N$736.22
C$3,678.42
List Price:  C$5,149.94
You save:  C$1,471.51
रु13,597.49
List Price:  रु19,037.04
You save:  रु5,439.54
S/372.23
List Price:  S/521.13
You save:  S/148.90
K405.36
List Price:  K567.52
You save:  K162.16
SAR375.62
List Price:  SAR525.88
You save:  SAR150.26
ZK2,766.46
List Price:  ZK3,873.15
You save:  ZK1,106.69
L477.10
List Price:  L667.96
You save:  L190.86
Kč2,408.98
List Price:  Kč3,372.68
You save:  Kč963.69
Ft39,689.03
List Price:  Ft55,566.23
You save:  Ft15,877.20
SEK kr1,103.13
List Price:  SEK kr1,544.43
You save:  SEK kr441.30
ARS$102,160.40
List Price:  ARS$143,028.65
You save:  ARS$40,868.24
Bs690.76
List Price:  Bs967.10
You save:  Bs276.33
COP$435,928.80
List Price:  COP$610,317.76
You save:  COP$174,388.96
₡50,434.81
List Price:  ₡70,610.75
You save:  ₡20,175.94
L2,537.51
List Price:  L3,552.62
You save:  L1,015.10
₲779,455.88
List Price:  ₲1,091,269.42
You save:  ₲311,813.53
$U4,474.38
List Price:  $U6,264.31
You save:  $U1,789.93
zł408.66
List Price:  zł572.14
You save:  zł163.48
Already have an account? Log In

Transcript

All righty, so now we're gonna run our lighthouse audit and learn about meta tags, including those for Facebook and Twitter posts. So you can see we've started out in our developer tools for our previous video. And we're just going to go into our audits tab. So we ran a lighthouse audit at the beginning of the course. And you can see as a reminder, we can target desktop or mobile, and we can also slow down the CPU to simulate a mobile device. In this case, we'll just do desktop and no throttling and we will run it.

Alright, so we can see here that we have some pretty good scores. Our performance is 100 accessibility 96 best practices 93. Let's have a look at that. So this one will actually change when we are hosting it online. Right now we're running it in a local server. When it's actually on the internet, this will resolve itself.

So we can see that SEO is at nine. So we need to probably address this. So we can see here, document does not have a meta description. And if we click this arrow here, it says meta descriptions may be included in search results to concisely summarize page content. So if we want, we can click learn more to see exactly how we should fix this, which is a very handy part of the lighthouse audit. So you can see that we're simply adding a meta element with the name description and the content of whatever the description is into the head of our page.

In this case, we're going to enter it into our index dot HTML head. So we can go ahead and do that now. So you can see we already had this Open, we're going to also kind of reorganize stuff a little bit better. So we'll put the theme color up top here. And we'll change this to match the other one, just in case which was black. And we can move our description to be up here.

And in this case, we're just going to write portfolio. Progressive, whoops progressive web app. Okay, so now that that's complete, we're going to create an image for our Twitter and Facebook posts. So this will be shared as a card with a top image whenever we copy and paste a link in a message or in a post on Facebook, or on Twitter as well. I've read some articles and I already know the right dimensions that we can make one image that is optimal for both. So let's go into photo P and do that now.

So we're gonna close this. And we can clear this for now. And we're going to make a new project. In this case, we want a width of 1200 pixels, and a height of 630 pixels. And again, we'll just change this to 96. And the background can be white.

So for this one, I'm also going to keep this simple as well. And I'm essentially just going to take a screenshot of our video. Alright, so we're going to go back from our icons folder into our assets folder, to our image folder, and we're going to open our main video background with VLC. We're going to make it fullscreen and then we're also going to open our snip and sketch application. We're going to create a new one and then we're going to drag this so We take a good chunk. We don't need all of it because it's going to be wider than it is tall.

And that's good there, I guess. And we're going to save a copy of this. We're going to save this into our main assets folder. And we'll just save it into the main folder here. So we're just going to call this one social media. Okay, and we can close this and this, and we'll go back to photo P, and we're going to go File Open in place.

And same thing we're gonna track down in our assets folder. We have our social media file here. And now we're going to stretch it to fit Make sure to hold down the shift key so that we maintain our proportions and we don't skew our image. Alright, so that should be big enough. We can double click And then just kind of move that into position there. All right, that looks great.

So now we're going to save our PSD again. And this time, we're actually going to export it as a JPEG. Because anytime we have an image that is complex, it will be a smaller file size as a JPEG. The main reason to use PNG is if you need it to be a transparent background. So we're going to up the quality a little bit, let's say at 5%. That's pretty good.

And so we're going to cut both of these things now. And we're going to go back into our assets folder. And we'll paste these and this is our social media and make it lowercase this time. Just to differentiate and our new project this is our social Media. Okay, and now we're going to copy this one into our image folder. So we have our social media file there.

Okay, back to the browser, we're going to figure out the best way to do both of these at the same time. So I have this article that I found on CSS tricks, and I'll post a link as well. If you scroll down a bit, you'll come to reconciling meta tags. So this allows us to just use these meta tags all together and with the same picture and it will work for both. So we're going to copy these meta tags into our index dot HTML. Okay, so we're going to put this stuff back together and we're just going to comment out a quick title here for our social media tags.

And we're going to paste them down here and line these up. So we can change our title and our description already. So I'm just going to call this portfolio project. And I'm just going to copy this description here. This description. At this point, we actually don't have our image yet, we're going to need to wait until we actually can host it online.

The trick that I like to use is I actually host it on my GitHub and then I pointed to that. And you can also change your web project address. But again, if you haven't pushed to Firebase, you don't know what it is yet. So we'll just put this as what my website actually is. All right. Alright.

So last thing is we just need to change our image here. So let's go ahead and we're going to, we're going to go into our Git Bash terminal. And we're going to get add, get commit, and within message, all right, whoops, dash M. And we're going to say, section 13, bracket, social icon. Okay, and then we're going to get push origin master. Okay, and now we're going to go and close that for now. Close that for now.

And we're going to want to go into our GitHub and so into our Angular pw a, into our projects, source assets and image and our social media image. So we can right click on our download, and we can actually go to the content itself. So we're going to copy that. And we're going to go back into our project, minimize this, and we'll copy that into there. All right. So that's pretty much it for our meditech updates.

We're going to be able to test our Facebook and Twitter posts. But we have to wait until we actually host our project on Firebase, which we will do in the next video. All right, I'll see you on that one. Bye for now.

Sign Up

Share

Share with friends, get 20% off
Invite your friends to LearnDesk learning marketplace. For each purchase they make, you get 20% off (upto $10) on your next purchase.