Draconai Documentation

dd_id_5c3f2f1d27
5. Documentation (Meta)

Theme: draconai

Draconai

  • Minimal WordPress theme used for DevDocs.
  • Rendering uses Twig templates (templates/*.twig) with thin PHP controllers.
  • Shared sidebar logic is centralized via partials/sidebar-left.php and partials/sidebar-right.php (include-based reuse, no duplicated layout logic).
  • Top menu includes the default WordPress search bar at the far right (after the theme toggle).
  • Search results render a dedicated results list with counts and snippets (search.php).
  • Location: server/var_www/devdocs_wp/wp-content/themes/draconai/.
  • Provides the layout styling and navigation for documentation pages.
  • Includes a theme switcher toggle in the top menu (light/dark).
  • Theme rendering bootstraps Twig through dracon_twig_echo and a fallback bootstrap include if MU bootstrap was not loaded yet.
  • Section layers are pulled from the required doc_layer taxonomy (fallback to legacy top-level slug mapping) and rendered as a colored header badge + left border (see server/var_www/devdocs_wp/wp-content/themes/draconai/functions.php).
  • The first word in the docs sidebar is "Docs"; it must show the latest update time next to it, e.g. "Docs (2023.12.12 12:12:55)" (format Y.m.d H:i:s, from the most recent page post_modified).
  • Right sidebar starts with docs_right_sidebar hook output (priority-based plugin injections, e.g. page-origin badge at the top).

Recreate From Scratch

Recreate

If the theme is deleted, recreate it using these requirements:

  • Create a folder at server/var_www/devdocs_wp/wp-content/themes/draconai/.
  • Add style.css with base layout styles (two sidebars, main content column, header, typography).
  • Add functions.php that enqueues style.css, registers the top-menu, and renders through Twig.
  • Add index.php, search.php, page-categories.php, and taxonomy-doc_category.php as thin controllers.
  • Add Twig templates under templates/ and include-based shared sidebar partials under partials/.
  • Each template must output the layout shell only and trigger plugin hooks for dynamic sections:
  • docs_updated_time in the "Docs" sidebar heading.
  • docs_sidebar_tree for the left tree.
  • docs_breadcrumbs for breadcrumbs.
  • docs_layer_badge for the layer badge.
  • docs_categories_list for per-page categories.
  • docs_categories_sidebar for the right sidebar categories list.
  • docs_children_list for the right sidebar children list.
  • docs_search_results for search results.
  • docs_taxonomy_results for taxonomy pages.
  • docs_categories_index for the categories index page.
  • The theme must not call plugin functions directly; only use hooks.