Skip to content

ofosos/sphinx-landing-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Create a Landing Page for Sphinx

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 to contents.rst
  • Set master_doc = 'contents' in conf.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 render index.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

Copyright (c) 2018, Mark Meyer ([email protected])

About

Template for creating a custom Sphinx landing page

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published