diff --git a/CHANGELOG.md b/CHANGELOG.md index 6309688..ee84e10 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ This changelog documents all noteworthy changes in the project. The format adher ## Next +## v0.2.0 - 26th September 2023 + +### Added + +- Allow passing atom for attributes and tags. + ## v0.1.1 - 26th September 2023 ### Added diff --git a/README.md b/README.md index aafe06e..c5307ee 100644 --- a/README.md +++ b/README.md @@ -17,17 +17,40 @@ Package can be installed by adding `e2h` to your list of dependencies: ### Rebar3 ```erlang -{deps, [{e2h, "0.1.1"}]}. +{deps, [{e2h, "0.2.0"}]}. ``` ### Mix ```elixir defp deps do - [{:e2h, "~> 0.1.1"}] + [{:e2h, "~> 0.2.0"}] end ``` +## Example + +```erlang +UserStatus = <<"busy">>, +UserProfileImage = <<"https://example.com/image.jpeg">>, +UserName = <<"adam">>, +UserBio = <<"some nonsense">>, + +Document = [ + {'div', [{class, <<"user">>}, {status, UserStatus}], [ + {img, [{href, UserProfileImage}]}, + {'div', [], [ + {h1, [], [UserName]}, + {p, [], [UserBio]} + ]} + ]} +], + +e2h:render(Document). +% +%
some nonsense