- Remove KCL ecosystem (~220 files deleted) - Migrate all infrastructure to Nickel schema system - Consolidate documentation: legacy docs → provisioning/docs/src/ - Add CI/CD workflows (.github/) and Rust build config (.cargo/) - Update core system for Nickel schema parsing - Update README.md and CHANGES.md for v5.0.0 release - Fix pre-commit hooks: end-of-file, trailing-whitespace - Breaking changes: KCL workspaces require migration - Migration bridge available in docs/src/development/
71 lines
26 KiB
JavaScript
71 lines
26 KiB
JavaScript
// Populate the sidebar
|
|
//
|
|
// This is a script, and not included directly in the page, to control the total size of the book.
|
|
// The TOC contains an entry for each page, so if each page includes a copy of the TOC,
|
|
// the total size of the page becomes O(n**2).
|
|
class MDBookSidebarScrollbox extends HTMLElement {
|
|
constructor() {
|
|
super();
|
|
}
|
|
connectedCallback() {
|
|
this.innerHTML = '<ol class="chapter"><li class="chapter-item expanded affix "><a href="index.html">Home</a></li><li class="chapter-item expanded affix "><li class="spacer"></li><li class="chapter-item expanded "><a href="getting-started/installation-guide.html"><strong aria-hidden="true">1.</strong> Installation Guide</a></li><li class="chapter-item expanded "><a href="getting-started/getting-started.html"><strong aria-hidden="true">2.</strong> Getting Started</a></li><li class="chapter-item expanded "><a href="getting-started/quickstart-cheatsheet.html"><strong aria-hidden="true">3.</strong> Quick Start Cheatsheet</a></li><li class="chapter-item expanded "><a href="getting-started/setup-quickstart.html"><strong aria-hidden="true">4.</strong> Setup Quick Start</a></li><li class="chapter-item expanded "><a href="getting-started/setup-system-guide.html"><strong aria-hidden="true">5.</strong> Setup System Guide</a></li><li class="chapter-item expanded "><a href="getting-started/quickstart.html"><strong aria-hidden="true">6.</strong> Quick Start (Full)</a></li><li class="chapter-item expanded "><a href="getting-started/01-prerequisites.html"><strong aria-hidden="true">7.</strong> Prerequisites</a></li><li class="chapter-item expanded "><a href="getting-started/02-installation.html"><strong aria-hidden="true">8.</strong> Installation Steps</a></li><li class="chapter-item expanded "><a href="getting-started/03-first-deployment.html"><strong aria-hidden="true">9.</strong> First Deployment</a></li><li class="chapter-item expanded "><a href="getting-started/04-verification.html"><strong aria-hidden="true">10.</strong> Verification</a></li><li class="chapter-item expanded "><a href="getting-started/05-platform-configuration.html"><strong aria-hidden="true">11.</strong> Platform Service Configuration</a></li><li class="chapter-item expanded affix "><li class="spacer"></li><li class="chapter-item expanded "><a href="architecture/system-overview.html"><strong aria-hidden="true">12.</strong> System Overview</a></li><li class="chapter-item expanded "><a href="architecture/architecture-overview.html"><strong aria-hidden="true">13.</strong> Architecture Overview</a></li><li class="chapter-item expanded "><a href="architecture/design-principles.html"><strong aria-hidden="true">14.</strong> Design Principles</a></li><li class="chapter-item expanded "><a href="architecture/integration-patterns.html"><strong aria-hidden="true">15.</strong> Integration Patterns</a></li><li class="chapter-item expanded "><a href="architecture/orchestrator-integration-model.html"><strong aria-hidden="true">16.</strong> Orchestrator Integration Model</a></li><li class="chapter-item expanded "><a href="architecture/multi-repo-architecture.html"><strong aria-hidden="true">17.</strong> Multi-Repo Architecture</a></li><li class="chapter-item expanded "><a href="architecture/multi-repo-strategy.html"><strong aria-hidden="true">18.</strong> Multi-Repo Strategy</a></li><li class="chapter-item expanded "><a href="architecture/database-and-config-architecture.html"><strong aria-hidden="true">19.</strong> Database and Config Architecture</a></li><li class="chapter-item expanded "><a href="architecture/ecosystem-integration.html"><strong aria-hidden="true">20.</strong> Ecosystem Integration</a></li><li class="chapter-item expanded "><a href="architecture/package-and-loader-system.html"><strong aria-hidden="true">21.</strong> Package and Loader System</a></li><li class="chapter-item expanded "><a href="architecture/nickel-vs-kcl-comparison.html"><strong aria-hidden="true">22.</strong> Nickel vs KCL Comparison</a></li><li class="chapter-item expanded "><a href="architecture/nickel-executable-examples.html"><strong aria-hidden="true">23.</strong> Nickel Executable Examples</a></li><li class="chapter-item expanded "><a href="architecture/orchestrator_info.html"><strong aria-hidden="true">24.</strong> Orchestrator Info</a></li><li class="chapter-item expanded "><a href="architecture/orchestrator-auth-integration.html"><strong aria-hidden="true">25.</strong> Orchestrator Auth Integration</a></li><li class="chapter-item expanded "><a href="architecture/repo-dist-analysis.html"><strong aria-hidden="true">26.</strong> Repo Dist Analysis</a></li><li class="chapter-item expanded "><a href="architecture/typedialog-nickel-integration.html"><strong aria-hidden="true">27.</strong> TypeDialog Nickel Integration</a></li><li class="chapter-item expanded "><a href="architecture/adr/ADR-001-project-structure.html"><strong aria-hidden="true">28.</strong> ADR-001: Project Structure</a></li><li class="chapter-item expanded "><a href="architecture/adr/ADR-002-distribution-strategy.html"><strong aria-hidden="true">29.</strong> ADR-002: Distribution Strategy</a></li><li class="chapter-item expanded "><a href="architecture/adr/ADR-003-workspace-isolation.html"><strong aria-hidden="true">30.</strong> ADR-003: Workspace Isolation</a></li><li class="chapter-item expanded "><a href="architecture/adr/ADR-004-hybrid-architecture.html"><strong aria-hidden="true">31.</strong> ADR-004: Hybrid Architecture</a></li><li class="chapter-item expanded "><a href="architecture/adr/ADR-005-extension-framework.html"><strong aria-hidden="true">32.</strong> ADR-005: Extension Framework</a></li><li class="chapter-item expanded "><a href="architecture/adr/ADR-006-provisioning-cli-refactoring.html"><strong aria-hidden="true">33.</strong> ADR-006: Provisioning CLI Refactoring</a></li><li class="chapter-item expanded "><a href="architecture/adr/ADR-007-kms-simplification.html"><strong aria-hidden="true">34.</strong> ADR-007: KMS Simplification</a></li><li class="chapter-item expanded "><a href="architecture/adr/ADR-008-cedar-authorization.html"><strong aria-hidden="true">35.</strong> ADR-008: Cedar Authorization</a></li><li class="chapter-item expanded "><a href="architecture/adr/ADR-009-security-system-complete.html"><strong aria-hidden="true">36.</strong> ADR-009: Security System Complete</a></li><li class="chapter-item expanded "><a href="architecture/adr/ADR-010-configuration-format-strategy.html"><strong aria-hidden="true">37.</strong> ADR-010: Configuration Format Strategy</a></li><li class="chapter-item expanded "><a href="architecture/adr/ADR-011-nickel-migration.html"><strong aria-hidden="true">38.</strong> ADR-011: Nickel Migration</a></li><li class="chapter-item expanded "><a href="architecture/adr/adr-012-nushell-nickel-plugin-cli-wrapper.html"><strong aria-hidden="true">39.</strong> ADR-012: Nushell Nickel Plugin CLI Wrapper</a></li><li class="chapter-item expanded affix "><li class="spacer"></li><li class="chapter-item expanded "><a href="api-reference/rest-api.html"><strong aria-hidden="true">40.</strong> REST API</a></li><li class="chapter-item expanded "><a href="api-reference/websocket.html"><strong aria-hidden="true">41.</strong> WebSocket</a></li><li class="chapter-item expanded "><a href="api-reference/extensions.html"><strong aria-hidden="true">42.</strong> Extensions</a></li><li class="chapter-item expanded "><a href="api-reference/sdks.html"><strong aria-hidden="true">43.</strong> SDKs</a></li><li class="chapter-item expanded "><a href="api-reference/integration-examples.html"><strong aria-hidden="true">44.</strong> Integration Examples</a></li><li class="chapter-item expanded "><a href="api-reference/provider-api.html"><strong aria-hidden="true">45.</strong> Provider API</a></li><li class="chapter-item expanded "><a href="api-reference/nushell-api.html"><strong aria-hidden="true">46.</strong> NuShell API</a></li><li class="chapter-item expanded "><a href="api-reference/path-resolution.html"><strong aria-hidden="true">47.</strong> Path Resolution</a></li><li class="chapter-item expanded affix "><li class="spacer"></li><li class="chapter-item expanded "><a href="development/extension-development.html"><strong aria-hidden="true">48.</strong> Extension Development</a></li><li class="chapter-item expanded "><a href="development/infrastructure-specific-extensions.html"><strong aria-hidden="true">49.</strong> Infrastructure-Specific Extensions</a></li><li class="chapter-item expanded "><a href="development/quick-provider-guide.html"><strong aria-hidden="true">50.</strong> Quick Provider Guide</a></li><li class="chapter-item expanded "><a href="development/command-handler-guide.html"><strong aria-hidden="true">51.</strong> Command Handler Guide</a></li><li class="chapter-item expanded "><a href="development/configuration.html"><strong aria-hidden="true">52.</strong> Configuration</a></li><li class="chapter-item expanded "><a href="development/workflow.html"><strong aria-hidden="true">53.</strong> Workflow</a></li><li class="chapter-item expanded "><a href="development/integration.html"><strong aria-hidden="true">54.</strong> Integration</a></li><li class="chapter-item expanded "><a href="development/build-system.html"><strong aria-hidden="true">55.</strong> Build System</a></li><li class="chapter-item expanded "><a href="development/extensions.html"><strong aria-hidden="true">56.</strong> Extensions</a></li><li class="chapter-item expanded "><a href="development/distribution-process.html"><strong aria-hidden="true">57.</strong> Distribution Process</a></li><li class="chapter-item expanded "><a href="development/implementation-guide.html"><strong aria-hidden="true">58.</strong> Implementation Guide</a></li><li class="chapter-item expanded "><a href="development/taskserv-developer-guide.html"><strong aria-hidden="true">59.</strong> TaskServ Developer Guide</a></li><li class="chapter-item expanded "><a href="development/taskserv-quick-guide.html"><strong aria-hidden="true">60.</strong> TaskServ Quick Guide</a></li><li class="chapter-item expanded "><a href="development/project-structure.html"><strong aria-hidden="true">61.</strong> Project Structure</a></li><li class="chapter-item expanded "><a href="development/provider-agnostic-architecture.html"><strong aria-hidden="true">62.</strong> Provider Agnostic Architecture</a></li><li class="chapter-item expanded "><a href="development/ctrl-c-implementation-notes.html"><strong aria-hidden="true">63.</strong> Ctrl-C Implementation Notes</a></li><li class="chapter-item expanded "><a href="development/auth-metadata-guide.html"><strong aria-hidden="true">64.</strong> Auth Metadata Guide</a></li><li class="chapter-item expanded "><a href="development/migration-guide.html"><strong aria-hidden="true">65.</strong> Migration Guide</a></li><li class="chapter-item expanded "><a href="development/kms-simplification.html"><strong aria-hidden="true">66.</strong> KMS Simplification</a></li><li class="chapter-item expanded "><a href="development/migration-example.html"><strong aria-hidden="true">67.</strong> Migration Example</a></li><li class="chapter-item expanded "><a href="development/glossary.html"><strong aria-hidden="true">68.</strong> Glossary</a></li><li class="chapter-item expanded "><a href="development/provider-distribution-guide.html"><strong aria-hidden="true">69.</strong> Provider Distribution Guide</a></li><li class="chapter-item expanded "><a href="development/taskserv-categorization.html"><strong aria-hidden="true">70.</strong> TaskServ Categorization</a></li><li class="chapter-item expanded "><a href="development/extension-registry.html"><strong aria-hidden="true">71.</strong> Extension Registry</a></li><li class="chapter-item expanded "><a href="development/mcp-server.html"><strong aria-hidden="true">72.</strong> MCP Server</a></li><li class="chapter-item expanded "><a href="development/typedialog-platform-config-guide.html"><strong aria-hidden="true">73.</strong> TypeDialog Platform Config Guide</a></li><li class="chapter-item expanded affix "><li class="spacer"></li><li class="chapter-item expanded "><a href="operations/deployment-guide.html"><strong aria-hidden="true">74.</strong> Platform Deployment Guide</a></li><li class="chapter-item expanded "><a href="operations/service-management-guide.html"><strong aria-hidden="true">75.</strong> Service Management Guide</a></li><li class="chapter-item expanded "><a href="operations/monitoring-alerting-setup.html"><strong aria-hidden="true">76.</strong> Monitoring & Alerting Setup</a></li><li class="chapter-item expanded "><a href="operations/service-management-quickref.html"><strong aria-hidden="true">77.</strong> Service Management Quick Reference</a></li><li class="chapter-item expanded "><a href="operations/coredns-guide.html"><strong aria-hidden="true">78.</strong> CoreDNS Guide</a></li><li class="chapter-item expanded "><a href="operations/backup-recovery.html"><strong aria-hidden="true">79.</strong> Backup Recovery</a></li><li class="chapter-item expanded "><a href="operations/deployment.html"><strong aria-hidden="true">80.</strong> Deployment</a></li><li class="chapter-item expanded "><a href="operations/monitoring.html"><strong aria-hidden="true">81.</strong> Monitoring</a></li><li class="chapter-item expanded "><a href="operations/production-readiness-checklist.html"><strong aria-hidden="true">82.</strong> Production Readiness Checklist</a></li><li class="chapter-item expanded "><a href="operations/break-glass-training-guide.html"><strong aria-hidden="true">83.</strong> Break Glass Training Guide</a></li><li class="chapter-item expanded "><a href="operations/cedar-policies-production-guide.html"><strong aria-hidden="true">84.</strong> Cedar Policies Production Guide</a></li><li class="chapter-item expanded "><a href="operations/mfa-admin-setup-guide.html"><strong aria-hidden="true">85.</strong> MFA Admin Setup Guide</a></li><li class="chapter-item expanded "><a href="operations/orchestrator.html"><strong aria-hidden="true">86.</strong> Orchestrator</a></li><li class="chapter-item expanded "><a href="operations/orchestrator-system.html"><strong aria-hidden="true">87.</strong> Orchestrator System</a></li><li class="chapter-item expanded "><a href="operations/control-center.html"><strong aria-hidden="true">88.</strong> Control Center</a></li><li class="chapter-item expanded "><a href="operations/installer.html"><strong aria-hidden="true">89.</strong> Installer</a></li><li class="chapter-item expanded "><a href="operations/installer-system.html"><strong aria-hidden="true">90.</strong> Installer System</a></li><li class="chapter-item expanded "><a href="operations/provisioning-server.html"><strong aria-hidden="true">91.</strong> Provisioning Server</a></li><li class="chapter-item expanded affix "><li class="spacer"></li><li class="chapter-item expanded "><a href="infrastructure/infrastructure-management.html"><strong aria-hidden="true">92.</strong> Infrastructure Management</a></li><li class="chapter-item expanded "><a href="infrastructure/infrastructure-from-code-guide.html"><strong aria-hidden="true">93.</strong> Infrastructure from Code Guide</a></li><li class="chapter-item expanded "><a href="infrastructure/batch-workflow-system.html"><strong aria-hidden="true">94.</strong> Batch Workflow System</a></li><li class="chapter-item expanded "><a href="infrastructure/cli-architecture.html"><strong aria-hidden="true">95.</strong> CLI Architecture</a></li><li class="chapter-item expanded "><a href="infrastructure/configuration-system.html"><strong aria-hidden="true">96.</strong> Configuration System</a></li><li class="chapter-item expanded "><a href="infrastructure/workspace-setup.html"><strong aria-hidden="true">97.</strong> Workspace Setup</a></li><li class="chapter-item expanded "><a href="infrastructure/workspace-switching-guide.html"><strong aria-hidden="true">98.</strong> Workspace Switching Guide</a></li><li class="chapter-item expanded "><a href="infrastructure/workspace-switching-system.html"><strong aria-hidden="true">99.</strong> Workspace Switching System</a></li><li class="chapter-item expanded "><a href="infrastructure/cli-reference.html"><strong aria-hidden="true">100.</strong> CLI Reference</a></li><li class="chapter-item expanded "><a href="infrastructure/workspace-config-architecture.html"><strong aria-hidden="true">101.</strong> Workspace Config Architecture</a></li><li class="chapter-item expanded "><a href="infrastructure/dynamic-secrets-guide.html"><strong aria-hidden="true">102.</strong> Dynamic Secrets Guide</a></li><li class="chapter-item expanded "><a href="infrastructure/mode-system-guide.html"><strong aria-hidden="true">103.</strong> Mode System Guide</a></li><li class="chapter-item expanded "><a href="infrastructure/workspace-guide.html"><strong aria-hidden="true">104.</strong> Workspace Guide</a></li><li class="chapter-item expanded "><a href="infrastructure/workspace-enforcement-guide.html"><strong aria-hidden="true">105.</strong> Workspace Enforcement Guide</a></li><li class="chapter-item expanded "><a href="infrastructure/workspace-infra-reference.html"><strong aria-hidden="true">106.</strong> Workspace Infra Reference</a></li><li class="chapter-item expanded "><a href="infrastructure/workspace-config-commands.html"><strong aria-hidden="true">107.</strong> Workspace Config Commands</a></li><li class="chapter-item expanded "><a href="infrastructure/config-rendering-guide.html"><strong aria-hidden="true">108.</strong> Config Rendering Guide</a></li><li class="chapter-item expanded "><a href="infrastructure/configuration.html"><strong aria-hidden="true">109.</strong> Configuration</a></li><li class="chapter-item expanded affix "><li class="spacer"></li><li class="chapter-item expanded "><a href="security/authentication-layer-guide.html"><strong aria-hidden="true">110.</strong> Authentication Layer Guide</a></li><li class="chapter-item expanded "><a href="security/config-encryption-guide.html"><strong aria-hidden="true">111.</strong> Config Encryption Guide</a></li><li class="chapter-item expanded "><a href="security/security-system.html"><strong aria-hidden="true">112.</strong> Security System</a></li><li class="chapter-item expanded "><a href="security/rustyvault-kms-guide.html"><strong aria-hidden="true">113.</strong> RustyVault KMS Guide</a></li><li class="chapter-item expanded "><a href="security/secretumvault-kms-guide.html"><strong aria-hidden="true">114.</strong> SecretumVault KMS Guide</a></li><li class="chapter-item expanded "><a href="security/ssh-temporal-keys-user-guide.html"><strong aria-hidden="true">115.</strong> SSH Temporal Keys User Guide</a></li><li class="chapter-item expanded "><a href="security/plugin-integration-guide.html"><strong aria-hidden="true">116.</strong> Plugin Integration Guide</a></li><li class="chapter-item expanded "><a href="security/nushell-plugins-guide.html"><strong aria-hidden="true">117.</strong> NuShell Plugins Guide</a></li><li class="chapter-item expanded "><a href="security/nushell-plugins-system.html"><strong aria-hidden="true">118.</strong> NuShell Plugins System</a></li><li class="chapter-item expanded "><a href="security/plugin-usage-guide.html"><strong aria-hidden="true">119.</strong> Plugin Usage Guide</a></li><li class="chapter-item expanded "><a href="security/secrets-management-guide.html"><strong aria-hidden="true">120.</strong> Secrets Management Guide</a></li><li class="chapter-item expanded "><a href="security/auth-quick-reference.html"><strong aria-hidden="true">121.</strong> Auth Quick Reference</a></li><li class="chapter-item expanded "><a href="security/config-encryption-quickref.html"><strong aria-hidden="true">122.</strong> Config Encryption Quick Reference</a></li><li class="chapter-item expanded "><a href="security/kms-service.html"><strong aria-hidden="true">123.</strong> KMS Service</a></li><li class="chapter-item expanded affix "><li class="spacer"></li><li class="chapter-item expanded "><a href="integration/gitea-integration-guide.html"><strong aria-hidden="true">124.</strong> Gitea Integration Guide</a></li><li class="chapter-item expanded "><a href="integration/service-mesh-ingress-guide.html"><strong aria-hidden="true">125.</strong> Service Mesh Ingress Guide</a></li><li class="chapter-item expanded "><a href="integration/oci-registry-guide.html"><strong aria-hidden="true">126.</strong> OCI Registry Guide</a></li><li class="chapter-item expanded "><a href="integration/integrations-quickstart.html"><strong aria-hidden="true">127.</strong> Integrations Quick Start</a></li><li class="chapter-item expanded "><a href="integration/secrets-service-layer-complete.html"><strong aria-hidden="true">128.</strong> Secrets Service Layer Complete</a></li><li class="chapter-item expanded "><a href="integration/oci-registry-platform.html"><strong aria-hidden="true">129.</strong> OCI Registry Platform</a></li><li class="chapter-item expanded affix "><li class="spacer"></li><li class="chapter-item expanded "><a href="testing/test-environment-guide.html"><strong aria-hidden="true">130.</strong> Test Environment Guide</a></li><li class="chapter-item expanded "><a href="testing/test-environment-usage.html"><strong aria-hidden="true">131.</strong> Test Environment Usage</a></li><li class="chapter-item expanded "><a href="testing/test-environment-system.html"><strong aria-hidden="true">132.</strong> Test Environment System</a></li><li class="chapter-item expanded "><a href="testing/taskserv-validation-guide.html"><strong aria-hidden="true">133.</strong> TaskServ Validation Guide</a></li><li class="chapter-item expanded affix "><li class="spacer"></li><li class="chapter-item expanded "><a href="troubleshooting/troubleshooting-guide.html"><strong aria-hidden="true">134.</strong> Troubleshooting Guide</a></li><li class="chapter-item expanded affix "><li class="spacer"></li><li class="chapter-item expanded "><a href="guides/from-scratch.html"><strong aria-hidden="true">135.</strong> From Scratch</a></li><li class="chapter-item expanded "><a href="guides/update-infrastructure.html"><strong aria-hidden="true">136.</strong> Update Infrastructure</a></li><li class="chapter-item expanded "><a href="guides/customize-infrastructure.html"><strong aria-hidden="true">137.</strong> Customize Infrastructure</a></li><li class="chapter-item expanded "><a href="guides/extension-development-quickstart.html"><strong aria-hidden="true">138.</strong> Extension Development Quickstart</a></li><li class="chapter-item expanded "><a href="guides/guide-system.html"><strong aria-hidden="true">139.</strong> Guide System</a></li><li class="chapter-item expanded "><a href="guides/workspace-generation-quick-reference.html"><strong aria-hidden="true">140.</strong> Workspace Generation Quick Reference</a></li><li class="chapter-item expanded affix "><li class="spacer"></li><li class="chapter-item expanded "><a href="quick-reference/MASTER.html"><strong aria-hidden="true">141.</strong> Master Index</a></li><li class="chapter-item expanded "><a href="quick-reference/platform-operations-cheatsheet.html"><strong aria-hidden="true">142.</strong> Platform Operations Cheatsheet</a></li><li class="chapter-item expanded "><a href="quick-reference/general.html"><strong aria-hidden="true">143.</strong> General Commands</a></li><li class="chapter-item expanded "><a href="quick-reference/justfile-recipes.html"><strong aria-hidden="true">144.</strong> JustFile Recipes</a></li><li class="chapter-item expanded "><a href="quick-reference/oci.html"><strong aria-hidden="true">145.</strong> OCI Registry</a></li><li class="chapter-item expanded "><a href="quick-reference/sudo-password-handling.html"><strong aria-hidden="true">146.</strong> Sudo Password Handling</a></li><li class="chapter-item expanded affix "><li class="spacer"></li><li class="chapter-item expanded "><a href="configuration/config-validation.html"><strong aria-hidden="true">147.</strong> Config Validation</a></li><li class="chapter-item expanded "><a href="configuration/workspace-config-architecture.html"><strong aria-hidden="true">148.</strong> Workspace Config Architecture</a></li></ol>';
|
|
// Set the current, active page, and reveal it if it's hidden
|
|
let current_page = document.location.href.toString().split("#")[0].split("?")[0];
|
|
if (current_page.endsWith("/")) {
|
|
current_page += "index.html";
|
|
}
|
|
var links = Array.prototype.slice.call(this.querySelectorAll("a"));
|
|
var l = links.length;
|
|
for (var i = 0; i < l; ++i) {
|
|
var link = links[i];
|
|
var href = link.getAttribute("href");
|
|
if (href && !href.startsWith("#") && !/^(?:[a-z+]+:)?\/\//.test(href)) {
|
|
link.href = path_to_root + href;
|
|
}
|
|
// The "index" page is supposed to alias the first chapter in the book.
|
|
if (link.href === current_page || (i === 0 && path_to_root === "" && current_page.endsWith("/index.html"))) {
|
|
link.classList.add("active");
|
|
var parent = link.parentElement;
|
|
if (parent && parent.classList.contains("chapter-item")) {
|
|
parent.classList.add("expanded");
|
|
}
|
|
while (parent) {
|
|
if (parent.tagName === "LI" && parent.previousElementSibling) {
|
|
if (parent.previousElementSibling.classList.contains("chapter-item")) {
|
|
parent.previousElementSibling.classList.add("expanded");
|
|
}
|
|
}
|
|
parent = parent.parentElement;
|
|
}
|
|
}
|
|
}
|
|
// Track and set sidebar scroll position
|
|
this.addEventListener('click', function(e) {
|
|
if (e.target.tagName === 'A') {
|
|
sessionStorage.setItem('sidebar-scroll', this.scrollTop);
|
|
}
|
|
}, { passive: true });
|
|
var sidebarScrollTop = sessionStorage.getItem('sidebar-scroll');
|
|
sessionStorage.removeItem('sidebar-scroll');
|
|
if (sidebarScrollTop) {
|
|
// preserve sidebar scroll position when navigating via links within sidebar
|
|
this.scrollTop = sidebarScrollTop;
|
|
} else {
|
|
// scroll sidebar to current active section when navigating via "next/previous chapter" buttons
|
|
var activeSection = document.querySelector('#sidebar .active');
|
|
if (activeSection) {
|
|
activeSection.scrollIntoView({ block: 'center' });
|
|
}
|
|
}
|
|
// Toggle buttons
|
|
var sidebarAnchorToggles = document.querySelectorAll('#sidebar a.toggle');
|
|
function toggleSection(ev) {
|
|
ev.currentTarget.parentElement.classList.toggle('expanded');
|
|
}
|
|
Array.from(sidebarAnchorToggles).forEach(function (el) {
|
|
el.addEventListener('click', toggleSection);
|
|
});
|
|
}
|
|
}
|
|
window.customElements.define("mdbook-sidebar-scrollbox", MDBookSidebarScrollbox);
|