Modern Python Projects Transcripts
Chapter: Documentation
Lecture: Adding more documentation

Login or purchase this course to watch this video and the rest of the course contents.
0:00 With this restructure text extension that I have installed in VSCode,
0:04 I now can preview how the restructure text will look like in the browser without actually
0:09 going to the browser. So when I click this button,
0:12 this is how this page will look when render to html.
0:16 As you can see, we have some syntax highlighting for python.
0:19 And, let's close it. And I have also created this tutorials directory with two
0:25 tutorials. Although they're not very useful.
0:27 This one has just a simple list,
0:29 and this one has a very long paragraph of some dummy text.
0:33 But let's pretend those are actually useful files in your documentation.
0:38 Now we have to added to the index page.
0:40 So under the toctree directive,
0:42 make sure that you add one empty line.
0:45 Otherwise it's not going to work correctly.
0:47 And here we can add the names of the files to include, so first quickstart.rst
0:54 and then both tutorials files.
1:00 Now we have to regenerate the documentation because refreshing this page doesn't change anything because we
1:06 have to regenerate the documentation first.
1:09 So we run make HTML, no errors.
1:16 Let's refresh, and as you can see,
1:19 we have our table of content.
1:21 We have the quick style guide.
1:23 You can go back and we have the tutorials.
1:28 And Google actually thinks it's Latin.
1:30 Well, it is Latin. We also have this simple search.
1:35 I have no idea why I have those things here,
1:38 but Okay, well, not not very helpful.
1:47 So from here, we can continue building your documentation.
1:51 You can add more folders like this
1:52 Tutorials. You can add files in the main folder and so on.
1:57 In the next lesson, we'll see what to actually include in a good documentation.