Answer the question
In order to leave comments, you need to log in
How to fix the routing so that the application works on github pages?
https://anrikotacatti.github.io/FD3-Pauls/keep/public/ here it gives out 404 and urls when switching between categories add up
did like this also doesn't work
like this url doesn't work either
<code><base href="./">
<script defer="defer" src="/bundle.js">
</script><link href="/main.css" rel="stylesheet"><style type="text/css"></code>
<code> new HtmlWebpackPlugin({
template: path.resolve(__dirname, 'index.html'), //your template file
base: "./",
filename: 'index.html',
})</code>
new HtmlWebpackPlugin({
template: path.resolve(__dirname, 'index.html'), //your template file
publicPath:"./",
filename: 'index.html',
})
<script defer="defer" src="/./bundle.js"></script>
output: {
path: path.resolve(__dirname, './public/'),
filename: "./bundle.js",
publicPath: "/"
},
<script defer="defer" src="/bundle.js"></script>
<link href="/main.css" rel="stylesheet">
https://anrikotacatti.github.io/FD3-Pauls/keep/public/chapter/chapter/chapter/chapter/chapter/chapter/chapter/chapter/chapter/chapter/moi-zametki
forTaskLists = () => {
let menulist = [];
for (let tasklistskey in this.state.TaskLists) {
menulist.push(
<li key={tasklistskey}>
<NavLink to={"./chapter/" + this.state.TaskLists[tasklistskey].url} exact className="PageLink" activeClassName="ActivePageLink" key={tasklistskey}>
{this.folder()} {this.state.TaskLists[tasklistskey].name}
</NavLink>
<span onClick={this.openFormEditTaskCaption.bind(null, tasklistskey, this.state.TaskLists[tasklistskey].name)}>{this.icoEdit()}</span>
<span onClick={this.deleteChapter.bind(null, tasklistskey)}>{this.icoTrash()}</span>
</li>
)
}
return menulist;
}
<Switch>
<Route path="./" exact component={Main} />
<Route path="./about" exact component={AboutPage} />
<Route path="./serch" exact component={Search} />
<Route path="./pin" exact component={Pin} />
<Route path="./chapter" exact component={TaskChapter} />
<Route path="./chapter/:chapter" component={TaskChapter} />
<Route path="*" component={NoMatch} />
</Switch>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question