Reduce duplication in plugins.js and docs.