8000 Issue with tabs navigation if there are no second level markdown items · Issue #197 · squidfunk/mkdocs-material · GitHub
[go: up one dir, main page]

Skip to content

Issue with tabs navigation if there are no second level markdown items #197

@brendo

Description

@brendo

Description

While experimenting with the new tabs feature, we encountered an error where the navigation cannot handle the scenario where there are no Markdown files at the second level, but there may be Markdown in the third level.

Expected behavior

I would expect clicking on the Link in the navigation should navigate to the first item in that level.

Actual behavior

Nothing happens when clicking on the Link.

Steps to reproduce the bug

  1. Assume a pages structure like the following:
pages:
  - Home: index.md
  - Animals:
    - Mammals:
      - Kangaroo: 'animals/mammals/kangaroo.md'
  1. Activate the tabs feature:
feature:
  tabs: true
  1. Preview the site with mkdocs serve.

  2. Click on Animals.

  3. Observe the page does not change (but note that you can access the page via the Footer!)

Package versions

  • Python 2.7.13
  • mkdocs, version 0.16.1
  • mkdocs-material 1.1.1

Project configuration

site_name: Test case
site_description: Test case for tabs

theme: material

# Options
extra:
  feature:
    tabs: true
  palette:
    primary: indigo
    accent: indigo

# Extensions
markdown_extensions:
  - markdown.extensions.admonition
  - markdown.extensions.codehilite(guess_lang=false)
  - markdown.extensions.def_list
  - markdown.extensions.footnotes
  - markdown.extensions.meta
  - markdown.extensions.toc(permalink=true)
  - pymdownx.arithmatex
  - pymdownx.betterem(smart_enable=all)
  - pymdownx.caret
  - pymdownx.critic
  - pymdownx.emoji:
      emoji_generator: !!python/name:pymdownx.emoji.to_svg
  - pymdownx.inlinehilite
  - pymdownx.magiclink
  - pymdownx.mark
  - pymdownx.smartsymbols
  - pymdownx.superfences
  - pymdownx.tasklist(custom_checkbox=true)
  - pymdownx.tilde

# Page tree
pages:
  - Home: index.md
  - Animals:
    - Mammals:
      - Kangaroo: 'animals/mammals/kangaroo.md'

System information

  • OS: Mac Sierra
  • Browser: Chrome

Metadata

Metadata

Assignees

Labels

bugIssue reports a bug

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0