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:05
I now can preview how the restructure text will look like in the browser without actually going to the browser. So when I click this button,
0:13
this is how this page will look when render to HTML. As you can see, we have some syntax highlighting for Python.
0:20
And, let's close it. And I have also created this tutorials directory with two tutorials. Although they're not very useful.
0:28
This one has just a simple list, and this one has a very long paragraph of some dummy text.
0:34
But let's pretend those are actually useful files in your documentation. Now we have to added to the index page. So under the toctree directive,
0:43
make sure that you add one empty line. Otherwise it's not going to work correctly.
0:48
And here we can add the names of the files to include, so first quickstart.rst and then both tutorials files.
1:01
Now we have to regenerate the documentation because refreshing this page doesn't change anything because we have to regenerate the documentation first.
1:10
So we run make HTML, no errors. Let's refresh, and as you can see, we have our table of content. We have the quick style guide.
1:24
You can go back and we have the tutorials. And Google actually thinks it's Latin. Well, it is Latin. We also have this simple search.
1:36
I have no idea why I have those things here, but Okay, well, not not very helpful. So from here, we can continue building your documentation.
1:52
You can add more folders like this Tutorials. You can add files in the main folder and so on.
1:58
In the next lesson, we'll see what to actually include in a good documentation.