#100DaysOfWeb in Python Transcripts
Chapter: Days 29-32: Static Sites
Lecture: Generating the site

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