Navigation via url/refresh/link other than sidenav does not work in production mode.
See original GitHub issueBug Report
When the project has been built for production using yarn docz build
navigation only works through the side bar. When trying to link between pages using markdown links, or refreshing the page, the site 404’s.
To Reproduce
Here is what I used to test -
First I load the typography
page successfully by using the sidebar nav, it loads successfully.
Next I try to refresh the page and it 404’s.
Then I navigate to the colors
page and it loads successfully.
Next I try to refresh the page and it 404`s.
[Wed Jul 18 2018 14:29:58 GMT+0100 (BST)] "GET /static/js/docs-1-brand-2-typography.js" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36"
[Wed Jul 18 2018 14:30:04 GMT+0100 (BST)] "GET /brand/typography" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36"
[Wed Jul 18 2018 14:30:04 GMT+0100 (BST)] "GET /brand/typography" Error (404): "Not found"
[Wed Jul 18 2018 14:30:31 GMT+0100 (BST)] "GET /brand/colors" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36"
[Wed Jul 18 2018 14:30:31 GMT+0100 (BST)] "GET /brand/colors" Error (404): "Not found"
Expected behavior That the routes are served so they can be accessed from anywhere, not just from the sidebar navigation.
Enviroment
- OS: OSX 10.13.4
- Node/npm version: Node 9, NPM 5
- Docz Version: 0.5.9
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Open/Close sidenav from another component - Stack Overflow
I had the same problem using. I resolved it like this. SidenavService import { Injectable } from '@angular/core'; import { MatSidenav } from...
Read more >Sidenav - Angular Material
The sidenav components are designed to add side content to a fullscreen app. ... sidenav modes show a backdrop by default, while the...
Read more >Fix sidenav on large screens not working - MDBootstrap
I am trying to setup my site exactly like the layout DOUBLE NAVIGATION WITH FIXED SIDENAV & FIXED NAVBAR. But no matter what...
Read more >Angular Material Tutorial - 11 - Sidenav - YouTube
Your browser can 't play this video. Learn more. Switch camera ... Business - codevolution.business@gmail.com Sidenav in Angular Material ...
Read more >Angular 6 Material SideNav Example - DevGlan
This article is about creating Sidenav component using Angular Material 6 with routing along with mat toolbar.The different routes will be ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@pedronauck i think this might still exist in prod mode.
hosting the dist using
http-server
and hittingabc.com/getting-started
will return 404. hittingabc.com
without the path works though.im using v1 rc7
Switching from using Markdown links to
<Link>
fixes the issue. I have also applied the samenetlify.toml
from the docz site to do the index.html redirect and that sorts out the refresh 😃 Not sure that is really a solution, but it works for me.