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

404 page: navigation links are broken (gitlab pages) #1689

Closed
robertsanseries opened this issue May 13, 2020 · 10 comments
Closed

404 page: navigation links are broken (gitlab pages) #1689

robertsanseries opened this issue May 13, 2020 · 10 comments

Comments

@robertsanseries
Copy link

Description

When hitting a missing page (404), the navigation links are not working anymore. (I'm using gitlab pages)

I noticed that a similar problem was fixed in Mkdocs mkdocs/mkdocs#1598.

Attention:

This problem does not happen in version mkdocs-material 5.1.3.
Error does not occur with the default theme

Steps to reproduce the bug

Test mkdocs for error reproduction: mkdocs-material-error-navigation.zip

1 - Navigate to page 2
2 - Then try to navigate to page 3

See attached video >>> mkdocs-material-error-navigation - 2020-05-12 22.47.29.mp4.zip <<<

Captura de tela de 2020-05-12 22 36 35

Package versions

  • Python: python: 3.8
  • MkDocs: mkdocs: 1.1
  • Material: mkdocs-material 5.1.5

Project configuration

# Project information
site_name: Mkdocs Material
site_description: A Material Design theme for MkDocs
site_author: squidfunk
#site_url: add your gitpages URL

# Repository
repo_name: squidfunk/mkdocs-material
repo_url: https://github.com/squidfunk/mkdocs-material
edit_uri: ""

# Copyright
copyright: 'Copyright © 2016 - 2020 Martin Donath'

# Configuration
theme:
  name: material
  logo: images/google.jpeg
  favicon: images/favicon.ico
  palette:
    primary: 'blue'
    accent: 'light blue'

# Extensions
markdown_extensions:
  - markdown.extensions.admonition
  - markdown.extensions.attr_list
  - 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.details
  - pymdownx.emoji:
      emoji_index: !!python/name:materialx.emoji.twemoji
      emoji_generator: !!python/name:materialx.emoji.to_svg
  - pymdownx.inlinehilite
  - pymdownx.magiclink
  - pymdownx.mark
  - pymdownx.smartsymbols
  - pymdownx.superfences
  - pymdownx.tasklist:
      custom_checkbox: true
  - pymdownx.tabbed
  - pymdownx.tilde
  - admonition
  - codehilite
  - meta

# Page tree
nav:
  - Visão geral: index.md
  - Test Page 1: test-page-1.md
  - Test Page 2: test-page-2.md
  - Test Page 3: test-page-3.md

System information

Page navigation works in my localhost environment

  • OS: elementary OS 5.1.4 Hera (Built on Ubuntu 18.04.4 LTS)
  • Browser: Google Chrome - Versão 81.0.4044.138 (Versão oficial) 64 bits
@squidfunk
Copy link
Owner

Did you provide the site_url setting and set it to the correct root?

@robertsanseries
Copy link
Author

robertsanseries commented May 13, 2020

Did you provide the site_url setting and set it to the correct root?

@squidfunk Yes!

Set with URL with / at the end, and without /

Note: I had to remove it from the sample code because it is for internal company use.

@squidfunk
Copy link
Owner

I can't reproduce it with the official docs. Try clicking the links here:
https://squidfunk.github.io/mkdocs-material/this/is/not/broken

@robertsanseries
Copy link
Author

robertsanseries commented May 13, 2020

I can't reproduce it with the official docs. Try clicking the links here:
https://squidfunk.github.io/mkdocs-material/this/is/not/broken

@squidfunk The problem only occurred in Gitlab Pages. I didn't try to test with Github pages!

Localhost also works normal!

@citizenrich
Copy link

citizenrich commented May 13, 2020

Hi. It's strange, to be sure. I can reproduce using a simple site on GitHub pages but localhost is just fine. Repo: https://github.com/intrahealth/emNutt Docs: https://intrahealth.github.io/emNutt

@robertsanseries
Copy link
Author

Oi. É estranho, com certeza. Posso reproduzir usando um site simples nas páginas do GitHub, mas localhost está ótimo. Repo: https://github.com/intrahealth/emNutt Documentos: https://intrahealth.github.io/emNutt

@citizenrich my temporary solution was to use the version: 5.1.3

@squidfunk
Copy link
Owner

https://intrahealth.github.io/emNutt

This site doesn't even load for me:

Bildschirmfoto 2020-05-13 um 17 23 53

Please provide a reproducible repository and example. Otherwise I can't help you.

@squidfunk
Copy link
Owner

@squidfunk The problem only occurred in Gitlab Pages. I didn't try to test with Github pages!

If it only happens for GitLab pages, it's a problem with GitLab pages, not with this project.

@citizenrich
Copy link

citizenrich commented May 13, 2020

@squidfunk thanks for having a look. Indeed, I anticipate that it's an issue with GitHub pages rather than MkDocs or MkDocs material. On the repo, yes, that is the reproducible example. It works on localhost but not picked up by GitHub.

Edit: Sorry to conflate GitHub and gitlab. Very different.

@squidfunk
Copy link
Owner

Okay, then I'm closing this, as it's beyond the scope of this project.

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

No branches or pull requests

3 participants