Adding a CMS to Your Pyramid Web App Transcripts
Chapter: Advanced Markdown templates
Lecture: Shorting comings 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, but there's a few problems.
0:16 First of all, we saw for large pages pages that are maybe 10 times as big as this one.
0:22 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, contributes to something like 1% fewer purchases on e commerce sites.
0:40 Now think about that. If you do a lot of sales, that's a huge thing. It also is now starting to be taken into account for S E. O.
0:48 So if there's a site that's five times as fast as yours and you have about the same ranking, guess who's gonna be below.
0:55 You're gonna meet below your site slow. Also, your users not gonna love it. You're gonna pay more for infrastructure to host it all of these things.
1:02 So optimizing websites matter. We're not gonna use Cloudflare. I just thought this little quote or this little statement from them was nice.
1:10 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, 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 this automatically more or less.
1:41 You won't have to even think about it. It's just we're gonna use some libraries that make this happen, and it's gonna be amazing.
1:46 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.
2:00 The other core problem I think we're going to run into on most sites is that content cannot be reused.
2:06 That might sound a little bit weird, but you know where we're raising all sorts of stuff in our current site as it 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.
2:20 And so it's not unreasonable to think there should be parts of our mark down that appear in more than one location as well. Let me give you an example.
2:28 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 course, whether you should be interested in and so on.
2:41 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 comes with subtitles.
2:57 Here's a picture of a course with subtitles in our player and how it's gonna look.
3:01 So if you want to take this course and you need subtitles Well, rest assured, they're gonna be here for you.
3:07 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 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?
3:37 Should I have to go back toe every part of my site and re edit that somewhere in the middle of this marked on file? No, no, of course not.
3:45 We don't want to do that. It's super air prone. We could easily forget one. It's a ton of work.
3:50 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 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, including solving all these problems we've seen.


Talk Python's Mastodon Michael Kennedy's Mastodon