Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: render sidebar from data #376

Draft
wants to merge 19 commits into
base: main
Choose a base branch
from
Draft

refactor: render sidebar from data #376

wants to merge 19 commits into from

Conversation

imfing
Copy link
Owner

@imfing imfing commented Apr 29, 2024

this is a major refactor aiming to address the sidebar performance issue described in #122

  • enable render the sidebar from a nested data, e.g. data/en/sidebar.yaml:
docs:
  - title: Documentation
    link: /docs/
  - title: Guide
    link: /docs/guide/
    open: false
    items:
      - title: Organize Files
        link: /docs/guide/organize-files/
  • add optional flags to enable caching the sidebar (experimental)
params:
  page:
    sidebar:
      enable: true
      source: data  # auto | data
      cache: true
  • when sidebar is cached, use JavaScript to expand sidebar automatically to the current page

The other related issue #254

Copy link

netlify bot commented Apr 29, 2024

Deploy Preview for hugo-hextra ready!

Name Link
🔨 Latest commit 9e7b13a
🔍 Latest deploy log https://app.netlify.com/sites/hugo-hextra/deploys/664687e2af92290008b47af8
😎 Deploy Preview https://deploy-preview-376--hugo-hextra.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant