This is an example of how to customize Sphinx to create a custom landing page. This template provides a lot of freedoms, essentially the landing page is written with Jinja, giving you all the freedom to use HTML and CSS as you wish.
You need to do the following:
- Move
index.rst
tocontents.rst
- Set
master_doc = 'contents'
inconf.py
- Create an
index.html
in your_templates
dir - Create a
custom.css
in your_static/css
dir - Add a custom hook in your
conf.py
for CSS:def setup(app): app.add_stylesheet('css/custom.css')
- Create a custom hook in your
conf.py
to renderindex.html
html_additional_pages = {'index': 'index.html'}
That's all. The code in source
demonstrates how to do this.
This template's output is available at: https://sphinx-landing-template.readthedocs.io/en/latest/
Copyright (c) 2018, Mark Meyer ([email protected])