    const sidebar = document.querySelector('#quarto-margin-sidebar');
    if (sidebar) {
      const existingTOC = document.querySelector('#quarto-margin-sidebar-toc');
      if (!existingTOC) {
        const tocContainer = document.createElement('div');
        tocContainer.id = 'quarto-margin-sidebar-toc';
        tocContainer.style.position = 'relative';
        tocContainer.style.padding = '10px';
        // tocContainer.style.border = '1px solid #ddd';
        sidebar.appendChild(tocContainer);
      }