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

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

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

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

brendo opened this issue Mar 2, 2017 · 4 comments
Assignees
Labels
bug
Milestone

Comments

@brendo
Copy link
Contributor

@brendo 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
Copy link
Owner

@squidfunk squidfunk commented Mar 2, 2017

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

@squidfunk
Copy link
Owner

@squidfunk 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
Copy link
Contributor Author

@brendo brendo commented Mar 3, 2017

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

@squidfunk
Copy link
Owner

@squidfunk squidfunk commented Mar 3, 2017

Fixed in release 1.2.0

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

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.