{"id":13510282,"url":"https://github.com/thecreazy/siteaudit","last_synced_at":"2025-03-30T15:31:12.312Z","repository":{"id":40267187,"uuid":"154140171","full_name":"thecreazy/siteaudit","owner":"thecreazy","description":"Site audit for your site from terminal","archived":false,"fork":false,"pushed_at":"2023-01-07T23:02:10.000Z","size":7456,"stargazers_count":396,"open_issues_count":8,"forks_count":15,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-03-18T13:54:47.743Z","etag":null,"topics":["hacktoberfest","hacktoberfest2021"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thecreazy.png","metadata":{"files":{"readme":"README.MD","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.MD","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-10-22T12:29:59.000Z","updated_at":"2025-02-28T03:02:23.000Z","dependencies_parsed_at":"2023-02-08T03:16:31.626Z","dependency_job_id":null,"html_url":"https://github.com/thecreazy/siteaudit","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecreazy%2Fsiteaudit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecreazy%2Fsiteaudit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecreazy%2Fsiteaudit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecreazy%2Fsiteaudit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thecreazy","download_url":"https://codeload.github.com/thecreazy/siteaudit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246338859,"owners_count":20761449,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hacktoberfest","hacktoberfest2021"],"created_at":"2024-08-01T02:01:31.942Z","updated_at":"2025-03-30T15:31:07.304Z","avatar_url":"https://github.com/thecreazy.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","hacktoberfest2021"],"sub_categories":[],"readme":"# 📈 Siteaudit: Generate audit benchmark for your site 📈\n\nSiteaudit will analyze your site and generate audit for:\n\n- Pagespeed\n- Lighthouse\n- A11y\n\n\u003cimg src=\"docs/terminal.gif\" /\u003e\n\n## Installation\n\n### **Use nodejs**\n\nYou can use `siteaudit` from your terminal using the npm package and run it as a binary\n\n```sh\nnpm -g i siteaudit\n\nsiteaudit --url https://canellariccardo.it\n```\n\nor you can use siteadit inside your node application\n\n```js\nconst SiteAudit = require('siteaudit/lib/node');\n\nSiteAudit.start('https://canellariccardo.it', {\n  pagespeed: true,\n  lighthouse: false,\n  a11y: true,\n  outputFolder: '/output',\n  customAppenName: `-${Date.now()}`,\n});\n```\n\n### **Use docker**\n\nYou can also use the docker image to generate the reports\n\n#### Passing no configuration\n\n```sh\ndocker run -t \\\n-v \"$(pwd)/.testoutput\":\"/app/output\" \\\nthecreazy/siteaudit:latest \\\n--url https://canellariccardo.it \\\n--headless\n```\n\n#### Passing configuration\n\n```sh\ndocker run -t \\\n-v \"$(pwd)/.testoutput\":\"/app/output\" \\\n-v \"$(pwd)/.siteaudit.json\":\"/.siteaudit.json\"\nthecreazy/siteaudit:latest \\\n--url https://canellariccardo.it \\\n--no-lighthouse \\\n--config /.siteaudit.json \\\n--headless\n```\n\n## Runtime options\n\n- `--url` specify the base url to test\n- `--output` specify the output directory (where your assets will be generated)\n- `--config` specify a JSON file containing an extension to the configuration\n- `--no-pagespeed` no pagespeed audit will be generated\n- `--no-lighthouse` no lighthouse audit will be generated\n- `--no-a11y` start without a11y audit\n- `--headless` use chrome headless\n\n## Using ENV\n\nYou can also use environments for passing the options\n\n- `SITEAUDIT_NOLIGHTHOUSE` no lighthouse audit will be generated\n- `SITEAUDIT_NOPAGESPEED` no pagespeed audit will be generated\n- `SITEAUDIT_CONFIG` specify a JSON file containing an extension to the configuration\n- `SITEAUDIT_URL` pass the url for running the audit\n- `SITEAUDIT_A11Y` no a11y audit will be generated\n- `SITEAUDIT_HEADLESS` use chrome headless\n- `SITEAUDIT_USINGENV` force the use of the environments\n\n## Configuration\n\nIf you pass to `siteaudit` an additional JSON file, it will be merged with initial config.\n\n```sh\nsiteaudit --url https://canellariccardo.it --config ./config.json\n```\n\nExample:\n\n```json\n{\n  \"pagespeed\": {\n    \"pages\": [\"/\", \"/404\"]\n  }\n}\n```\n\n### config.son\n\nYou can also pass a custom config json, there are some examples:\n\n- pagespeed\n\n```js\n{\n  \"pagespeed\":{\n    \"strategy\" :  [ \"mobile\", \"desktop\"], // Strategy to use when analyzing the page. this is the base settings, you can only use mobile | desktop\n    \"locale\": \"en_US\", // Locale results should be generated in.\n    \"threshold\": \"70\", // Threshold score to pass the PageSpeed test. Useful for setting a performance budget.\n    \"pages\": [\"/\"]. //Array of relative pages to analyze, default is only / (please, use relative path)\n  }\n}\n```\n\n- lighthouse\n\n\u003e For full list of settings options see [here](https://github.com/GoogleChrome/lighthouse/blob/master/docs/configuration.md).\n\n```js\n{\n  \"lighthouse\":{\n    \"extends\" :  [ \"lighthouse:default\" ], // (string|boolean|undefined) The extends property controls if your configuration should inherit from the default Lighthouse configuration.\n    \"settings\": {\n      \"onlyCategories\": [\"performance\"],\n      \"onlyAudits\": [\"works-offline\"],\n    }, // (Object|undefined) The settings property controls various aspects of running Lighthouse such as CPU/network throttling and audit whitelisting/blacklisting.\n    \"audits\": [\n      \"first-meaningful-paint\",\n      \"first-interactive\",\n      \"byte-efficiency/uses-optimized-images\",\n    ] // (string[]) The audits property controls which audits to run and include with your Lighthouse report.\n  }\n}\n```\n\n## Using in gitlab-ci\n\nYou can also use `siteaudit` in your gitlabci.yml\n\n```yml\nstages:\n  - audit\n\naudit:\n  image:\n    name: thecreazy/siteaudit:latest\n    entrypoint: ['']\n  stage: audit\n  variables:\n    SITEAUDIT_URL: 'https://canellaricardo.it'\n  script:\n    - echo \"started siteaudit\"\n    - /usr/local/bin/siteaudit --url=${SITEAUDIT_URL} --headless\n  artifacts:\n    paths:\n      - output\n```\n\n## Output\n\n`siteaudit` will generate this output:\n\n- `lighthouse-audit.html`: contains the classic html result of lighthouse\n- `pagespeed-audit.md`: a markdown format result of the pagespeed api\n- `a11y-audit.md`: a markdown format result of the a11y api\n\n### Output examples\n\n\u003cimg src=\"docs/pagespeed.png\" width=\"50%\"  /\u003e\n\u003cimg src=\"docs/lighthouse.png\" width=\"50%\"  /\u003e\n\u003cimg src=\"docs/a11y.png\" width=\"50%\" /\u003e\n\n## Contributing\n\n#### **Reporting bugs**\n\n- Open a GitHub issue\n\n#### **Contributing with patches and bug fixes**\n\n- Open a new GitHub pull request with the patch.\n- Ensure the PR description clearly describes the problem and solution.\n\n## Contributors\n\n- Riccardo Canella [@thecreazy](https://github.com/thecreazy)\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthecreazy%2Fsiteaudit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthecreazy%2Fsiteaudit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthecreazy%2Fsiteaudit/lists"}