#100DaysOfWeb in Python Transcripts
Chapter: Days 29-32: Static Sites
Lecture: Generating the site
0:00 So, in our content folder we should only have our firstpost.md We head back one folder make sure we're in the parent folder
0:10 Venturion environments activated so we Pelican that we could use. And now, all we have to do is tell Pelican that we want to generate our website.
0:21 The way we do that, is we use Pelican and we point it at the folder we we want it to actually generate. So Pelican content, and you'll see
0:32 it simply takes our file it processes it and it dumps it in the Apple folder. So let's head to Apple list that out, and there we go.
0:43 Straight away, we have firstpost.html Now, these here, these other files we have in here, this is all stuff that's generated by Pelican based on
0:53 what we had in that first post. So, notice there's now an Office file with nothing in it at all. We have a categories file that is
1:02 simply going to contain the categories that we used in our first post and that was simply Python. If we actually head into the Tag folder
1:12 you can see the tags that we had. Hundred Days of Web, Awesomeness, and Python. As your blog or site grows and you use more and more tags
1:22 and you use them more multiple times you will see when you start looking up by tags, all the articles that use that tag will show up.
1:29 The same goes, the same goes for category. And, same thing, we have an index page that will run the website and we have archives.
1:41 But most importantly, we have firstpost.html. We can go through that really quickly. I won't actually show too much
1:50 because there's a lot of .html there. You can look through your own, I won't waste your time. Now, now that has been created
2:00 now that we have that juicy .html file let's actually run the site. We're going to use Python's in-built web server Python http.server
2:19 We're on local host, we're on Port 8000. Let's bring up the site. There is our beautiful website, 100 Days website. We have our category.
2:33 Now remember, there's, that's the difference between categories and tags. We could use a hundred, we could use a thousand tags for all that post.
2:42 We don't want a thousand hitters showing up. We just want our categories showing up. And, straight away, we see our first post.
2:50 Let's get this party started. There is our main hitting, smaller hitter. There's that bold format from using two stars.
2:59 And, there's the italic word for using single star around it. We have the details here, we have the publish date we have by who, they're our tags.
3:11 This is a default theme that ships with Pelican. You could go through the Pelican website. There are lots of different themes
3:21 you could have for Pelican blogs. I'll let you dig through that. They're pretty simple to install. But here's a nice, simple theme
3:28 and that is our site. How easy is that? This is why static sites are very simple to use and just a lot of fun to use.
3:36 We have the power to make this right. We don't have to rely on anyone else. This is just there and we did it through
3:43 purely typing markdown and running Pelican. So, that's that. Let's move on.