Link to static html is not working
See original GitHub issueHello,
I’d like to create a link to a static html file but the link is not working.
The reason that I want to do is that I want to use netlify-cms for my gatsby blog. It uses a static html page to launch. The static files are located in /static/admin/
in gatsby project.
Assume that the site url is https://www.site.com
.
Then, I can access the admin page with this url: https://www.site.com/admin/
.
Now I want to create a link in my gatsby blog to that admin page. I will link it using relative path: ‘/admin/’
It looks something like this:
class Page extends React.Components {
render() {
return (
<a href="/admin/">Link to admin page</a>
);
}
}
If I click the link which is rendered from that code, I can see 404 page. The console says that: A page wasn’t found for “/admin/” The console message is written from here.
Can I do some schemes to bypass this happening?
Issue Analytics
- State:
- Created 6 years ago
- Comments:17 (7 by maintainers)
I’ve been doing a little Link component that composes a gatsby-link component and an
a
tag:I’m also experiencing the same issue as @hackhat. A plain
a
tag still does the push-state, which means I’m unable to link to my Netlify CMS page from my site. If I add the target=“_blank” attribute, the link works as expected