Rewrite the API docs, make api.html and root.html inherit base.html.