Thanks for your interest in contributing to site-audit-seo. This guide will help you get started.
- Node.js 16+
- npm
- Docker and docker-compose (optional, for containerized development)
- Google Chrome (for Puppeteer/Lighthouse features)
- Clone the repository:
git clone https://github.com/viasite/site-audit-seo.git
cd site-audit-seo- Install dependencies:
npm install- Run the CLI tool locally:
node src/index.js -u https://example.comnpm install -g git+https://github.com/viasite/site-audit-seo.git --unsafe-perm
For build, you should symlink site-audit-seo-viewer to the data/front directory:
ln -s /path/to/site-audit-seo-viewer /path/to/site-audit-seo/data/frontThen:
docker-compose build
docker-compose up -d{
"name": "site-audit-seo-export-influxdb",
"site-audit-seo": {
"plugins": {
"export-influxdb": {
"main": "sendToInfluxDB.js",
"type": "afterScan",
}
}
}
}function afterScan(jsonPath, options) {
const jsonRaw = fs.readFileSync(jsonPath);
const data = JSON.parse(jsonRaw);
}
module.exports = afterScan;{
"name": "site-audit-seo-export-influxdb",
"site-audit-seo": {
"plugins": {
"readability": {
"main": "readability.js",
"type": "afterRequest",
"fields": [
{
"name": "readability_time",
"comment": "Читать, секунд?",
"comment_en": "Reading, time",
"groups": ["readability"],
"type": "integer"
}
]
}
}
}
}function afterRequest(result, options) {
result.newField = 123;
}
module.exports = afterRequest;See core plugins at src/plugins.
afterScan- runs after the full site scan is complete. Useful for exporting data, sending notifications, etc.afterRequest- runs after each page request. Useful for extracting additional data from pages.
You can install plugins with npm in the data directory.
- Extract data from a page
- Analyze HTML of a page
- Actions after scan (implemented)
- Command line arguments
- Fork the repository
- Create a feature branch (
git checkout -b feature/my-change) - Make your changes
- Test locally with
node src/index.js -u https://example.com - Commit with a clear message
- Push to your fork and open a Pull Request
If you find a bug or have a feature request, please open an issue with:
- A clear description of the problem or suggestion
- Steps to reproduce (for bugs)
- Your environment details (OS, Node.js version, npm version)