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

Closed
brendo opened this Issue Mar 2, 2017 · 4 comments

Comments

Projects
None yet
2 participants
@brendo
Contributor

brendo commented Mar 2, 2017

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

@squidfunk squidfunk self-assigned this Mar 2, 2017

@squidfunk squidfunk added the bug label Mar 2, 2017

@squidfunk squidfunk added this to the 1.1.2 milestone Mar 2, 2017

@squidfunk

This comment has been minimized.

Show comment
Hide comment
@squidfunk

squidfunk Mar 2, 2017

Owner

Didn't think of this case, should be easily fixable. I will look into this.

Owner

squidfunk commented Mar 2, 2017

Didn't think of this case, should be easily fixable. I will look into this.

@squidfunk

This comment has been minimized.

Show comment
Hide comment
@squidfunk

squidfunk Mar 2, 2017

Owner

Fixed in #198 - please try/verify with the latest master, so I can release the bugfix as 1.1.2.

Owner

squidfunk commented Mar 2, 2017

Fixed in #198 - please try/verify with the latest master, so I can release the bugfix as 1.1.2.

@squidfunk squidfunk modified the milestones: 1.2.0, 1.1.2 Mar 2, 2017

@brendo

This comment has been minimized.

Show comment
Hide comment
@brendo

brendo Mar 3, 2017

Contributor

Thanks @squidfunk, I have tested locally and can confirm this works 👍

Contributor

brendo commented Mar 3, 2017

Thanks @squidfunk, I have tested locally and can confirm this works 👍

@squidfunk

This comment has been minimized.

Show comment
Hide comment
@squidfunk

squidfunk Mar 3, 2017

Owner

Fixed in release 1.2.0

Owner

squidfunk commented Mar 3, 2017

Fixed in release 1.2.0

@squidfunk squidfunk closed this Mar 3, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment