{#- Lemonade docs footer override. Same structure as Zensical's stock footer (prev/next nav + meta strip with copyright + social) with one fix: Zensical doesn't populate page.next_page on the home page (page.url == ""), so the prev/next nav vanishes there. We fall back to walking nav.items depth-first; once we pass the home item (url == "index.md") we take the next leaf as next_page. The home page in mkdocs.yml is `Welcome: index.md`. Visual styling lives in docs/assets/zest-theme.css. -#} {%- set next_page = page.next_page -%} {%- if not next_page and page.url == "" and nav and nav.items -%} {%- set ns = namespace(found=none, after_home=false) -%} {%- for item in nav.items recursive -%} {%- if ns.found -%}{# already found, skip #} {%- elif item.children -%}{{- loop(item.children) -}} {%- elif not (item.url is defined and item.url) -%}{# section header, skip #} {%- elif ns.after_home -%}{%- set ns.found = item -%} {%- elif item.url == "index.md" -%}{%- set ns.after_home = true -%} {%- endif -%} {%- endfor -%} {%- if ns.found -%}{%- set next_page = ns.found -%}{%- endif -%} {%- endif -%}