{"id":13809051,"url":"https://github.com/angelikatyborska/vnu-elixir","last_synced_at":"2025-05-10T23:03:40.279Z","repository":{"id":40315983,"uuid":"254616348","full_name":"angelikatyborska/vnu-elixir","owner":"angelikatyborska","description":"An Elixir client for the Nu HTML Checker (v.Nu).","archived":false,"fork":false,"pushed_at":"2025-04-21T08:47:11.000Z","size":2384,"stargazers_count":55,"open_issues_count":2,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-05-10T23:03:36.483Z","etag":null,"topics":["css","css-validator","elixir","exunit-assertions","html","html-validation","html-validator","linter","svg","web-standards"],"latest_commit_sha":null,"homepage":"https://hex.pm/packages/vnu","language":"Elixir","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/angelikatyborska.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-04-10T11:19:03.000Z","updated_at":"2025-04-21T08:47:08.000Z","dependencies_parsed_at":"2023-02-15T23:46:11.619Z","dependency_job_id":"76a82dcc-e304-4426-abd3-a1611709f651","html_url":"https://github.com/angelikatyborska/vnu-elixir","commit_stats":{"total_commits":121,"total_committers":3,"mean_commits":"40.333333333333336","dds":"0.49586776859504134","last_synced_commit":"c603650c34c8869792d9343702aebfb284e00611"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angelikatyborska%2Fvnu-elixir","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angelikatyborska%2Fvnu-elixir/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angelikatyborska%2Fvnu-elixir/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angelikatyborska%2Fvnu-elixir/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/angelikatyborska","download_url":"https://codeload.github.com/angelikatyborska/vnu-elixir/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253492706,"owners_count":21916971,"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":["css","css-validator","elixir","exunit-assertions","html","html-validation","html-validator","linter","svg","web-standards"],"created_at":"2024-08-04T01:01:59.465Z","updated_at":"2025-05-10T23:03:40.248Z","avatar_url":"https://github.com/angelikatyborska.png","language":"Elixir","funding_links":[],"categories":["HTML"],"sub_categories":[],"readme":"# Vnu\n\n![GitHub Workflow status](https://github.com/angelikatyborska/vnu-elixir/actions/workflows/test.yml/badge.svg)\n![Hex.pm](https://img.shields.io/hexpm/v/vnu)\n![Hex.pm](https://img.shields.io/hexpm/dt/vnu)\n![Hex.pm](https://img.shields.io/hexpm/l/vnu)\n[![Coverage Status](https://coveralls.io/repos/github/angelikatyborska/vnu-elixir/badge.svg?branch=master)](https://coveralls.io/github/angelikatyborska/vnu-elixir?branch=master)\n\nAn Elixir client for [the Nu HTML Checker (v.Nu)](https://validator.w3.org/nu/).\n\n![Expected HTML document to be valid, but got 1 error. Attribute html-is-awesome not allowed on element body at this point.](https://raw.github.com/angelikatyborska/vnu-elixir/main/assets/overview.png)\n\n[v.Nu](https://validator.w3.org/nu/) is a document validity checker used by the W3C.\nIt offers validating HTML, CSS, and SVG documents.\n\nThis library brings that functionality to Elixir by using the Checker's JSON API.\nIt offers ExUnit assertions for validating dynamic content in tests, Mix tasks for validating static content, and general purpose functions to fulfill other needs.\n\n## Prerequisites\n\nWhile it is possible to use this library with the service run by W3C at [validator.w3.org/nu](https://validator.w3.org/nu/),\nI would recommend running your own instance. You will eliminate a lot of network latency if it runs on the same machine as your code, and you will not hit any rate limits that might exist for [validator.w3.org/nu](https://validator.w3.org/nu/).\n\nThe source of the Checker can be found in the repository [validator/validator](https://github.com/validator/validator).\nFollow their instructions on how to download it and [run it as a web server](https://github.com/validator/validator#standalone-web-server).\n\nThe easiest option is to use the Docker image, like this:\n```bash\ndocker run -d --rm -p 8888:8888 ghcr.io/validator/validator:latest\n```\n\nThe command might require an additional `--platform linux/amd64` flag on M1 macs.\n\nCheck if the server is running:\n```bash\n$ curl localhost:8888 -I\nHTTP/1.1 200 OK\n```\n\n## Installation\n\nMake sure to read about the [prerequisites](#prerequisites) first.\n\nAdd Vnu as a dependency to your project's `mix.exs`. To use the built-in, Hackney-based HTTP client adapter, also add `:hackney`:\n\n```elixir\ndefp deps do\n  [\n    {:vnu, \"~\u003e 1.1\", only: [:dev, :test], runtime: false},\n    {:hackney, \"~\u003e 1.18\"}\n  ]\nend\n```\n\nThen run:\n\n```bash\n$ mix deps.get\n```\n\nIf you don't want to use Hackney, you can implement your own HTTP client module using the [`Vnu.HTTPClient` behavior](lib/vnu/http_client.ex) and pass it in the `http_client` option.\n\n## Documentation\n\n[Available on hexdocs.pm](https://hexdocs.pm/vnu).\n\n## Usage\n\nSee [the usage guide](guides/usage.md).\n\n## Development\n\nMake sure to read about the [prerequisites](#prerequisites) first.\n\nAfter cloning the repository, run `mix deps.get` and you should be ready for development.\n\nTo ensure code consistency, run `mix lint`.\n\n### Running tests\n\nAll test that expect to talk with the server accept the server's URL as an `VNU_SERVER_URL` environment variable or fallback to the default `http://localhost:8888`.\n\n```bash\n$ VNU_SERVER_URL=http://localhost:4000/ mix test \n```\n\nIf you're adding a new test, make sure it will do that do.\n\n## Contributing\n\n### Issues\n\nIf you noticed a problem with the library or its documentation, or have an idea for a feature, [open an issue](https://github.com/angelikatyborska/vnu-elixir/issues/new).\n\nIf you have an idea on how to act upon the problem or idea, feel free to open a pull request instead.\n\n### Pull requests\n\nIf you noticed a problem with the library or its documentation and know how to fix it, or have an idea for a feature, or want to fix a typo, [open a pull request](https://github.com/angelikatyborska/vnu-elixir/pull/new/master).\n\nIf you are not sure of your changes or need help finishing them, open a pull request anyway. I'll try to help!\n\n## License\n\nVnu is released under the MIT License. See the LICENSE file for further details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fangelikatyborska%2Fvnu-elixir","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fangelikatyborska%2Fvnu-elixir","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fangelikatyborska%2Fvnu-elixir/lists"}