Adding a CMS to Your Pyramid Web App Transcripts
Chapter: Course conclusion
Lecture: Review: Improving markdown

Login or purchase this course to watch this video and the rest of the course contents.
0:00 are moved to markdown had some benefits, but it also has some drawbacks.
0:04 One It dramatically slowed down the website we saw for a large page, maybe 20 Web browser pages worth of content.
0:12 It took 6 700 milliseconds to render that that is way, way too long. And on a busy site, it's going really slow.
0:21 And on a site, even if it's not super busy is not ideal. You want it much, much quicker or like 10 milliseconds, not six 100 2 800 milliseconds.
0:30 We also saw that we can't in general take some part of mark down and imported and reuse it across different parts of our site.
0:39 Also could do that with HTML, right? Just it's just not built into it. So that was another one. we wanted basically better performance reusability.
0:47 We could leverage this libraries idea to get variable replacements, but we didn't use it, So not really a big benefit to us here.
0:56 The idea, though, was to use this markdown sub temple climber. It automatically does the cashing to make things extremely fast.
1:03 It does the mark down conversion. It allows you to create content and then share it and reuse it through other parts of your site.
1:09 All the things we're hoping for right here.
1:12 And this open source project is super easy for us to use when we integrated into our site, Really all we had to do with two things. One for the HTML.
1:21 We just say markdown sub template dot engine, not get Paige and give it the URL at all we gotta do there.
1:28 The other one is we have to configure this thing to work with the database and with logging and things like that.
1:34 So, for example, we had to create a little class that drive from sub template storage, had to implement, get markdown text and get shared markdown and a couple of other very simple things.
1:46 It might sound like a lot of work, but we already wrote all that logic with our CMS service, So we just need to kind of put it together, give it over to the markdown September library so it can say they have this URL what content belongs with it.
1:58 Use this class here to go ask our database. What page content? If there is any, do we have for that euro and it gives it back right here.
2:07 Then we have to make sure that we set this up in the web site in the library. It doesn't just magically know about it cause we created this class.
2:14 So we have to go in our app, start up in the dunder netapp I with Diogo and say, create one of these markdown sub template stores and then just go from the markdown Septima library.
2:26 Say storage thought, set storage. Give it this. That's it. Everything you see on the screen here is pretty much all we had to do to integrate it.


Talk Python's Mastodon Michael Kennedy's Mastodon