READ: Technical Documentation
The portal pages utilize several pre/post processors to generate an optimized HTML page.
NOTE: You'll need Gerrit access to contribute code to this repository.
Prerequisites:
- Node
- npm
- nvm
From the root of the repo, run:
nvm use # use correct node version
npm install # install dependancies
npm run start --portal=wikipedia.org # update portal stats, start dev server
Visit http://localhost:8080/src/wikipedia.org
to see the changes in the src
directory.
Running gulp help
will output a list of available gulp tasks.
See the Getting Started section of the technical documentation for more details.
- Mediawiki JavaScript coding conventions - linted by eslint-config-wikimedia
- Mediawiki CSS coding conventions - linted by stylelint-config-wikimedia
The directory structure is divided into a development ('src') directory and a production ('prod') directory. prod
should not be edited directly, as its content will be overridden when running the build command gulp --portal=wikipedia.org
.
|— package.json
|— gulpfile.js
|— src/ development dir
| |— wikipedia.org/
| |— portal/ symlink to '../' for mirroring prod server setup.
| |— templates/ Handlebars template partials
| |— index.handlebars Main Handlebars template
| |—assets/
| |— css/ Compiled postCSS
| |— img/ Compiled sprites & non-sprite images
| |— sprite_assets Original sprite images
| |— js/ JavaScript files
| |— postcss/ postCSS files
|— prod Compiled production dir
|—wikipedia.org/
|— index.html compiled from src with inlined CSS
|— assets/ minimized & compressed assets
|— img/
|— js/
gulp --portal=wikipedia.org
will generate the production version of the page and place it in /prod/wikipedia.org/
. The production version contains JS and image assets that have been combined, uglified, minified, compressed and suffixed with a cache-busting file-name. The contents of the prod
directory should not be edited directly.
See the Production Builds section of the technical documentation for more details.
Translations are edited through translatewiki.net. To edit a translation, visit this page, select the language you wish to translate to, and proceed to edit a translation. The translations will be merged into the repository automatically by a bot (l10n-bot).
See the l10n section of the technical documentation for more details.