mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-19 22:23:33 +01:00
Merge branch 'develop' of github.com:Pita/etherpad-lite into develop
This commit is contained in:
commit
1da39d3d1a
3 changed files with 22 additions and 2 deletions
11
doc/custom_static.md
Normal file
11
doc/custom_static.md
Normal file
|
@ -0,0 +1,11 @@
|
|||
# Custom static files
|
||||
Etherpad Lite allows you to include your own static files in the browser, by modifying the files in `static/custom`.
|
||||
|
||||
* `index.js` Javascript that'll be run in `/`
|
||||
* `index.css` Stylesheet affecting `/`
|
||||
* `pad.js` Javascript that'll be run in `/p/:padid`
|
||||
* `pad.css` Stylesheet affecting `/p/:padid`
|
||||
* `timeslider.js` Javascript that'll be run in `/p/:padid/timeslider`
|
||||
* `timeslider.css` Stylesheet affecting `/p/:padid/timeslider`
|
||||
* `favicon.ico` Overrides the default favicon.
|
||||
* `robots.txt` Overrides the default `robots.txt`.
|
|
@ -1,4 +1,5 @@
|
|||
@include documentation
|
||||
@include cusotm_static
|
||||
@include api/api
|
||||
@include plugins
|
||||
@include database
|
|
@ -12,8 +12,16 @@ exports.expressCreateServer = function (hook_name, args, cb) {
|
|||
//serve robots.txt
|
||||
args.app.get('/robots.txt', function(req, res)
|
||||
{
|
||||
var filePath = path.normalize(__dirname + "/../../../static/robots.txt");
|
||||
res.sendfile(filePath);
|
||||
var filePath = path.normalize(__dirname + "/../../../static/custom/robots.txt");
|
||||
res.sendfile(filePath, function(err)
|
||||
{
|
||||
//there is no custom favicon, send the default robots.txt which dissallows all
|
||||
if(err)
|
||||
{
|
||||
filePath = path.normalize(__dirname + "/../../../static/robots.txt");
|
||||
res.sendfile(filePath);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
//serve favicon.ico
|
||||
|
|
Loading…
Reference in a new issue