Adding a CMS to Your Flask Web App Transcripts
Chapter: Advanced markdown
Lecture: Shortingcomings of pure markdown
Login or
purchase this course
to watch this video and the rest of the course contents.
0:00
the markdown system that we built renders pages beautifully and it looks like, Well, maybe we're done. Maybe you don't need to do anything else.
0:08
After all, here's one of the pages we created, and honestly, that looks fantastic. I wouldn't change a thing about it,
0:14
but there's a few problems. First of all, we saw for large pages pages that are maybe 10 times as big as this one
0:21
The site is slow, and you might think, Well, doesn't get that much traffic. It doesn't matter that much, but it does matter.
0:29
There's been tons of studies that showing that even something simple, like ah, 100 milliseconds longer Layton see,
0:35
contributes to something like 1% fewer purchases on e commerce sites. Now think about that. If you do a lot of sales,
0:43
that's a huge thing. It also is now starting to be taken into account for S E. O. So if there's a site that's five times as fast as
0:50
yours and you have about the same ranking, guess who's gonna be below. You're gonna meet below your site slow. Also, your users not gonna love it.
0:59
You're gonna pay more for infrastructure to host it all of these things. So optimizing websites matter. We're not gonna use Cloudflare.
1:07
I just thought this little quote or this little statement from them was nice. So I put it up here.
1:11
Speaking of S e o, you could actually check how your site is doing if you have it hosted on the public Internet,
1:17
for example, if you go to page speed insights from Google and you throw for example talk Python train in here, you can see we get 100 out of 100.
1:26
And this is stuff coming out of the database with no cashing. Not really. You can do it. You can make your site super super fast.
1:33
But if you want to rank high, you're going to have to put in the effort.
1:36
And a lot of the stuff that we're gonna talk about in this section actually does
1:39
this automatically more or less. You won't have to even think about it. It's just we're gonna use some libraries that make this happen,
1:44
and it's gonna be amazing. So I do want to drive home the importance of a high speed site, a quick, fast responding site. It's good.
1:52
There are so many reasons that's good for the users. It's good for you. Easier to host.
1:56
You don't need so much infrastructure and it's good for S e O all those things The other core problem I think we're going to run into on most sites is
2:04
that content cannot be reused. That might sound a little bit weird, but you know where we're raising all sorts of stuff in our current site as it
2:11
is that whole navigation bar across the top of the footer, the overall look and feel things like analytics we might put into that shared layout.
2:19
We're using that everywhere. And so it's not unreasonable to think there should be parts
2:23
of our mark down that appear in more than one location as well. Let me give you an example. Re use is actually pretty common.
2:30
If you go over to the talk by the on training website, you Can you pull up various course descriptions and marketing pages that tell you about the
2:39
course, whether you should be interested in and so on. Here's one for the Python for beginners.
2:44
Now there's a bunch of stuff very specific to that course, right, What we cover, why you care about it, who should take the course and so on.
2:51
But then there's this section here where it talks about subtitles and it says this course
2:56
comes with subtitles. Here's a picture of a course with subtitles in our player and
3:00
how it's gonna look. So if you want to take this course and you need subtitles Well, rest assured, they're gonna be here for you.
3:06
So this little section and actually the green section above is talking about streaming in high D. P I as well, and that shared in many places.
3:14
But guess what? We have other courses. Here's the data driven Web APS course. And do you know what it has?
3:19
Subtitles So we have exactly the same mark down here. Talking about this course comes with subtitles.
3:25
The right Python encode course also has subtitles in its lane in Page says yes, you might want subtitles. Yeah, 100 days. A Web Subtitles also Who?
3:34
Here's the thing. What if I want to change the wording here? Should I have to go back toe every part of my site and re edit that
3:41
somewhere in the middle of this marked on file? No, no, of course not. We don't want to do that. It's super air prone. We could easily forget one.
3:49
It's a ton of work. What if we had 100 different pages instead of just 45 or 20? Right? That's totally reasonable.
3:57
And yet it's not reasonable to go and rewrite that same better code everywhere.
4:01
So with these markdown pages, it would be nice if we could get section and
4:05
say this marked out actually something I could reuse in other parts of the site.
4:10
So that's what we're gonna dio here as we're going to switch to a library that's built on top of Mark down to and does a whole bunch of cool things,
4:18
including solving all these problems we've seen.