Static Sites with Sphinx and Markdown Transcripts
Chapter: Setup
Lecture: First Markdown page
Login or
purchase this course
to watch this video and the rest of the course contents.
0:00
With markdown enabled in our Sphinx site.
0:03
Thanks to MyST. Let's add our first markdown page in my editor,
0:10
I'll create a new file for an about us page on the Schlock chain website.
0:17
This is going to say about us as the title and some text with this text
0:25
in place. We see that we get a little bit of a preview of markdown
0:30
in our tool. Now when we saved,
0:33
we got a warning from Sphinx,
0:35
it's a little bit mis formatted because of the live reload tool.
0:40
But the warning said that I've got this document called About Us and it's not included
0:46
in any doctree. Now, what does that mean? In Sphinx
0:50
Just because you leave a file in that directory doesn't mean it's actually in your site
0:54
you have to put it into a table of contents somewhere.
0:58
We currently have one table of contents.
1:00
This is at the top of the site in 'index.rst'.
1:03
I will go to that and say about_us to add that document to the
1:10
doctree. Now, when it runs it's no longer mad.
1:14
And if I go back over to my preview,
1:20
I see a link to an about us page which I can actually click on and see the rendering of that markdown file right along side the restructured text file.