#100DaysOfWeb in Python Transcripts
Chapter: Days 29-32: Static Sites
Lecture: Creating a dedicated static page

Login or purchase this course to watch this video and the rest of the course contents.
0:00 By now you're probably getting antsy to continue working on your site so let's just hammer out one last thing and that is creating static pages.
0:10 So, you had static content which was like your images now we have a static page. What I mean by that is this one page
0:18 that will stay the same on your site every time people view it. And I don't mean one of your posts. Because that post will sort of
0:25 move down the page and whatnot. What I mean by that, is if we go to our live site here we have our categories at the top.
0:33 But what about something like, your About page? Your terms and conditions? Or, something like that, you know one of those pages that you never edit
0:42 never change, it's not a post, but it's a dedicated page. You can do that in Pelican and it's quite easy.
0:50 Similar to the way we created our images folder hidden to content, we actually create a pages folder. So, we make the pages pop into there.
1:06 Nothing in there. And now we create our file. So, I'm going to create an md file called about.
1:13 And this is just going to be the stock standard about page. All it's going to say, is something about me at the bare minimum.
1:20 The requirement for Pelican, is that we have a title. Remember all those headers we had before? We don't need too much, let's just call it about
1:30 and that's it. We'll start with, About page. And then we will say, this is a page about me. I made this site to demonstrate static site.
1:51 Generators, that's it. Let's get rid of these, we don't need them. And let, ooh, I merged this site. There we go, nice and good, looks good
2:03 and let's right-click that page. Let's follow the whole process here through the proper production. Okay, we'll go back one folder, back again
2:13 Pelican content to generate the page now that we've created it. Okay, head into our output folder.
2:23 Always a good idea to test, of course Python -m httpserver. That's running. Let's bring that up, refresh the page.
2:36 And we now have an about page. So let's click on that. There's our master header. This is a page about me.
2:42 I made this site to demonstrate static site generators. Looks good. Now, let's pop back into here. Now that we're out of there, let's push the content
2:51 and get commit about page creation. Get push urgent master. Pushes it to get hub for us. And then we can quickly flick to Netlify
3:07 and see this become a reality. Yup, that's done. Pop back up to Netlify. Go to deploys, straight away, look how quick that was.
3:17 It was like, it was a matter of seconds, pretty much. Now, we wait for this to go to published and that's now published to roughly about a minute.
3:26 And we can head over to our website, reload the page and there we go. There's our About page. The whole turnaround of making that was roughly
3:35 three minutes away from when we created the page. When started this video and then we had it completed. How good is that?
3:44 All right, one more thing I want to show you really quickly, we'll move on to the next video.


Talk Python's Mastodon Michael Kennedy's Mastodon