Hello everyone.
I install yuidoc and can run yuidoc . properly. This generates me an out folder with the index.html file inside it.
If I open this index.html file by double clicking on it. It works fine.
My problem is when accesing it through server. I am doing an node/express app. And publish files like this, so i can acces them in the URL, without problems :
app.get(/^\/assets\/.+/,function(req,res){
res.sendfile(req.url,{root:"doc"});
});
app.get("/api.js",function(req,res){
res.sendfile("api.js",{root:"doc"});
});
app.get(/^\/classes\/.+/,function(req,res){
res.sendfile(req.url,{root:"doc"});
});
app.get(/^\/files\/.+/,function(req,res){
res.sendfile(req.url,{root:"doc"});
});
app.get(/^\/modules\/.+/,function(req,res){
res.sendfile(req.url,{root:"doc"});
});
app.get('/documentation', function(req, res, next) {
res.sendfile('index.html', {root: './doc'});
});
But then when clicking some class in the menu nothing happens, and I have the following error :
Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:8081/classes/Base%20de%20datos..html?pjax=1
But in the url , the adress appear like this:
http://localhost:8081/classes/Base%20de%20datos..html
And when I refresh, it goes to the correct web page.
Who is generating that "?pajax=1" , can I prevent of doing that so it works?
Or how can I fix this?
Thanks!