f5devcentral / f5-sphinx-theme

F5 Sphinx theme for documentation hosted on clouddocs.f5.com
https://clouddocs.f5.com
Apache License 2.0
9 stars 7 forks source link

layout - divide into chunks for better extendability #47

Closed jputrino closed 6 years ago

jputrino commented 7 years ago

Version

x

Description

Currently, if you want to use a custom layout, you must copy all of the html from the theme layout in order to update any piece of it. This is problematic because the layout in a project overrides the theme layout, so any updates made here wouldn't roll out to the project using a custom layout.

I would like to refactor the layout template to make it more easily customizable for use in different projects. For example, the breadcrumbs should be in its own {% block %} so a project can alter just that piece of the template.

0xHiteshPatel commented 7 years ago

I've got some mods that add a {% block breadcrumb %} working already. What other blocks were you thinking?

jputrino commented 7 years ago

@0xHiteshPatel - I'd like to have a 'base' document that contains the basic building blocks (doctype, head, header, and footer). Layout.html extends base.html, which lets us customize page layouts for individual projects (specifically, this lets us use Sphinx to build clouddocs). In layout, we could have the breadcrumbs, sidebar, & document blocks we need for the docs.

I have some drafts pushed to my fork, if you want to take a look.

jputrino commented 7 years ago

includes #45