hass.tibber_prices/docs/user/sidebars.ts
Julian Pawlowski 1db86d1766 feat(docs): improve sidebar and navbar UX
Disable autoCollapseCategories to prevent unwanted collapsing when
clicking an active category header twice.

Add hideOnScroll to navbar for more reading space on long pages.

Add category link targets in both sidebars so category headers are
clickable and navigate to the section overview page.

Impact: Sidebar navigation no longer collapses unexpectedly.
Category titles are now direct navigation links. Navbar hides while
scrolling, giving more screen space for content.
2026-04-11 11:20:10 +00:00

101 lines
2.6 KiB
TypeScript

import type {SidebarsConfig} from '@docusaurus/plugin-content-docs';
// This runs in Node.js - Don't use client-side code here (browser APIs, JSX...)
/**
* Creating a sidebar enables you to:
- create an ordered group of docs
- render a sidebar for each doc of that group
- provide next/previous navigation
The sidebars can be generated from the filesystem, or explicitly defined here.
Create as many sidebars as you want.
*/
const sidebars: SidebarsConfig = {
tutorialSidebar: [
'intro',
{
type: 'category',
label: '🚀 Getting Started',
link: { type: 'doc', id: 'installation' },
items: ['installation', 'configuration'],
collapsible: true,
collapsed: false,
},
{
type: 'category',
label: '📖 Core Concepts',
link: { type: 'doc', id: 'concepts' },
items: ['concepts', 'glossary'],
collapsible: true,
collapsed: false,
},
{
type: 'category',
label: '📊 Sensors',
link: { type: 'doc', id: 'sensors-overview' },
items: [
'sensors-overview',
'sensors-average',
'sensors-ratings-levels',
'sensors-volatility',
'sensors-trends',
'sensors-timing',
'sensors-energy-tax',
],
collapsible: true,
collapsed: false,
},
{
type: 'category',
label: '⏰ Price Periods',
link: { type: 'doc', id: 'period-calculation' },
items: ['period-calculation', 'period-relaxation'],
collapsible: true,
collapsed: false,
},
{
type: 'category',
label: '🎨 Dashboards & Charts',
link: { type: 'doc', id: 'dashboard-examples' },
items: ['dynamic-icons', 'icon-colors', 'dashboard-examples', 'chart-examples'],
collapsible: true,
collapsed: false,
},
{
type: 'category',
label: '🤖 Automations',
link: { type: 'doc', id: 'automation-examples' },
items: ['automation-examples'],
collapsible: true,
collapsed: false,
},
{
type: 'category',
label: '📖 Reference',
link: { type: 'doc', id: 'sensor-reference' },
items: ['sensor-reference', 'actions'],
collapsible: true,
collapsed: false,
},
{
type: 'category',
label: '👥 Community',
link: { type: 'doc', id: 'community-examples' },
items: ['community-examples'],
collapsible: true,
collapsed: false,
},
{
type: 'category',
label: '🔧 Help & Support',
link: { type: 'doc', id: 'faq' },
items: ['faq', 'troubleshooting'],
collapsible: true,
collapsed: false,
},
],
};
export default sidebars;