-
-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #116 from subbuss/master
Step 1 of refactoring: More coming later
- Loading branch information
Showing
2 changed files
with
136 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
"use strict"; | ||
|
||
var config = { | ||
userAgent: 'MWOffliner/HEAD', | ||
|
||
defaults: { | ||
publisher: 'Kiwix', | ||
redisConfig: '/dev/shm/redis.sock', | ||
requestTimeout: 60, | ||
}, | ||
|
||
filters: { | ||
/* All DOM nodes with on of these styles will be removed */ | ||
/* On Wikivoyage 'noprint' remove also top banners like on 'South America'. */ | ||
cssClassBlackList: [ | ||
'noprint', 'metadata', 'ambox', 'stub', | ||
'topicon', 'magnify', 'navbar', | ||
'mwe-math-mathml-inline', 'mw-kartographer-container' | ||
], | ||
|
||
/* Additional black list if only intro is dumped */ | ||
nodetCssClassBlackList: [ 'mw-ref' ], | ||
|
||
/* All DOM node with these styles will be deleted | ||
* if no <a> tag is included in the sub-tree */ | ||
cssClassBlackListIfNoLink: [ | ||
'mainarticle', 'seealso', 'dablink', 'rellink', 'hatnote' | ||
], | ||
|
||
/* All DOM nodes which we should for to display */ | ||
cssClassDisplayList: ['thumb'], | ||
|
||
/* List of style to be removed */ | ||
cssClassCallsBlackList: ['plainlinks'], | ||
|
||
/* All nodes with one of these ids will be removed */ | ||
idBlackList: ['purgelink'], | ||
}, | ||
|
||
output: { | ||
cssResources: [ 'mobile.css', 'content.parsoid.css', 'inserted_style_mobile.css' ], | ||
|
||
dirs : { | ||
style: 's', | ||
media: 'm', | ||
javascript: 'j', | ||
styleModules: 'css_modules', | ||
jsModules: 'js_modules', | ||
} | ||
|
||
templates: { | ||
/* Template code for any redirect to be written on the FS */ | ||
redirects : [ | ||
'<html>', '<head>', | ||
'<meta charset="UTF-8" />', | ||
'<title>{{ title }}</title>', | ||
'<meta http-equiv="refresh" content="0; URL={{ target }}">' | ||
'</head>', '<body></body>', '</html>' | ||
].join(''), | ||
}, | ||
}, | ||
}; | ||
|
||
module.exports = { | ||
config: config | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters