I just start programming recently and I have this problem, so I have this html snippet. I want parse the src attribute of the img and normalize it with urly path normalization, and add some new path to the src.
<html>
<body>
<div class="content">lorem ipsum
<img style="margin-top: -5px;" src="/img/car.png" />
</div>
<img style="margin-top: -5px;" src="/img/chair.png" />
</body>
</html>
become this
<html>
<body>
<div class="content">lorem ipsum
<img style="margin-top: -5px;" src="/path1/img/car.png" />
</div>
<img style="margin-top: -5px;" src="/path1/img/chair.png" />
</body>
</html>
I think of this method but i just can't find the way to acquire the src value
(html/deftemplate template-about "../resources/public/build/about/index.html"
[]
[:img] (html/set-attr :src (str "path1" (urly/path-of ("the src value")))
)