#100DaysOfWeb in Python Transcripts
Chapter: Days 29-32: Static Sites
Lecture: What did we learn?
Login or
purchase this course
to watch this video and the rest of the course contents.
0:00
And that was our chapter on static site generators specifically using Pelican and Netlify. Let's have a quick look through what we learned.
0:10
Again this was a really fun chapter because it was really easy right? So to start with we had our Pelican work flow.
0:18
Let's just run through that really quick nothing crazy. After installing Pelican itself we ran the Pelican
0:25
quick start script and this script pretty much creates a bare bones skeleton project and that project looked like what you see below.
0:36
The makefile, the pycase the content output and so on. And what we did was we learned that our content folder was where all of out source files went.
0:46
So all of our markdown formatted files, static pages and everything going to that content directory. And then after we create those source files
0:57
we run our Pelican content command That pretty much processes those source files and generates the site and that site is then generated in
1:08
the output folder and to then see our site locally to demo it we cd'd into the output directory we ran the inbuilt Python web server
1:18
and we tested our site on local host. Next we had static content. Now our static content specifically images is what we tested with the pie byte
1:31
server. They go inside the content folder in the images directory. Simple as that. Then we used static pages which was to create our back page
1:42
and terms and conditions and whatever else They went in the content pages directory So they didn't just go in the content directory.
1:51
They had their own subdirectories inside that. And finally in our markdown file to reference this static content we have to use the word static inside
2:03
those braces there and then out the path to our file which was our logo. Next we wanted to deploy our website onto Netlify
2:13
and we did that by pushing all of our content on Github and then having Netlify monitor our Github repo and deploy that code live onto the internet
2:25
and I was lucky enough to have a really dodgy URL. Romantic Bends don't know what that's about but let's just roll with it.
2:32
And that just made the site live and they monitor our Github repo and by monitoring it what happens is
2:40
every single time we created a change and pushed it up to the Github repo Netlify took that within seconds
2:47
and updated the website and that was the beauty of Netlify. And that was it we ran through Pelican. We used Netlify. We used Github.
2:58
Everything worked thogether and we have our own website. So hopefully you had fun with this chapter.
3:03
It is one of the most satisfying things to create your own website have it live on the internet. Especially have it in such a nice flowing format
3:11
where you work it locally you push the code it automatically becomes the website really cool stuff. Hope you enjoyed it. Keep calm and code in Python.