We've written a lot of unit tests, it's time to start pulling all the pieces together into a working static site generator. Let's work on that main.py file that we've been neglecting.
static/images/tolkien.pngstatic/index.csspublic) to ensure that the copy is clean.Here are some of the standard library docs that might be helpful:
Run and submit the CLI tests from the root of the project.
Use the following two files to test your copying function:
static/images/tolkien.png:

static/index.css:
body {
background-color: #1f1c25;
color: #f0e6d1;
font-family: "Luminari", "Georgia", serif;
line-height: 1.7;
margin: 0;
padding: 20px;
max-width: 800px;
margin-left: auto;
margin-right: auto;
}
b {
font-weight: 900;
}
h1,
h2,
h3,
h4,
h5,
h6 {
color: #dda15e;
margin-top: 24px;
margin-bottom: 16px;
text-shadow: 2px 2px 4px #000;
}
h1 {
font-size: 2.5em;
}
h2 {
font-size: 2em;
}
h3 {
font-size: 1.5em;
}
h4,
h5,
h6 {
font-size: 1.2em;
}
a {
color: #e0a96d;
text-decoration: none;
border-bottom: 2px solid #e0a96d;
}
a:hover {
color: #f4a261;
border-color: #f4a261;
}
ul,
ol {
padding-left: 30px;
}
code {
background-color: #3c3c42;
border-radius: 6px;
color: #e9c46a;
padding: 0.4em 0.6em;
font-family: "Courier New", monospace;
}
pre code {
padding: 0;
}
pre {
background-color: #3c3c42;
border-radius: 6px;
padding: 1em;
overflow: auto;
box-shadow: 2px 2px 6px #000;
}
blockquote {
background-color: #2e2c35;
border-left: 4px solid #8d99ae;
padding-left: 2em;
margin-left: 0;
padding-top: 0.5em;
padding-bottom: 0.5em;
padding-right: 0.5em;
color: #ddd;
font-style: italic;
}
img {
max-width: 100%;
height: auto;
border-radius: 6px;
border: 3px solid #3c3c42;
box-shadow: 3px 3px 6px #000;
}
::-webkit-scrollbar {
width: 12px;
height: 12px;
}
::-webkit-scrollbar-track {
background: #1f1c25;
border-radius: 6px;
}
::-webkit-scrollbar-thumb {
background-color: #3c3c42;
border-radius: 6px;
border: 3px solid #1f1c25;
}
::-webkit-scrollbar-thumb:hover {
background-color: #5a5466;
}
* {
scrollbar-width: thin;
scrollbar-color: #3c3c42 #1f1c25;
}
::-webkit-scrollbar-corner {
background: #1f1c25;
}
Yes, I know there is a shutil.copytree function that would eliminate the need for recursion entirely, but like, do you want to just download Hugo and skip this project? No! We go to the moon, not because it is easy, but because it is hard!